geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xuhaih...@apache.org
Subject svn commit: r943766 - /geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/repository/Environment.java
Date Thu, 13 May 2010 01:31:23 GMT
Author: xuhaihong
Date: Thu May 13 01:31:22 2010
New Revision: 943766

URL: http://svn.apache.org/viewvc?rev=943766&view=rev
Log:
GERONIMO-5298 Bad version information in deployment plan will result in deploy failure

Modified:
    geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/repository/Environment.java

Modified: geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/repository/Environment.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/repository/Environment.java?rev=943766&r1=943765&r2=943766&view=diff
==============================================================================
--- geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/repository/Environment.java
(original)
+++ geronimo/server/trunk/framework/modules/geronimo-kernel/src/main/java/org/apache/geronimo/kernel/repository/Environment.java
Thu May 13 01:31:22 2010
@@ -171,15 +171,16 @@ public class Environment implements Seri
     public List<String> getRequireBundles() {
         return Collections.unmodifiableList(new ArrayList<String>(requireBundles));
     }
-        
+
     public Manifest getManifest() throws ManifestException {
         Manifest manifest = new Manifest();
         manifest.addConfiguredAttribute(new Manifest.Attribute(Constants.BUNDLE_MANIFESTVERSION,
"2"));
         manifest.addConfiguredAttribute(new Manifest.Attribute(Constants.BUNDLE_SYMBOLICNAME,
configId.getGroupId() + "." + configId.getArtifactId()));
         String versionString = "" + configId.getVersion().getMajorVersion() + "." + configId.getVersion().getMinorVersion()
+ "." + configId.getVersion().getIncrementalVersion();
         if (configId.getVersion().getQualifier() != null) {
-            versionString += "." + configId.getVersion().getQualifier();
+            versionString += "." + configId.getVersion().getQualifier().replaceAll("[^-_\\w]{1}",
"_");
         }
+
         manifest.addConfiguredAttribute(new Manifest.Attribute(Constants.BUNDLE_VERSION,
versionString));
 
         if (bundleActivator != null) {
@@ -198,7 +199,7 @@ public class Environment implements Seri
             Manifest.Attribute bundleClassPath = new Manifest.Attribute(Manifest.Attribute.Separator.COMMA,
Constants.BUNDLE_CLASSPATH, this.bundleClassPath);
             manifest.addConfiguredAttribute(bundleClassPath);
         }
-        
+
         if (!requireBundles.isEmpty()) {
             Manifest.Attribute requireBundle = new Manifest.Attribute(Manifest.Attribute.Separator.COMMA,
Constants.REQUIRE_BUNDLE, this.requireBundles);
             manifest.addConfiguredAttribute(requireBundle);



Mime
View raw message