Class AssembleRepositoryMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.eclipse.tycho.core.maven.AbstractP2Mojo
-
- org.eclipse.tycho.plugins.p2.repository.AbstractRepositoryMojo
-
- org.eclipse.tycho.plugins.p2.repository.AssembleRepositoryMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled
,org.apache.maven.plugin.Mojo
@Mojo(name="assemble-repository", defaultPhase=PACKAGE) public class AssembleRepositoryMojo extends AbstractRepositoryMojo
Aggregates content into a p2 repository in
${project.build.directory}/repository
.- Copies resources (if any) from
${project.build.outputDirectory}
to${project.build.directory}/repository
. This allows to include additional files such asindex.html
or about files fromsrc/main/resources
(or elsewhere) into the p2 repository. - The p2 aggregation into
${project.build.directory}/repository
runs recursively: it starts with the content published in the current module, and traverses all artifacts that are marked as included in already aggregated artifacts. (The following artifacts can include other artifacts: categories, products, and features. Note: Dependencies with a strict version range, i.e. a range which only matches exactly one version of an artifact, are also considered as inclusions.)
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
compress
Compress the repository index files content.xml and artifacts.xml.private boolean
createArtifactRepository
By default, this goal creates a p2 repository.private EclipseRepositoryProject
eclipseRepositoryProject
private java.util.Map<java.lang.String,java.lang.String>
extraArtifactRepositoryProperties
private boolean
includeAllDependencies
By default, only (transitive) inclusions of the published artifacts are aggregated.private boolean
keepNonXzIndexFiles
IfxzCompress
istrue
, whether jar or xml index files should be kept in addition to XZ-compressed index files.private EquinoxServiceFactory
p2
private java.util.Map<java.lang.String,java.lang.String>
profileProperties
Additional properties against which p2 filters are evaluated while aggregating.private java.lang.String
repositoryName
The name attribute stored in the created p2 repository.private RepositoryReferenceTool
repositoryReferenceTool
private boolean
xzCompress
Add XZ-compressed repository index files.
-
Constructor Summary
Constructors Constructor Description AssembleRepositoryMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
copyResources(java.io.File destination)
void
execute()
private java.util.List<Category>
getCategories()
protected RepositoryReferences
getVisibleRepositories()
-
Methods inherited from class org.eclipse.tycho.plugins.p2.repository.AbstractRepositoryMojo
getAssemblyRepositoryLocation
-
Methods inherited from class org.eclipse.tycho.core.maven.AbstractP2Mojo
getBuildContext, getBuildDirectory, getEnvironments, getProject, getProjectIdentities, getQualifier, getReactorProject, getSession
-
-
-
-
Field Detail
-
createArtifactRepository
@Parameter(defaultValue="true") private boolean createArtifactRepository
By default, this goal creates a p2 repository. Set this to
false
if only a p2 metadata repository (without the artifact files) shall be created.
-
includeAllDependencies
@Parameter(defaultValue="false") private boolean includeAllDependencies
By default, only (transitive) inclusions of the published artifacts are aggregated. Set this parameter to
true
to aggregate all transitive dependencies, making the resulting p2 repository self-contained.
-
compress
@Parameter(defaultValue="true") private boolean compress
Compress the repository index files content.xml and artifacts.xml.
-
xzCompress
@Parameter(defaultValue="true") private boolean xzCompress
Add XZ-compressed repository index files. XZ offers better compression ratios esp. for highly redundant file content.
-
keepNonXzIndexFiles
@Parameter(defaultValue="true") private boolean keepNonXzIndexFiles
If
xzCompress
istrue
, whether jar or xml index files should be kept in addition to XZ-compressed index files. This fallback provides backwards compatibility for pre-Mars p2 clients which cannot read XZ-compressed index files.
-
repositoryName
@Parameter(defaultValue="${project.name}") private java.lang.String repositoryName
The name attribute stored in the created p2 repository.
-
profileProperties
@Parameter private java.util.Map<java.lang.String,java.lang.String> profileProperties
Additional properties against which p2 filters are evaluated while aggregating.
-
extraArtifactRepositoryProperties
@Parameter private java.util.Map<java.lang.String,java.lang.String> extraArtifactRepositoryProperties
-
repositoryReferenceTool
@Component private RepositoryReferenceTool repositoryReferenceTool
-
p2
@Component private EquinoxServiceFactory p2
-
eclipseRepositoryProject
@Component(role=TychoProject.class, hint="eclipse-repository") private EclipseRepositoryProject eclipseRepositoryProject
-
-
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
-
copyResources
private void copyResources(java.io.File destination) throws org.apache.maven.plugin.MojoExecutionException
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
getVisibleRepositories
protected RepositoryReferences getVisibleRepositories() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
- Throws:
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
-
getCategories
private java.util.List<Category> getCategories()
-
-