Package org.eclipse.tycho.source
Class SourceFeatureMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.eclipse.tycho.source.SourceFeatureMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
@Mojo(name="feature-source",
defaultPhase=PACKAGE,
threadSafe=true)
public class SourceFeatureMojo
extends org.apache.maven.plugin.AbstractMojo
Generates a source feature for projects of packaging type
eclipse-feature. By
default, the generated source feature
- Declares feature id
<originalFeatureId>.source - Declares feature label
"<originalFeatureLabel> Developer Resources" - If present, reuses feature provider, description, copyright and license as well as respective URLs from <originalFeature>
- Includes all plugins included by <originalFeature>, but each with
.sourceappended to each plugin id - Includes all features included by <originalFeature>, but each with
.sourceappended to each feature id - Includes the original feature. This ensures that binaries and corresponding sources match.
sourceTemplateFeature/. Files added here will be added to the root of the source
feature jar. Especially, if file sourceTemplateFeature/feature.properties is found,
values in this file override values of respective keys in
<originalFeature>/feature.properties.-
Nested Class Summary
Nested Classes -
Field Summary
FieldsFields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddPlugin(org.eclipse.tycho.model.Feature sourceFeature, P2ResolutionResult result, org.eclipse.tycho.model.PluginRef pluginRef) voidexecute()protected org.codehaus.plexus.archiver.FileSetprotected Fileprotected booleanvoidsetExcludes(org.codehaus.plexus.configuration.PlexusConfiguration excludes) voidsetPlugins(org.codehaus.plexus.configuration.PlexusConfiguration bundles) protected StringtoStrictVersionRange(String version) Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Field Details
-
FEATURE_TEMPLATE_DIR
- See Also:
-
SOURCES_FEATURE_CLASSIFIER
- See Also:
-
useDefaultExcludes
@Parameter(defaultValue="true") protected boolean useDefaultExcludes
-
-
Constructor Details
-
SourceFeatureMojo
public SourceFeatureMojo()
-
-
Method Details
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException- Throws:
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureException
-
isP2GenerationEnabled
protected boolean isP2GenerationEnabled() -
toStrictVersionRange
-
addPlugin
protected void addPlugin(org.eclipse.tycho.model.Feature sourceFeature, P2ResolutionResult result, org.eclipse.tycho.model.PluginRef pluginRef) -
getOutputJarFile
-
setExcludes
public void setExcludes(org.codehaus.plexus.configuration.PlexusConfiguration excludes) -
setPlugins
public void setPlugins(org.codehaus.plexus.configuration.PlexusConfiguration bundles) -
getFileSet
protected org.codehaus.plexus.archiver.FileSet getFileSet(File basedir, List<String> includes, List<String> excludes) - Returns:
- a
FileSetwith the given includes and excludes and the configured default excludes. An empty list of includes leads to an empty file set.
-