Package org.eclipse.tycho.packaging
Class PackagePluginMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.eclipse.tycho.packaging.AbstractTychoPackagingMojo
-
- org.eclipse.tycho.packaging.PackagePluginMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
@Mojo(name="package-plugin") public class PackagePluginMojo extends AbstractTychoPackagingMojo
Creates a jar-based plugin and attaches it as an artifact
-
-
Field Summary
Fields Modifier and Type Field Description private org.codehaus.plexus.archiver.util.DefaultFileSet[]additionalFileSetsAdditional files to be included in the bundle jar.private org.apache.maven.archiver.MavenArchiveConfigurationarchiveThe maven archiver to use.protected java.io.FilebuildDirectoryThe output directory of the jar file By default this is the Maven "target/" directory.protected java.lang.StringfinalNameName of the generated JAR.private org.codehaus.plexus.archiver.jar.JarArchiverjarArchiverThe Jar archiver.protected EclipsePluginProjectpdeProjectprivate SourceReferencessourceReferencesWhether to generate an Eclipse-SourceReferences MANIFEST header.private SourceReferenceComputersoureReferenceComputer-
Fields inherited from class org.eclipse.tycho.packaging.AbstractTychoPackagingMojo
plexus, project, projectHelper, qualifier, session, strictBinIncludes, useDefaultExcludes
-
-
Constructor Summary
Constructors Constructor Description PackagePluginMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private java.io.FilecreatePluginJar()private voidcreateSubJars()voidexecute()private java.io.FilemakeJar(BuildOutputJar jar)private java.io.FileupdateManifest()-
Methods inherited from class org.eclipse.tycho.packaging.AbstractTychoPackagingMojo
checkBinIncludesExist, getDependencyArtifacts, getDependencyWalker, getFileSet, getTychoProjectFacet, getTychoProjectFacet
-
-
-
-
Field Detail
-
buildDirectory
@Parameter(property="project.build.directory", required=true) protected java.io.File buildDirectoryThe output directory of the jar file By default this is the Maven "target/" directory.
-
pdeProject
protected EclipsePluginProject pdeProject
-
jarArchiver
@Component(role=org.codehaus.plexus.archiver.Archiver.class, hint="jar") private org.codehaus.plexus.archiver.jar.JarArchiver jarArchiverThe Jar archiver.
-
additionalFileSets
@Parameter private org.codehaus.plexus.archiver.util.DefaultFileSet[] additionalFileSets
Additional files to be included in the bundle jar. This can be used when bin.includes in build.properties is not flexible enough , e.g. for generated files. If conflicting, additional files win over bin.includes
Example:
<additionalFileSets> <fileSet> <directory>${project.build.directory}/mytool-gen/</directory> <includes> <include>**/*</include> </includes> </fileSet> </additionalFileSets>
-
finalName
@Parameter(property="project.build.finalName", alias="jarName", required=true) protected java.lang.String finalNameName of the generated JAR.
-
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 istrue. If the maven descriptor should not 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>false</addMavenDescriptor> </archive> </configuration> </plugin>
-
sourceReferences
@Parameter private SourceReferences sourceReferences
Whether to generate an Eclipse-SourceReferences MANIFEST header. When using this parameter, property ${tycho.scmUrl} must be set and be a valid maven SCM URL. Example configuration:<sourceReferences> <generate>true</generate> </sourceReferences>Note that aSourceReferencesProvidercomponent must be registered for the SCM type being used. You may also override the generated value by configuring:<sourceReferences> <generate>true</generate> <customValue>scm:myscm:customSourceReferenceValue</customValue> </sourceReferences>
-
soureReferenceComputer
@Component private SourceReferenceComputer soureReferenceComputer
-
-
Method Detail
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException- Throws:
org.apache.maven.plugin.MojoExecutionException
-
createSubJars
private void createSubJars() throws org.apache.maven.plugin.MojoExecutionException- Throws:
org.apache.maven.plugin.MojoExecutionException
-
makeJar
private java.io.File makeJar(BuildOutputJar jar) throws org.apache.maven.plugin.MojoExecutionException
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
createPluginJar
private java.io.File createPluginJar() throws org.apache.maven.plugin.MojoExecutionException- Throws:
org.apache.maven.plugin.MojoExecutionException
-
updateManifest
private java.io.File updateManifest() throws java.io.IOException, org.apache.maven.plugin.MojoExecutionException- Throws:
java.io.IOExceptionorg.apache.maven.plugin.MojoExecutionException
-
-