public class EclipseToMavenMojo
extends org.apache.maven.plugin.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(org.apache.maven.model.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 org.apache.maven.model.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,
org.apache.maven.model.Model model,
Map plugins,
Map models) |
protected void |
resolveVersionRanges(org.apache.maven.model.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.
|
protected org.apache.maven.artifact.installer.ArtifactInstaller installer
protected org.codehaus.plexus.components.interactivity.InputHandler inputHandler
public void execute()
throws org.apache.maven.plugin.MojoExecutionException,
org.apache.maven.plugin.MojoFailureException
execute in interface org.apache.maven.plugin.Mojoorg.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureExceptionMojo.execute()protected void processFile(File file, Map plugins, Map models) throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureExceptionprotected void processPlugin(EclipseOsgiPlugin plugin, org.apache.maven.model.Model model, Map plugins, Map models) throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureExceptionprotected String getKey(org.apache.maven.model.Model model)
protected void resolveVersionRanges(org.apache.maven.model.Model model,
Map models)
throws org.apache.maven.plugin.MojoFailureException
model - models - org.apache.maven.plugin.MojoFailureExceptionprotected 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.Contextualizableorg.codehaus.plexus.context.ContextExceptionprotected String createGroupId(String bundleName)
org.eclipse.jdt -> org.eclipsebundleName - bundle nameprotected String createArtifactId(String bundleName)
org.eclipse.jdt -> jdtbundleName - bundle nameprotected org.apache.maven.model.Dependency[] parseDependencies(String requireBundle)
requireBundle - "Require-Bundle" entryDependencyCopyright © 2002–2021 The Apache Software Foundation. All rights reserved.