|
@@ -459,16 +459,19 @@ public class Manifest { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
Enumeration e = section.getAttributeKeys(); |
|
|
Enumeration e = section.getAttributeKeys(); |
|
|
|
|
|
Attribute classpathAttribute = null; |
|
|
while (e.hasMoreElements()) { |
|
|
while (e.hasMoreElements()) { |
|
|
String attributeName = (String) e.nextElement(); |
|
|
String attributeName = (String) e.nextElement(); |
|
|
Attribute attribute = section.getAttribute(attributeName); |
|
|
Attribute attribute = section.getAttribute(attributeName); |
|
|
if (attributeName.equals(ATTRIBUTE_CLASSPATH) && |
|
|
|
|
|
attributes.containsKey(attributeName)) { |
|
|
|
|
|
Attribute ourClassPath = getAttribute(attributeName); |
|
|
|
|
|
|
|
|
if (attributeName.equals(ATTRIBUTE_CLASSPATH)) { |
|
|
|
|
|
if (classpathAttribute == null) { |
|
|
|
|
|
classpathAttribute = new Attribute(); |
|
|
|
|
|
classpathAttribute.setName(ATTRIBUTE_CLASSPATH); |
|
|
|
|
|
} |
|
|
Enumeration cpe = attribute.getValues(); |
|
|
Enumeration cpe = attribute.getValues(); |
|
|
while (cpe.hasMoreElements()) { |
|
|
while (cpe.hasMoreElements()) { |
|
|
String value = (String) cpe.nextElement(); |
|
|
String value = (String) cpe.nextElement(); |
|
|
ourClassPath.addValue(value); |
|
|
|
|
|
|
|
|
classpathAttribute.addValue(value); |
|
|
} |
|
|
} |
|
|
} else { |
|
|
} else { |
|
|
// the merge file always wins |
|
|
// the merge file always wins |
|
@@ -476,6 +479,11 @@ public class Manifest { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (classpathAttribute != null) { |
|
|
|
|
|
// the merge file *always* wins, even for Class-Path |
|
|
|
|
|
storeAttribute(classpathAttribute); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
// add in the warnings |
|
|
// add in the warnings |
|
|
Enumeration warnEnum = section.warnings.elements(); |
|
|
Enumeration warnEnum = section.warnings.elements(); |
|
|
while (warnEnum.hasMoreElements()) { |
|
|
while (warnEnum.hasMoreElements()) { |
|
|