@Mojo(name="to-maven", requiresProject=false) public class EclipseToMavenMojo extends AbstractMojo implements org.codehaus.plexus.personality.plexus.lifecycle.phase.Contextualizable
MakeArtifactsMojo
Typical usage:
mvn eclipse:to-maven -DdeployTo=maven.org::default::scpexe://repo1.maven.org/home/maven/repository-staging/to-ibiblio/eclipse-staging -DeclipseDir=.
Modifier and Type | Field and Description |
---|---|
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.
|
Constructor and Description |
---|
EclipseToMavenMojo() |
Modifier and Type | Method and Description |
---|---|
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.
|
getLog, getPluginContext, setLog, setPluginContext
@Component protected org.apache.maven.artifact.installer.ArtifactInstaller installer
@Component protected org.codehaus.plexus.components.interactivity.InputHandler inputHandler
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
protected void processPlugin(EclipseOsgiPlugin plugin, Model model, Map plugins, Map models) throws MojoExecutionException, MojoFailureException
protected void resolveVersionRanges(Model model, Map models) throws MojoFailureException
model
- models
- MojoFailureException
protected String osgiVersionToMavenVersion(String version, String forcedQualifier, boolean stripQualifier)
version
- initial versionforcedQualifier
- build numberstripQualifier
- always remove 4th token in versionpublic 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 nameprotected String createArtifactId(String bundleName)
org.eclipse.jdt
-> jdt
bundleName
- bundle nameprotected Dependency[] parseDependencies(String requireBundle)
requireBundle
- "Require-Bundle" entryDependency
Copyright © 2002–2015 The Apache Software Foundation. All rights reserved.