public class DefaultMaven2OsgiConverter extends Object implements Maven2OsgiConverter
Maven2OsgiConverter
Constructor and Description |
---|
DefaultMaven2OsgiConverter() |
Modifier and Type | Method and Description |
---|---|
static String |
cleanupVersion(String version) |
String |
getBundleFileName(org.apache.maven.artifact.Artifact artifact) |
String |
getBundleSymbolicName(org.apache.maven.artifact.Artifact artifact)
Get the symbolic name as groupId + "." + artifactId, with the following exceptions
if artifact.getFile is not null and the jar contains a OSGi Manifest with
Bundle-SymbolicName property then that value is returned
if groupId has only one section (no dots) and artifact.getFile is not null then the
first package name with classes is returned. eg. commons-logging:commons-logging ->
org.apache.commons.logging
if artifactId is equal to last section of groupId then groupId is returned. eg.
|
String |
getVersion(org.apache.maven.artifact.Artifact artifact)
Convert a Maven version into an OSGi compliant version
|
String |
getVersion(String version)
Convert a Maven version into an OSGi compliant version
|
public String getBundleSymbolicName(org.apache.maven.artifact.Artifact artifact)
getBundleSymbolicName
in interface Maven2OsgiConverter
public String getBundleFileName(org.apache.maven.artifact.Artifact artifact)
getBundleFileName
in interface Maven2OsgiConverter
public String getVersion(org.apache.maven.artifact.Artifact artifact)
Maven2OsgiConverter
getVersion
in interface Maven2OsgiConverter
artifact
- Maven artifactpublic String getVersion(String version)
Maven2OsgiConverter
getVersion
in interface Maven2OsgiConverter
version
- Maven versionCopyright © 2015. All rights reserved.