@Mojo(name="package-feature", defaultPhase=PACKAGE, requiresDependencyResolution=RUNTIME) public class PackageFeatureMojo extends AbstractTychoPackagingMojo
Modifier and Type | Field and Description |
---|---|
private org.apache.maven.archiver.MavenArchiveConfiguration |
archive
The maven archiver to use.
|
private java.io.File |
basedir |
private BuildPropertiesParser |
buildPropertiesParser |
private boolean |
deployableFeature
If set to
true , standard eclipse update site directory with feature content will
be created under target folder. |
private static java.lang.String |
FEATURE_PROPERTIES |
private FeatureXmlTransformer |
featureXmlTransformer |
private java.lang.String |
finalName
Name of the generated JAR.
|
private LicenseFeatureHelper |
licenseFeatureHelper |
private java.io.File |
outputDirectory
The output directory of the jar file
By default this is the Maven target/ directory.
|
private java.io.File |
target |
plexus, project, projectHelper, qualifier, session, strictBinIncludes, useDefaultExcludes
Constructor and Description |
---|
PackageFeatureMojo() |
Modifier and Type | Method and Description |
---|---|
private void |
appendToOrAddFeatureProperties(java.io.File targetFeatureProperties,
java.io.File licenseFeature) |
private void |
assembleDeployableFeature() |
void |
execute() |
private void |
expandVersionQualifiers(Feature feature) |
private java.io.File |
getFeatureProperties(java.io.File licenseFeature,
BuildProperties buildProperties) |
private org.codehaus.plexus.archiver.jar.JarArchiver |
getJarArchiver() |
private org.codehaus.plexus.archiver.FileSet |
getManuallyIncludedFiles(BuildProperties buildProperties) |
private void |
updateLicenseProperties(Feature feature,
java.io.File licenseFeatureFile) |
checkBinIncludesExist, getDependencyArtifacts, getDependencyWalker, getFileSet, getTychoProjectFacet, getTychoProjectFacet
private static final java.lang.String FEATURE_PROPERTIES
@Parameter private org.apache.maven.archiver.MavenArchiveConfiguration archive
addMavenDescriptor
flag, which indicates
whether the generated archive will contain the pom.xml and pom.properties file. If no archive
configuration is specified, the default value is false
. If the maven descriptor
should be added to the artifact, use the following configuration:
<plugin> <groupId>org.eclipse.tycho</groupId> <artifactId>tycho-packaging-plugin</artifactId> <version>${tycho-version}</version> <configuration> <archive> <addMavenDescriptor>true</addMavenDescriptor> </archive> </configuration> </plugin>
@Parameter(property="project.build.directory") private java.io.File outputDirectory
@Parameter(property="project.basedir") private java.io.File basedir
@Parameter(property="project.build.finalName", alias="jarName", required=true) private java.lang.String finalName
@Parameter(defaultValue="false") private boolean deployableFeature
true
, standard eclipse update site directory with feature content will
be created under target folder.@Parameter(defaultValue="${project.build.directory}/site") private java.io.File target
@Component private FeatureXmlTransformer featureXmlTransformer
@Component private LicenseFeatureHelper licenseFeatureHelper
@Component private BuildPropertiesParser buildPropertiesParser
public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
private void updateLicenseProperties(Feature feature, java.io.File licenseFeatureFile)
private java.io.File getFeatureProperties(java.io.File licenseFeature, BuildProperties buildProperties) throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
private void appendToOrAddFeatureProperties(java.io.File targetFeatureProperties, java.io.File licenseFeature) throws java.io.IOException
java.io.IOException
private org.codehaus.plexus.archiver.FileSet getManuallyIncludedFiles(BuildProperties buildProperties)
FileSet
including files as configured by the bin.includes and
bin.excludes properties without the files that are always included
automatically.private void assembleDeployableFeature() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
private void expandVersionQualifiers(Feature feature) throws org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoFailureException
private org.codehaus.plexus.archiver.jar.JarArchiver getJarArchiver() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException