Package org.eclipse.tycho.packaging
Class PackageFeatureMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.eclipse.tycho.packaging.AbstractTychoPackagingMojo
-
- org.eclipse.tycho.packaging.PackageFeatureMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled
,org.apache.maven.plugin.Mojo
@Mojo(name="package-feature", defaultPhase=PACKAGE, requiresDependencyResolution=RUNTIME, threadSafe=true) public class PackageFeatureMojo extends AbstractTychoPackagingMojo
-
-
Field Summary
Fields Modifier and Type Field 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 totrue
, 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 static java.lang.Object
LOCK
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
-
Fields inherited from class org.eclipse.tycho.packaging.AbstractTychoPackagingMojo
plexus, project, projectHelper, qualifier, session, strictBinIncludes, useDefaultExcludes
-
-
Constructor Summary
Constructors Constructor Description PackageFeatureMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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)
-
Methods inherited from class org.eclipse.tycho.packaging.AbstractTychoPackagingMojo
checkBinIncludesExist, getDependencyArtifacts, getDependencyWalker, getFileSet, getTychoProjectFacet, getTychoProjectFacet
-
-
-
-
Field Detail
-
LOCK
private static final java.lang.Object LOCK
-
FEATURE_PROPERTIES
private static final java.lang.String FEATURE_PROPERTIES
- See Also:
- Constant Field Values
-
archive
@Parameter private org.apache.maven.archiver.MavenArchiveConfiguration archive
The maven archiver to use. One of the archiver properties is theaddMavenDescriptor
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 isfalse
. 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>
-
outputDirectory
@Parameter(property="project.build.directory") private java.io.File outputDirectory
The output directory of the jar file By default this is the Maven target/ directory.
-
basedir
@Parameter(property="project.basedir") private java.io.File basedir
-
finalName
@Parameter(property="project.build.finalName", alias="jarName", required=true) private java.lang.String finalName
Name of the generated JAR.
-
deployableFeature
@Parameter(defaultValue="false") private boolean deployableFeature
If set totrue
, standard eclipse update site directory with feature content will be created under target folder.
-
target
@Parameter(defaultValue="${project.build.directory}/site") private java.io.File target
-
featureXmlTransformer
@Component private FeatureXmlTransformer featureXmlTransformer
-
licenseFeatureHelper
@Component private LicenseFeatureHelper licenseFeatureHelper
-
buildPropertiesParser
@Component private BuildPropertiesParser buildPropertiesParser
-
-
Method Detail
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
- Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
-
updateLicenseProperties
private void updateLicenseProperties(Feature feature, java.io.File licenseFeatureFile)
-
getFeatureProperties
private java.io.File getFeatureProperties(java.io.File licenseFeature, BuildProperties buildProperties) throws org.apache.maven.plugin.MojoExecutionException
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
appendToOrAddFeatureProperties
private void appendToOrAddFeatureProperties(java.io.File targetFeatureProperties, java.io.File licenseFeature) throws java.io.IOException
- Throws:
java.io.IOException
-
getManuallyIncludedFiles
private org.codehaus.plexus.archiver.FileSet getManuallyIncludedFiles(BuildProperties buildProperties)
- Returns:
- A
FileSet
including files as configured by the bin.includes and bin.excludes properties without the files that are always included automatically.
-
assembleDeployableFeature
private void assembleDeployableFeature() throws org.apache.maven.plugin.MojoExecutionException
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
expandVersionQualifiers
private void expandVersionQualifiers(Feature feature) throws org.apache.maven.plugin.MojoFailureException
- Throws:
org.apache.maven.plugin.MojoFailureException
-
getJarArchiver
private org.codehaus.plexus.archiver.jar.JarArchiver getJarArchiver() throws org.apache.maven.plugin.MojoExecutionException
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
-