public class DefaultMaven2OsgiConverter extends java.lang.Object implements Maven2OsgiConverter
Maven2OsgiConverter| Constructor and Description |
|---|
DefaultMaven2OsgiConverter() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
cleanupVersion(java.lang.String version) |
java.lang.String |
getBundleFileName(org.apache.maven.artifact.Artifact artifact) |
java.lang.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.
|
java.lang.String |
getVersion(org.apache.maven.artifact.Artifact artifact)
Convert a Maven version into an OSGi compliant version
|
java.lang.String |
getVersion(java.lang.String version)
Convert a Maven version into an OSGi compliant version
|
public java.lang.String getBundleSymbolicName(org.apache.maven.artifact.Artifact artifact)
getBundleSymbolicName in interface Maven2OsgiConverterpublic java.lang.String getBundleFileName(org.apache.maven.artifact.Artifact artifact)
getBundleFileName in interface Maven2OsgiConverterpublic java.lang.String getVersion(org.apache.maven.artifact.Artifact artifact)
Maven2OsgiConvertergetVersion in interface Maven2OsgiConverterartifact - Maven artifactpublic java.lang.String getVersion(java.lang.String version)
Maven2OsgiConvertergetVersion in interface Maven2OsgiConverterversion - Maven versionpublic static java.lang.String cleanupVersion(java.lang.String version)
Copyright © 2006-2014 The Apache Software Foundation. All Rights Reserved.