Class 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 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 the 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>
         
      • 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 to true, 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
    • Constructor Detail

      • PackageFeatureMojo

        public PackageFeatureMojo()
    • 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