org.apache.maven.shared.osgi

Class DefaultMaven2OsgiConverter

public class DefaultMaven2OsgiConverter extends Object implements Maven2OsgiConverter

Default implementation of Maven2OsgiConverter

Version: $Id: DefaultMaven2OsgiConverter.java 661727 2008-05-30 14:21:49Z bentmann $

Author: Carlos Sanchez

UNKNOWN:

Method Summary
StringgetBundleFileName(Artifact artifact)
StringgetBundleSymbolicName(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. org.apache.maven:maven -> org.apache.maven
  • if artifactId starts with last section of groupId that portion is removed. eg. org.apache.maven:maven-core -> org.apache.maven.core
StringgetVersion(Artifact artifact)
StringgetVersion(String version)

Method Detail

getBundleFileName

public String getBundleFileName(Artifact artifact)

getBundleSymbolicName

public String getBundleSymbolicName(Artifact artifact)
Get the symbolic name as groupId + "." + artifactId, with the following exceptions

getVersion

public String getVersion(Artifact artifact)

getVersion

public String getVersion(String version)
Copyright © 2006-2009 Apache Software Foundation. All Rights Reserved.