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) public class PackageFeatureMojo extends AbstractTychoPackagingMojo
-
-
Field Summary
Fields Modifier and Type Field Description private org.apache.maven.archiver.MavenArchiveConfigurationarchiveThe maven archiver to use.private java.io.Filebasedirprivate BuildPropertiesParserbuildPropertiesParserprivate booleandeployableFeatureIf set totrue, standard eclipse update site directory with feature content will be created under target folder.private static java.lang.StringFEATURE_PROPERTIESprivate FeatureXmlTransformerfeatureXmlTransformerprivate java.lang.StringfinalNameName of the generated JAR.private LicenseFeatureHelperlicenseFeatureHelperprivate java.io.FileoutputDirectoryThe output directory of the jar file By default this is the Maven target/ directory.private java.io.Filetarget-
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 voidappendToOrAddFeatureProperties(java.io.File targetFeatureProperties, java.io.File licenseFeature)private voidassembleDeployableFeature()voidexecute()private voidexpandVersionQualifiers(Feature feature)private java.io.FilegetFeatureProperties(java.io.File licenseFeature, BuildProperties buildProperties)private org.codehaus.plexus.archiver.jar.JarArchivergetJarArchiver()private org.codehaus.plexus.archiver.FileSetgetManuallyIncludedFiles(BuildProperties buildProperties)private voidupdateLicenseProperties(Feature feature, java.io.File licenseFeatureFile)-
Methods inherited from class org.eclipse.tycho.packaging.AbstractTychoPackagingMojo
checkBinIncludesExist, getDependencyArtifacts, getDependencyWalker, getFileSet, getTychoProjectFacet, getTychoProjectFacet
-
-
-
-
Field Detail
-
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 theaddMavenDescriptorflag, 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 finalNameName 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.MojoExecutionExceptionorg.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
FileSetincluding 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
-
-