public class DefaultMaven2OsgiConverter extends java.lang.Object implements Maven2OsgiConverter
Maven2OsgiConverter
Modifier and Type | Field and Description |
---|---|
private static java.lang.String |
FILE_SEPARATOR |
(package private) static java.util.regex.Pattern |
FUZZY_VERSION
Clean up version parameters.
|
Constructor and Description |
---|
DefaultMaven2OsgiConverter() |
Modifier and Type | Method and Description |
---|---|
(package private) static void |
cleanupModifier(java.lang.StringBuffer result,
java.lang.String modifier) |
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.
|
private java.lang.String |
getBundleSymbolicName(java.lang.String groupId,
java.lang.String artifactId) |
private java.lang.String |
getGroupIdFromPackage(java.io.File artifactFile) |
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
|
private static final java.lang.String FILE_SEPARATOR
static final java.util.regex.Pattern FUZZY_VERSION
private java.lang.String getBundleSymbolicName(java.lang.String groupId, java.lang.String artifactId)
public java.lang.String getBundleSymbolicName(org.apache.maven.artifact.Artifact artifact)
getBundleSymbolicName
in interface Maven2OsgiConverter
private java.lang.String getGroupIdFromPackage(java.io.File artifactFile)
public java.lang.String getBundleFileName(org.apache.maven.artifact.Artifact artifact)
getBundleFileName
in interface Maven2OsgiConverter
public java.lang.String getVersion(org.apache.maven.artifact.Artifact artifact)
Maven2OsgiConverter
getVersion
in interface Maven2OsgiConverter
artifact
- Maven artifactpublic java.lang.String getVersion(java.lang.String version)
Maven2OsgiConverter
getVersion
in interface Maven2OsgiConverter
version
- Maven versionpublic static java.lang.String cleanupVersion(java.lang.String version)
static void cleanupModifier(java.lang.StringBuffer result, java.lang.String modifier)