Class PublishFeaturesAndBundlesMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.eclipse.tycho.plugins.p2.extras.PublishFeaturesAndBundlesMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled
,org.apache.maven.plugin.Mojo
@Mojo(name="publish-features-and-bundles") public class PublishFeaturesAndBundlesMojo extends org.apache.maven.plugin.AbstractMojo
This goal invokes the feature and bundle publisher on a folder.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
additionalArgs
Optional line of additional arguments passed to the p2 application launcher.private boolean
append
Optional flag to append artifacts to an existing repositoryprivate java.lang.String
artifactRepositoryLocation
Location of the artifact repository to write.private boolean
compress
Create compressed jars rather than plain xmlprivate static java.lang.String
CONTENT_PUBLISHER_APP_NAME
private int
forkedProcessTimeoutInSeconds
Kill the forked process after a certain number of seconds.private P2ApplicationLauncher
launcher
private java.lang.String
metadataRepositoryLocation
Location of the metadata repository to write.private org.apache.maven.project.MavenProject
project
private boolean
publishArtifacts
Publish artifacts to repositoryprivate boolean
reusePack200Files
Optional flag to include .pack.gz filesprivate java.lang.String
sourceLocation
Location with features and/or plugins directories on which the features and bundles publisher shall be called.
-
Constructor Summary
Constructors Constructor Description PublishFeaturesAndBundlesMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
execute()
private java.lang.String[]
getAdditionalArgs()
private java.lang.String[]
getAppendFlag()
private java.lang.String[]
getCompressFlag()
private java.lang.String[]
getPublishArtifactFlag()
private java.lang.String[]
getReusePack200FilesFlag()
private void
publishContent()
-
-
-
Field Detail
-
CONTENT_PUBLISHER_APP_NAME
private static java.lang.String CONTENT_PUBLISHER_APP_NAME
-
metadataRepositoryLocation
@Parameter(defaultValue="${project.build.directory}/repository") private java.lang.String metadataRepositoryLocation
Location of the metadata repository to write. The AssembleRepositoryMojo of tycho-p2-repository-plugin will only work with the predefined default ${project.build.directory}/repository.
-
artifactRepositoryLocation
@Parameter(defaultValue="${project.build.directory}/repository") private java.lang.String artifactRepositoryLocation
Location of the artifact repository to write. Note: The AssembleRepositoryMojo of tycho-p2-repository-plugin will only work with the predefined default ${project.build.directory}/repository.
-
sourceLocation
@Parameter(defaultValue="${project.build.directory}/source") private java.lang.String sourceLocation
Location with features and/or plugins directories on which the features and bundles publisher shall be called.
-
compress
@Parameter(defaultValue="true") private boolean compress
Create compressed jars rather than plain xml
-
append
@Parameter(defaultValue="false") private boolean append
Optional flag to append artifacts to an existing repository
-
publishArtifacts
@Parameter(defaultValue="true") private boolean publishArtifacts
Publish artifacts to repository
-
reusePack200Files
@Parameter(defaultValue="false") private boolean reusePack200Files
Optional flag to include .pack.gz files
-
additionalArgs
@Parameter(defaultValue="") private java.lang.String additionalArgs
Optional line of additional arguments passed to the p2 application launcher.
-
forkedProcessTimeoutInSeconds
@Parameter(property="p2.timeout", defaultValue="0") private int forkedProcessTimeoutInSeconds
Kill the forked process after a certain number of seconds. If set to 0, wait forever for the process, never timing out.
-
project
@Parameter(property="project") private org.apache.maven.project.MavenProject project
-
launcher
@Component private P2ApplicationLauncher launcher
-
-
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
-
publishContent
private void publishContent() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
- Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
-
getCompressFlag
private java.lang.String[] getCompressFlag()
- Returns:
- The '-compress' flag or empty if we don't want to compress.
-
getAppendFlag
private java.lang.String[] getAppendFlag()
- Returns:
- The '-append' flag or empty if we don't want to append.
-
getPublishArtifactFlag
private java.lang.String[] getPublishArtifactFlag()
- Returns:
- The '-publishArtifacts' flag or empty if we don't want to publish artifacts.
-
getReusePack200FilesFlag
private java.lang.String[] getReusePack200FilesFlag()
- Returns:
- The '-reusePack200Files' flag or empty if we don't want to include .pack.gz files.
-
getAdditionalArgs
private java.lang.String[] getAdditionalArgs() throws org.apache.maven.plugin.MojoExecutionException
- Returns:
- array of parsed space separated list of additional arguments. Empty array if not defined.
- Throws:
org.apache.maven.plugin.MojoExecutionException
- is thrown if parsing of additional arguments fails
-
-