Class IncludeArtifactMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.apache.sling.feature.maven.mojos.AbstractFeatureMojo
-
- org.apache.sling.feature.maven.mojos.AbstractIncludingFeatureMojo
-
- org.apache.sling.feature.maven.mojos.IncludeArtifactMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
@Mojo(name="include-artifact", defaultPhase=PREPARE_PACKAGE, requiresDependencyResolution=COMPILE, threadSafe=true) public class IncludeArtifactMojo extends AbstractIncludingFeatureMojoThis goal creates a Feature Model file that includes the Module Artifact as bundle (or extension) so that the Artifact can be added through a FM into a FM project. The FM file can be found in the 'build directory'/slingfeature-tmp folder. After a FM file is created successfully this file will be installed in the local Maven Repository as 'slingosgifeature' file under the Module's Maven Id location (group, artifact, version). This file can then later be used inside the 'aggregate-features' goal with:<includeArtifact> <groupId>org.apache.sling</groupId> <artifactId>org.apache.sling.test.feature</artifactId> <version>1.0.0</version> <classifier>my-test-classifier</classifier> <type>slingosgifeature</type> </includeArtifact>It also can add dependencies to the FM file if its scope is provided (normally that would be 'compile'). In addition a bundle start order can be set for these included dependency bundles. Finally any FM files inside the Source FM folder are embedded into the FM file. This allows to add extension files like 'repoinit' etc to be added to provide them with the module.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.sling.feature.maven.mojos.AbstractIncludingFeatureMojo
AbstractIncludingFeatureMojo.FeatureScanner
-
Nested classes/interfaces inherited from class org.apache.sling.feature.maven.mojos.AbstractFeatureMojo
AbstractFeatureMojo.BaseArtifactProvider, AbstractFeatureMojo.BaseFeatureProvider
-
-
Field Summary
Fields Modifier and Type Field Description static StringCFG_CLASSIFIERstatic StringCFG_INCLUDE_DEPENDENCIES_WITH_SCOPEstatic StringCFG_START_ORDERprotected org.apache.maven.shared.transfer.artifact.install.ArtifactInstallerinstaller-
Fields inherited from class org.apache.sling.feature.maven.mojos.AbstractFeatureMojo
defaultMetadata, features, jarStartOrder, mavenSession, project, projectHelper
-
-
Constructor Summary
Constructors Constructor Description IncludeArtifactMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecute()-
Methods inherited from class org.apache.sling.feature.maven.mojos.AbstractIncludingFeatureMojo
getSelectedFeatures, selectAllFeatureFiles, selectAllFeatureFilesAndAggregates
-
Methods inherited from class org.apache.sling.feature.maven.mojos.AbstractFeatureMojo
checkPreconditions, getTmpDir
-
-
-
-
Field Detail
-
CFG_CLASSIFIER
public static final String CFG_CLASSIFIER
- See Also:
- Constant Field Values
-
CFG_START_ORDER
public static final String CFG_START_ORDER
- See Also:
- Constant Field Values
-
CFG_INCLUDE_DEPENDENCIES_WITH_SCOPE
public static final String CFG_INCLUDE_DEPENDENCIES_WITH_SCOPE
- See Also:
- Constant Field Values
-
installer
@Component protected org.apache.maven.shared.transfer.artifact.install.ArtifactInstaller installer
-
-