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.AbstractMojoThis goal invokes the feature and bundle publisher on a folder.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.StringadditionalArgsOptional line of additional arguments passed to the p2 application launcher.private booleanappendOptional flag to append artifacts to an existing repositoryprivate java.lang.StringartifactRepositoryLocationLocation of the artifact repository to write.private booleancompressCreate compressed jars rather than plain xmlprivate static java.lang.StringCONTENT_PUBLISHER_APP_NAMEprivate intforkedProcessTimeoutInSecondsKill the forked process after a certain number of seconds.private P2ApplicationLauncherlauncherprivate java.lang.StringmetadataRepositoryLocationLocation of the metadata repository to write.private org.apache.maven.project.MavenProjectprojectprivate booleanpublishArtifactsPublish artifacts to repositoryprivate booleanreusePack200FilesOptional flag to include .pack.gz filesprivate java.lang.StringsourceLocationLocation 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 voidexecute()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 voidpublishContent()
-
-
-
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 metadataRepositoryLocationLocation 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 artifactRepositoryLocationLocation 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 sourceLocationLocation 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 forkedProcessTimeoutInSecondsKill 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.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureException
-
publishContent
private void publishContent() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException- Throws:
org.apache.maven.plugin.MojoExecutionExceptionorg.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
-
-