|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.maven.plugin.AbstractMojo org.apache.maven.plugin.eclipse.EclipseToMavenMojo
@Mojo(name="to-maven", requiresProject=false) public class EclipseToMavenMojo
Add eclipse artifacts from an eclipse installation to the local repo. This mojo automatically analize the eclipse
directory, copy plugins jars to the local maven repo, and generates appropriate poms. This is the official central
repository builder for Eclipse plugins, so it has the necessary default values. For customized repositories see
MakeArtifactsMojo
Typical usage:
mvn eclipse:to-maven -DdeployTo=maven.org::default::scpexe://repo1.maven.org/home/maven/repository-staging/to-ibiblio/eclipse-staging -DeclipseDir=.
Field Summary | |
---|---|
protected org.codehaus.plexus.components.interactivity.InputHandler |
inputHandler
Input handler, needed for comand line handling. |
protected org.apache.maven.artifact.installer.ArtifactInstaller |
installer
ArtifactInstaller component. |
Fields inherited from interface org.apache.maven.plugin.Mojo |
---|
ROLE |
Constructor Summary | |
---|---|
EclipseToMavenMojo()
|
Method Summary | |
---|---|
void |
contextualize(org.codehaus.plexus.context.Context context)
|
protected String |
createArtifactId(String bundleName)
Get the artifact id as the tokens after last dot e.g. |
protected String |
createGroupId(String bundleName)
Get the group id as the tokens until last dot e.g. |
void |
execute()
|
protected String |
fixBuildNumberSeparator(String versionRange)
Fix the separator for the 4th token in a versions. |
protected String |
getKey(Model model)
|
protected String |
osgiVersionToMavenVersion(String version)
|
protected String |
osgiVersionToMavenVersion(String version,
String forcedQualifier,
boolean stripQualifier)
The 4th (build) token MUST be separed with "-" and not with "." in maven. |
protected Dependency[] |
parseDependencies(String requireBundle)
Parses the "Require-Bundle" and convert it to a list of dependencies. |
protected void |
processFile(File file,
Map plugins,
Map models)
|
protected void |
processPlugin(EclipseOsgiPlugin plugin,
Model model,
Map plugins,
Map models)
|
protected void |
resolveVersionRanges(Model model,
Map models)
Resolve version ranges in the model provided, overriding version ranges with versions from the dependency in the provided map of models. |
Methods inherited from class org.apache.maven.plugin.AbstractMojo |
---|
getLog, getPluginContext, setLog, setPluginContext |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
@Component protected org.apache.maven.artifact.installer.ArtifactInstaller installer
@Component protected org.codehaus.plexus.components.interactivity.InputHandler inputHandler
Constructor Detail |
---|
public EclipseToMavenMojo()
Method Detail |
---|
public void execute() throws MojoExecutionException, MojoFailureException
execute
in interface Mojo
MojoExecutionException
MojoFailureException
Mojo.execute()
protected void processFile(File file, Map plugins, Map models) throws MojoExecutionException, MojoFailureException
MojoExecutionException
MojoFailureException
protected void processPlugin(EclipseOsgiPlugin plugin, Model model, Map plugins, Map models) throws MojoExecutionException, MojoFailureException
MojoExecutionException
MojoFailureException
protected String getKey(Model model)
protected void resolveVersionRanges(Model model, Map models) throws MojoFailureException
model
- models
-
MojoFailureException
protected String osgiVersionToMavenVersion(String version)
protected String osgiVersionToMavenVersion(String version, String forcedQualifier, boolean stripQualifier)
version
- initial versionforcedQualifier
- build numberstripQualifier
- always remove 4th token in version
public void contextualize(org.codehaus.plexus.context.Context context) throws org.codehaus.plexus.context.ContextException
contextualize
in interface org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable
org.codehaus.plexus.context.ContextException
protected String createGroupId(String bundleName)
org.eclipse.jdt
-> org.eclipse
bundleName
- bundle name
protected String createArtifactId(String bundleName)
org.eclipse.jdt
-> jdt
bundleName
- bundle name
protected Dependency[] parseDependencies(String requireBundle)
requireBundle
- "Require-Bundle" entry
Dependency
protected String fixBuildNumberSeparator(String versionRange)
versionRange
- input range
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |