Class ProductExportMojo

  • All Implemented Interfaces:
    org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo

    @Mojo(name="product-export")
    public class ProductExportMojo
    extends AbstractTychoPackagingMojo
    • Field Detail

      • productConfigurationFile

        @Parameter(property="productConfiguration",
                   defaultValue="${project.basedir}/${project.artifactId}.product")
        private java.io.File productConfigurationFile
        The product configuration, a .product file. This file manages all aspects of a product definition from its constituent plug-ins to configuration files to branding.
      • p2inf

        @Parameter(defaultValue="${productConfiguration}/../p2.inf")
        private java.io.File p2inf
      • expandedProductFile

        @Parameter(defaultValue="${project.build.directory}/${project.artifactId}.product")
        private java.io.File expandedProductFile
        Location of generated .product file with all versions replaced with their expanded values.
      • productConfiguration

        private ProductConfiguration productConfiguration
        Parsed product configuration file
      • environments

        @Parameter
        private TargetEnvironment[] environments
        Deprecated.
        use target-platform-configuration element
      • createProductArchive

        @Parameter(property="tycho.product.createArchive",
                   defaultValue="true")
        private boolean createProductArchive
      • includeSources

        @Parameter(defaultValue="false")
        private boolean includeSources
      • separateEnvironments

        @Parameter(defaultValue="true")
        private boolean separateEnvironments
        If true (the default), produce separate directory structure for each supported runtime environment.
      • forcePackedDependencies

        @Parameter(defaultValue="false")
        private boolean forcePackedDependencies
        If true, all included features and bundles will be packed. If false (the default), all features will be unpacked and bundles will honour unpack value of element.
      • manifestReader

        @Component
        private BundleReader manifestReader
    • Constructor Detail

      • ProductExportMojo

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

        private void includeRootFiles​(TargetEnvironment environment,
                                      java.io.File target)
                               throws org.apache.maven.plugin.MojoExecutionException
        Root files are files that must be packaged with an Eclipse install but are not features or plug-ins. These files are added to the root or to a specified sub folder of the build.
         root=
         root.=
         root.folder.=
         root..folder.=
         
        Not supported are the properties root.permissions and root.link.
        Throws:
        org.apache.maven.plugin.MojoExecutionException
        See Also:
        ://help.eclipse.org/ganymede/index.jsp?topic=/org.eclipse.pde.doc.user/tasks/pde_rootfiles .htm
      • handleRootEntry

        private void handleRootEntry​(java.io.File target,
                                     java.lang.String rootFileEntries,
                                     java.lang.String subFolder)
                              throws org.apache.maven.plugin.MojoExecutionException
        Parameters:
        rootFileEntry - files and directories seperated by semicolons, the syntax is:
        • for a relative file: file:license.html,...
        • for a absolute file: absolute:file:/eclipse/about.html,...
        • for a relative folder: rootfiles,...
        • for a absolute folder: absolute:/eclipse/rootfiles,...
        subFolder - the sub folder to which the root file entries are copied to
        Throws:
        org.apache.maven.plugin.MojoExecutionException
      • createProductArchive

        private void createProductArchive​(java.io.File target,
                                          java.lang.String classifier)
                                   throws org.apache.maven.plugin.MojoExecutionException
        Throws:
        org.apache.maven.plugin.MojoExecutionException
      • generateDotEclipseProduct

        private void generateDotEclipseProduct​(java.io.File target)
                                        throws org.apache.maven.plugin.MojoExecutionException
        Throws:
        org.apache.maven.plugin.MojoExecutionException
      • generateConfigIni

        private void generateConfigIni​(TargetEnvironment environment,
                                       java.io.File target)
                                throws org.apache.maven.plugin.MojoExecutionException,
                                       org.apache.maven.plugin.MojoFailureException
        Throws:
        org.apache.maven.plugin.MojoExecutionException
        org.apache.maven.plugin.MojoFailureException
      • generateOSGiBundles

        private void generateOSGiBundles​(java.util.Properties props,
                                         TargetEnvironment environment)
                                  throws org.apache.maven.plugin.MojoFailureException
        Throws:
        org.apache.maven.plugin.MojoFailureException
      • copyExecutable

        private void copyExecutable​(TargetEnvironment environment,
                                    java.io.File target)
                             throws org.apache.maven.plugin.MojoExecutionException,
                                    org.apache.maven.plugin.MojoFailureException
        Throws:
        org.apache.maven.plugin.MojoExecutionException
        org.apache.maven.plugin.MojoFailureException
      • writeStringToFile

        private void writeStringToFile​(java.io.File iniFile,
                                       java.lang.String string)
                                throws java.io.IOException
        Throws:
        java.io.IOException
      • readFileToString

        private java.lang.StringBuffer readFileToString​(java.io.File iniFile)
                                                 throws java.io.IOException
        Throws:
        java.io.IOException
      • unzipDirectory

        private void unzipDirectory​(java.io.File source,
                                    java.lang.String sourceRelPath,
                                    java.io.File target,
                                    java.lang.String excludes)
                             throws java.io.IOException
        Throws:
        java.io.IOException
      • copyDirectory

        private void copyDirectory​(java.io.File source,
                                   java.io.File target,
                                   java.lang.String excludes)
                            throws java.io.IOException
        Throws:
        java.io.IOException
      • removeFirstSegment

        private java.lang.String removeFirstSegment​(java.lang.String path)
      • getLauncher

        private java.io.File getLauncher​(TargetEnvironment environment,
                                         java.io.File target)
                                  throws org.apache.maven.plugin.MojoExecutionException
        Throws:
        org.apache.maven.plugin.MojoExecutionException
      • setPropertyIfNotNull

        private void setPropertyIfNotNull​(java.util.Properties properties,
                                          java.lang.String key,
                                          java.lang.String value)