|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.maven.shared.osgi.DefaultMaven2OsgiConverter
public class DefaultMaven2OsgiConverter
Default implementation of Maven2OsgiConverter
Field Summary | |
---|---|
private static java.lang.String |
FILE_SEPARATOR
|
private static java.util.regex.Pattern |
ONLY_NUMBERS
pattern that matches strings that contain only numbers |
private static java.util.regex.Pattern |
OSGI_VERSION_PATTERN
Bundle-Version must match this pattern |
Constructor Summary | |
---|---|
DefaultMaven2OsgiConverter()
|
Method Summary | |
---|---|
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 java.lang.String |
getVersion(java.lang.String major,
java.lang.String minor,
java.lang.String service,
java.lang.String qualifier)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final java.util.regex.Pattern OSGI_VERSION_PATTERN
private static final java.util.regex.Pattern ONLY_NUMBERS
private static final java.lang.String FILE_SEPARATOR
Constructor Detail |
---|
public DefaultMaven2OsgiConverter()
Method Detail |
---|
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 artifact
public java.lang.String getVersion(java.lang.String version)
Maven2OsgiConverter
getVersion
in interface Maven2OsgiConverter
version
- Maven version
private java.lang.String getVersion(java.lang.String major, java.lang.String minor, java.lang.String service, java.lang.String qualifier)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |