@Mojo(name="product-export") public class ProductExportMojo extends AbstractTychoPackagingMojo
Modifier and Type | Field and Description |
---|---|
private boolean |
createProductArchive |
private TargetEnvironment[] |
environments
Deprecated.
use target-platform-configuration
|
private java.io.File |
expandedProductFile
Location of generated .product file with all versions replaced with their expanded values.
|
private FileLockService |
fileLockService |
private boolean |
forcePackedDependencies
If true, all included features and bundles will be packed.
|
private boolean |
includeSources |
private org.codehaus.plexus.logging.Logger |
logger |
private BundleReader |
manifestReader |
private java.io.File |
p2inf |
private ProductConfiguration |
productConfiguration
Parsed product configuration file
|
private java.io.File |
productConfigurationFile
The product configuration, a .product file.
|
private boolean |
separateEnvironments
If true (the default), produce separate directory structure for each supported runtime
environment.
|
plexus, project, projectHelper, qualifier, session, strictBinIncludes, useDefaultExcludes
Constructor and Description |
---|
ProductExportMojo() |
Modifier and Type | Method and Description |
---|---|
private void |
copyDirectory(java.io.File source,
java.io.File target,
java.lang.String excludes) |
private void |
copyExecutable(TargetEnvironment environment,
java.io.File target) |
private void |
createProductArchive(java.io.File target,
java.lang.String classifier) |
void |
execute() |
private void |
generateConfigIni(TargetEnvironment environment,
java.io.File target) |
private void |
generateDotEclipseProduct(java.io.File target) |
private void |
generateOSGiBundles(java.util.Properties props,
TargetEnvironment environment) |
private java.util.Map<java.lang.String,PluginDescription> |
getBundles(TargetEnvironment environment) |
private java.lang.String |
getConfig(TargetEnvironment environment) |
private ArtifactDependencyWalker |
getDependencyWalker(TargetEnvironment environment) |
private java.util.List<TargetEnvironment> |
getEnvironments() |
private java.io.File |
getLauncher(TargetEnvironment environment,
java.io.File target) |
private java.io.File |
getTarget(TargetEnvironment environment) |
private void |
handleRootEntry(java.io.File target,
java.lang.String rootFileEntries,
java.lang.String subFolder) |
private void |
includeRootFiles(TargetEnvironment environment,
java.io.File target)
Root files are files that must be packaged with an Eclipse install but are not features or
plug-ins.
|
private java.lang.StringBuffer |
readFileToString(java.io.File iniFile) |
private java.lang.String |
removeFirstSegment(java.lang.String path) |
private void |
setPropertyIfNotNull(java.util.Properties properties,
java.lang.String key,
java.lang.String value) |
private java.lang.String |
toString(TargetEnvironment environment) |
private void |
unzipDirectory(java.io.File source,
java.lang.String sourceRelPath,
java.io.File target,
java.lang.String excludes) |
private void |
writeStringToFile(java.io.File iniFile,
java.lang.String string) |
checkBinIncludesExist, getDependencyArtifacts, getDependencyWalker, getFileSet, getTychoProjectFacet, getTychoProjectFacet
@Parameter(property="productConfiguration", defaultValue="${project.basedir}/${project.artifactId}.product") private java.io.File productConfigurationFile
@Parameter(defaultValue="${productConfiguration}/../p2.inf") private java.io.File p2inf
@Parameter(defaultValue="${project.build.directory}/${project.artifactId}.product") private java.io.File expandedProductFile
private ProductConfiguration productConfiguration
@Parameter private TargetEnvironment[] environments
@Parameter(property="tycho.product.createArchive", defaultValue="true") private boolean createProductArchive
@Parameter(defaultValue="false") private boolean includeSources
@Parameter(defaultValue="true") private boolean separateEnvironments
@Parameter(defaultValue="false") private boolean forcePackedDependencies
@Component private BundleReader manifestReader
@Component private org.codehaus.plexus.logging.Logger logger
@Component private FileLockService fileLockService
public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
private ArtifactDependencyWalker getDependencyWalker(TargetEnvironment environment)
private java.util.List<TargetEnvironment> getEnvironments()
private java.io.File getTarget(TargetEnvironment environment)
private java.lang.String toString(TargetEnvironment environment)
private void includeRootFiles(TargetEnvironment environment, java.io.File target) throws org.apache.maven.plugin.MojoExecutionException
root= root.Not supported are the properties root.permissions and root.link.= root.folder. = root. .folder. =
org.apache.maven.plugin.MojoExecutionException
://help.eclipse.org/ganymede/index.jsp?topic=/org.eclipse.pde.doc.user/tasks/pde_rootfiles
.htm
private void handleRootEntry(java.io.File target, java.lang.String rootFileEntries, java.lang.String subFolder) throws org.apache.maven.plugin.MojoExecutionException
rootFileEntry
- files and directories seperated by semicolons, the syntax is:
subFolder
- the sub folder to which the root file entries are copied toorg.apache.maven.plugin.MojoExecutionException
private java.lang.String getConfig(TargetEnvironment environment)
private void createProductArchive(java.io.File target, java.lang.String classifier) throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
private void generateDotEclipseProduct(java.io.File target) throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
private void generateConfigIni(TargetEnvironment environment, java.io.File target) throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
private void generateOSGiBundles(java.util.Properties props, TargetEnvironment environment) throws org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoFailureException
private java.util.Map<java.lang.String,PluginDescription> getBundles(TargetEnvironment environment)
private void copyExecutable(TargetEnvironment environment, java.io.File target) throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
private void writeStringToFile(java.io.File iniFile, java.lang.String string) throws java.io.IOException
java.io.IOException
private java.lang.StringBuffer readFileToString(java.io.File iniFile) throws java.io.IOException
java.io.IOException
private void unzipDirectory(java.io.File source, java.lang.String sourceRelPath, java.io.File target, java.lang.String excludes) throws java.io.IOException
java.io.IOException
private void copyDirectory(java.io.File source, java.io.File target, java.lang.String excludes) throws java.io.IOException
java.io.IOException
private java.lang.String removeFirstSegment(java.lang.String path)
private java.io.File getLauncher(TargetEnvironment environment, java.io.File target) throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
private void setPropertyIfNotNull(java.util.Properties properties, java.lang.String key, java.lang.String value)