All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.cedarsoft.osgi.validator.SourceFolderAwareMojo Maven / Gradle / Ivy

There is a newer version: 8.9.0
Show newest version
package com.cedarsoft.osgi.validator;

import org.apache.maven.model.Resource;
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugins.annotations.Parameter;
import org.apache.maven.project.MavenProject;

import javax.annotation.Nonnull;
import java.io.File;
import java.util.Collections;
import java.util.List;

/**
 * @author Johannes Schneider ([email protected])
 */
public abstract class SourceFolderAwareMojo extends AbstractMojo {
  /**
   * The source directories containing the sources to be compiled.
   *
   */
  @Parameter (defaultValue = "${project.compileSourceRoots}", readonly = true, required = true)
  protected List sourceRoots;
  /**
   * The source directories containing the test sources to be compiled.
   *
   */
  @Parameter (defaultValue = "${project.testCompileSourceRoots}", readonly = true, required = true)
  protected List testSourceRoots;

  /**
   * The list of resources.
   *
   */
  @Parameter (defaultValue = "${project.resources}", readonly = true, required = true)
  private List resources;

  /**
   * The list of test resources
   *
   */
  @Parameter (defaultValue = "${project.testResources}", readonly = true, required = true)
  private List testResources;

  @Parameter (defaultValue = "${project.build.outputDirectory}", readonly = true, required = true)
  protected File classesDir;

  @Parameter (defaultValue = "${project}", readonly = true, required = true)
  protected MavenProject mavenProject;



  protected MavenProject getProject() {
    return mavenProject;
  }

  @Nonnull
  public List getSourceRoots() {
    return Collections.unmodifiableList(sourceRoots);
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy