eclipse:to-maven
Full name:
io.wcm.devops.maven.plugins:eclipse-maven-plugin:3.2.1-SNAPSHOT:to-maven
Description:
Add Eclipse artifacts from an Eclipse installation or a local P2 repo to the local Maven repo.
This mojo automatically analyzes the local P2 repo, copies jars from the plugins directory to the local maven repo, and generates appropriate poms.
Typical usage for a local Eclipse installation:
mvn eclipse:to-maven -DdeployTo=maven.org::default::scpexe://repo1.maven.org/home/maven/repository-staging/to-ibiblio/eclipse-staging -DeclipseDir=/opt/eclipse
Or to download and convert a P2 repository:
/opt/eclipse/eclipse -application org.eclipse.equinox.p2.artifact.repository.mirrorApplication -writeMode clean -verbose -raw -ignoreErrors -source http://download.eclipse.org/releases/oxygen -destination file:/tmp/p2-oxygen
mvn eclipse:to-maven -DbundleNameAsArtifactId=true -DgroupIdTokens=3 -DattachSourcePlugins -DresolveVersionRanges -DdeployTo=oxygen::default::file:/tmp/repo-2018-12 -DeclipseDir=/tmp/oxygen
Note: The size of such an update site (P2 repository) is 3 to 4 GB and the download can take several hours.
Attributes:
- The goal is not marked as thread-safe and thus does not support parallel builds.
Optional Parameters
| Name | Type | Since | Description |
|---|---|---|---|
<attachSourcePlugins> |
boolean |
- |
Flag to turn source plugins to attached artifacts. Default: falseUser Property: attachSourcePlugins |
<deployTo> |
String |
- |
Specifies a remote repository to which generated artifacts should be deployed to. If this property is specified, artifacts are also deployed to the remote repo. The format for this parameter is id::layout::urlUser Property: deployTo |
<eclipseDir> |
File |
- |
Eclipse installation dir. If not set, a value for this parameter will be asked on the command line. User Property: eclipseDir |
<groupIdTokens> |
int |
- |
Number of tokens from the bundle name used to build the group id. A value of -1 will use all tokens, but the last. Default: -1User Property: groupIdTokens |
<resolveRecommendedVersions> |
boolean |
- |
Flag to turn resolve recommended versions of dependencies with available artifacts of the P2 repository. Default: falseUser Property: resolveRecommendedVersions |
<resolveVersionRanges> |
boolean |
- |
Flag to turn resolve version ranges of dependencies with available artifacts of the P2 repository. Default: falseUser Property: resolveVersionRanges |
<stripQualifier> |
boolean |
- |
Strip qualifier (fourth token) from the plugin version. Qualifiers are for eclipse plugin the equivalent of timestamped snapshot versions for Maven, but the date is maintained also for released version (e.g. a jar for the release 3.2 can be named org.eclipse.core.filesystem_1.0.0.v20060603.jar. It's usually handy to not to include this qualifier when generating maven artifacts for major releases, while it's needed when working with eclipse integration/nightly builds.Default: falseUser Property: stripQualifier |
<useBundleNameAsArtifactId> |
boolean |
- |
Flag to use the bundle name directly as artifactId. Default: falseUser Property: bundleNameAsArtifactId |
Parameter Details
<attachSourcePlugins>
- Type:
boolean - Required:
No - User Property:
attachSourcePlugins - Default:
false
<deployTo>
id::layout::url- Type:
java.lang.String - Required:
No - User Property:
deployTo
<eclipseDir>
- Type:
java.io.File - Required:
No - User Property:
eclipseDir
<groupIdTokens>
- Type:
int - Required:
No - User Property:
groupIdTokens - Default:
-1
<resolveRecommendedVersions>
- Type:
boolean - Required:
No - User Property:
resolveRecommendedVersions - Default:
false
<resolveVersionRanges>
- Type:
boolean - Required:
No - User Property:
resolveVersionRanges - Default:
false
<stripQualifier>
3.2 can be named org.eclipse.core.filesystem_1.0.0.v20060603.jar. It's usually handy to not to include this qualifier when generating maven artifacts for major releases, while it's needed when working with eclipse integration/nightly builds.- Type:
boolean - Required:
No - User Property:
stripQualifier - Default:
false
<useBundleNameAsArtifactId>
- Type:
boolean - Required:
No - User Property:
bundleNameAsArtifactId - Default:
false
