@Mojo(name="mirror")
public class MirrorMojo
extends org.apache.maven.plugin.AbstractMojo
Modifier and Type | Field and Description |
---|---|
private boolean |
append
Whether to append to an existing destination repository.
|
private boolean |
compress
Whether to compress the destination repository metadata files (artifacts.xml, content.xml).
|
private boolean |
currentModuleAsSource
Whether the current build p2 output should be added as source.
|
private java.io.File |
destination
The destination directory to mirror to.
|
private java.util.Map<java.lang.String,java.lang.String> |
filter
Filter properties.
|
private boolean |
followOnlyFilteredRequirements
Follow only requirements which match the filter specified.
|
private boolean |
followStrictOnly
Set to true if only strict dependencies should be followed.
|
private boolean |
ignoreErrors
If set to true, mirroring continues to run in the event of an error during the mirroring
process and will just log an info message.
|
private boolean |
includeFeatures
Whether or not to include features.
|
private boolean |
includeNonGreedy
Whether or not to follow non-greedy requirements.
|
private boolean |
includeOptional
Whether or not to follow optional requirements.
|
private boolean |
includePacked
Whether or not to include pack200 artifacts.
|
private java.util.List<Iu> |
ius
(Optional) Which IUs to mirror.
|
private boolean |
keepNonXzIndexFiles
If
xzCompress is true , whether jar or xml index files should be kept in
addition to XZ-compressed index files. |
private boolean |
latestVersionOnly
Set to
true to filter the resulting set of IUs to only include the latest
version of each Installable Unit only. |
private boolean |
mirrorMetadataOnly
Whether to mirror metadata only (no artifacts).
|
private java.lang.String |
name
The target repository name.
|
private org.eclipse.sisu.equinox.EquinoxServiceFactory |
p2 |
private org.apache.maven.project.MavenProject |
project |
private java.util.Map<java.lang.String,org.eclipse.tycho.core.TychoProject> |
projectTypes |
private org.eclipse.tycho.p2.facade.RepositoryReferenceTool |
repositoryReferenceTool |
private org.apache.maven.execution.MavenSession |
session |
private java.util.List<Repository> |
source
Source repositori(es) to mirror from.
|
private boolean |
targetPlatformAsSource
Whether to add the target-platform content as a source.
|
private boolean |
xzCompress
Add XZ-compressed repository index files.
|
Constructor and Description |
---|
MirrorMojo() |
Modifier and Type | Method and Description |
---|---|
private java.util.Collection<org.eclipse.tycho.p2.tools.mirroring.facade.IUDescription> |
createIUDescriptions() |
private org.eclipse.tycho.p2.tools.mirroring.facade.MirrorOptions |
createMirrorOptions() |
void |
execute() |
private org.eclipse.tycho.BuildOutputDirectory |
getBuildOutputDirectory() |
@Parameter(property="project", readonly=true) private org.apache.maven.project.MavenProject project
@Parameter(property="session", readonly=true) private org.apache.maven.execution.MavenSession session
@Component private org.eclipse.sisu.equinox.EquinoxServiceFactory p2
@Component private org.eclipse.tycho.p2.facade.RepositoryReferenceTool repositoryReferenceTool
@Component(role=org.eclipse.tycho.core.TychoProject.class) private java.util.Map<java.lang.String,org.eclipse.tycho.core.TychoProject> projectTypes
@Parameter(required=false) private java.util.List<Repository> source
{@link #targetPlatformAsSource} and {@link #currentModuleAsSource}
@Parameter(defaultValue="${project.build.directory}/repository") private java.io.File destination
@Parameter private java.lang.String name
@Parameter private java.util.List<Iu> ius
followStrictOnly
, followOnlyFilteredRequirements
, includeOptional
, includeNonGreedy
, includeFeatures
.@Parameter(defaultValue="false") private boolean followStrictOnly
@Parameter(defaultValue="true") private boolean includeFeatures
@Parameter(defaultValue="true") private boolean includePacked
@Parameter(defaultValue="true") private boolean includeOptional
@Parameter(defaultValue="true") private boolean includeNonGreedy
@Parameter private java.util.Map<java.lang.String,java.lang.String> filter
osgi.os, osgi.ws, osgi.arch
.@Parameter(defaultValue="false") private boolean followOnlyFilteredRequirements
@Parameter(defaultValue="false") private boolean latestVersionOnly
true
to filter the resulting set of IUs to only include the latest
version of each Installable Unit only. By default, all versions satisfying dependencies are
included.@Parameter(defaultValue="false") private boolean mirrorMetadataOnly
@Parameter(defaultValue="true") private boolean compress
@Parameter(defaultValue="true") private boolean append
@Parameter(defaultValue="true") private boolean xzCompress
Add XZ-compressed repository index files. XZ offers better compression ratios esp. for highly redundant file content.
@Parameter(defaultValue="true") private boolean keepNonXzIndexFiles
If xzCompress
is true
, 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.
@Parameter(defaultValue="false") private boolean targetPlatformAsSource
Whether to add the target-platform content as a source. Ignored for non-Tycho packaging types.
@Parameter(defaultValue="true") private boolean currentModuleAsSource
Whether the current build p2 output should be added as source. Ignored for non-Tycho
packaging types. Ignored if targetPlatformAsSource
== false;
@Parameter(defaultValue="false") private boolean ignoreErrors
If set to true, mirroring continues to run in the event of an error during the mirroring process and will just log an info message.
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 org.eclipse.tycho.p2.tools.mirroring.facade.MirrorOptions createMirrorOptions()
private java.util.Collection<org.eclipse.tycho.p2.tools.mirroring.facade.IUDescription> createIUDescriptions()
private org.eclipse.tycho.BuildOutputDirectory getBuildOutputDirectory()