You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@aries.apache.org by ga...@apache.org on 2010/06/04 16:40:29 UTC
svn commit: r951421 -
/incubator/aries/trunk/eba-maven-plugin/src/main/java/org/apache/aries/plugin/eba/EbaMojo.java
Author: gawor
Date: Fri Jun 4 14:40:29 2010
New Revision: 951421
URL: http://svn.apache.org/viewvc?rev=951421&view=rev
Log:
ARIES-331: Support override of Application-Version header
Modified:
incubator/aries/trunk/eba-maven-plugin/src/main/java/org/apache/aries/plugin/eba/EbaMojo.java
Modified: incubator/aries/trunk/eba-maven-plugin/src/main/java/org/apache/aries/plugin/eba/EbaMojo.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/eba-maven-plugin/src/main/java/org/apache/aries/plugin/eba/EbaMojo.java?rev=951421&r1=951420&r2=951421&view=diff
==============================================================================
--- incubator/aries/trunk/eba-maven-plugin/src/main/java/org/apache/aries/plugin/eba/EbaMojo.java (original)
+++ incubator/aries/trunk/eba-maven-plugin/src/main/java/org/apache/aries/plugin/eba/EbaMojo.java Fri Jun 4 14:40:29 2010
@@ -386,8 +386,7 @@ public class EbaMojo
FileUtils.fileAppend(fileName, APPLICATION_SYMBOLICNAME + ": "
+ getApplicationSymbolicName(project.getArtifact()) + "\n");
FileUtils.fileAppend(fileName, APPLICATION_VERSION + ": "
- + aQute.lib.osgi.Analyzer.cleanupVersion(project.getVersion()) + "\n");
-// + maven2OsgiConverter.getVersion(project.getVersion()) + "\n");
+ + getApplicationVersion() + "\n");
FileUtils.fileAppend(fileName, APPLICATION_NAME + ": " + project.getName() + "\n");
FileUtils.fileAppend(fileName, APPLICATION_DESCRIPTION + ": "
+ project.getDescription() + "\n");
@@ -452,6 +451,13 @@ public class EbaMojo
return artifact.getGroupId() + "." + artifact.getArtifactId();
}
+ private String getApplicationVersion() {
+ if (instructions.containsKey(APPLICATION_VERSION)) {
+ return instructions.get(APPLICATION_VERSION).toString();
+ }
+ return aQute.lib.osgi.Analyzer.cleanupVersion(project.getVersion());
+ }
+
protected File getBuildDir()
{
if ( buildDir == null )