Package org.eclipse.tycho.source
Class OsgiSourceMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.eclipse.tycho.source.AbstractSourceJarMojo
-
- org.eclipse.tycho.source.OsgiSourceMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled
,org.apache.maven.plugin.Mojo
@Mojo(name="plugin-source", defaultPhase=PREPARE_PACKAGE) public class OsgiSourceMojo extends AbstractSourceJarMojo
Goal to create a JAR-package containing all the source files of a osgi project.
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
requireSourceRoots
Whether source folders are required or not.protected boolean
strictSrcIncludes
If set totrue
(the default), missing build.properties src.includes will cause build failure.protected boolean
useDefaultSourceExcludes
Whether default source excludes for SCM files defined in {@see AbstractScanner#DEFAULTEXCLUDES} should be used.-
Fields inherited from class org.eclipse.tycho.source.AbstractSourceJarMojo
excludeResources, finalName, includePom, outputDirectory, project, reactorProjects, session
-
-
Constructor Summary
Constructors Constructor Description OsgiSourceMojo()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
getClassifier()
protected List<org.apache.maven.model.Resource>
getResources(org.apache.maven.project.MavenProject p)
protected List<org.apache.maven.model.Resource>
getSources(org.apache.maven.project.MavenProject p)
protected List<org.apache.maven.model.Resource>
getSources(org.apache.maven.project.MavenProject p, boolean requireSourceRoots, BuildProperties buildProperties)
protected boolean
isRelevantProject(org.apache.maven.project.MavenProject project)
protected static boolean
isRelevantProjectImpl(org.apache.maven.project.MavenProject project, BuildPropertiesParser buildPropertiesParser)
protected Properties
readL10nProps(OsgiManifest manifest)
protected void
updateSourceManifest(org.apache.maven.archiver.MavenArchiveConfiguration mavenArchiveConfiguration)
-
Methods inherited from class org.eclipse.tycho.source.AbstractSourceJarMojo
addDirectory, addDirectory, archiveProjectContent, createArchiver, execute, getExtension, getProject, getType, packageSources, packageSources
-
-
-
-
Field Detail
-
useDefaultSourceExcludes
@Parameter(defaultValue="true") protected boolean useDefaultSourceExcludes
Whether default source excludes for SCM files defined in {@see AbstractScanner#DEFAULTEXCLUDES} should be used.
-
requireSourceRoots
@Parameter(defaultValue="false", readonly=true) protected boolean requireSourceRoots
Whether source folders are required or not. If not required (the default), projects without source folders/source includes will be silently ignored.
-
strictSrcIncludes
@Parameter(defaultValue="true") protected boolean strictSrcIncludes
If set totrue
(the default), missing build.properties src.includes will cause build failure. If set tofalse
, missing build.properties src.includes will be reported as warnings but the build will not fail.
-
-
Method Detail
-
getSources
protected List<org.apache.maven.model.Resource> getSources(org.apache.maven.project.MavenProject p) throws org.apache.maven.plugin.MojoExecutionException
- Specified by:
getSources
in classAbstractSourceJarMojo
- Parameters:
p
- not null- Returns:
- the compile or test sources
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
getSources
protected List<org.apache.maven.model.Resource> getSources(org.apache.maven.project.MavenProject p, boolean requireSourceRoots, BuildProperties buildProperties) throws org.apache.maven.plugin.MojoExecutionException
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
getResources
protected List<org.apache.maven.model.Resource> getResources(org.apache.maven.project.MavenProject p) throws org.apache.maven.plugin.MojoExecutionException
- Specified by:
getResources
in classAbstractSourceJarMojo
- Parameters:
p
- not null- Returns:
- the compile or test resources
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
readL10nProps
protected Properties readL10nProps(OsgiManifest manifest) throws org.apache.maven.plugin.MojoExecutionException
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
getClassifier
protected String getClassifier()
- Specified by:
getClassifier
in classAbstractSourceJarMojo
- Returns:
- the wanted classifier, ie
sources
ortest-sources
-
updateSourceManifest
protected void updateSourceManifest(org.apache.maven.archiver.MavenArchiveConfiguration mavenArchiveConfiguration)
- Overrides:
updateSourceManifest
in classAbstractSourceJarMojo
-
isRelevantProject
protected boolean isRelevantProject(org.apache.maven.project.MavenProject project)
- Specified by:
isRelevantProject
in classAbstractSourceJarMojo
-
isRelevantProjectImpl
protected static boolean isRelevantProjectImpl(org.apache.maven.project.MavenProject project, BuildPropertiesParser buildPropertiesParser)
-
-