Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFred Bricon2015-09-01 16:52:54 -0400
committerFred Bricon2015-09-01 19:58:36 -0400
commitbb1a4dd26b66d9840a36ef337661188b99f17e7b (patch)
tree10c7ba4b08483a8dc3308f0fd12ac10697fcfad5
parent3f4dcc4ca451fb6e16724c7cd312204788d35486 (diff)
downloadm2e-core-bb1a4dd26b66d9840a36ef337661188b99f17e7b.tar.gz
m2e-core-bb1a4dd26b66d9840a36ef337661188b99f17e7b.tar.xz
m2e-core-bb1a4dd26b66d9840a36ef337661188b99f17e7b.zip
388541 : retain existing classpath attributes on updatereleases/1.6/1.6.2.20150902-0002milestones/1.6/1.6.2.20150902-0002
Change-Id: I26857021b03e159be28ab925985da9f500ccb6ed Signed-off-by: Fred Bricon <fbricon@gmail.com>
-rw-r--r--org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/internal/ClasspathDescriptor.java9
1 files changed, 9 insertions, 0 deletions
diff --git a/org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/internal/ClasspathDescriptor.java b/org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/internal/ClasspathDescriptor.java
index 5a0f0eb1..17c4ce3a 100644
--- a/org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/internal/ClasspathDescriptor.java
+++ b/org.eclipse.m2e.jdt/src/org/eclipse/m2e/jdt/internal/ClasspathDescriptor.java
@@ -17,6 +17,7 @@ import java.util.LinkedHashMap;
import java.util.List;
import java.util.ListIterator;
import java.util.Map;
+import java.util.Map.Entry;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
@@ -117,6 +118,14 @@ public class ClasspathDescriptor implements IClasspathDescriptor {
descriptor.setOutputLocation(outputLocation);
descriptor.setInclusionPatterns(inclusion);
descriptor.setExclusionPatterns(exclusion);
+
+ //Bug 388541: preserve existing classpath attributes
+ IClasspathEntryDescriptor oldEntry = staleEntries.get(sourcePath);
+ if(oldEntry != null) {
+ for(Entry<String, String> entry : oldEntry.getClasspathAttributes().entrySet()) {
+ descriptor.setClasspathAttribute(entry.getKey(), entry.getValue());
+ }
+ }
if(generated) {
descriptor.setClasspathAttribute(IClasspathAttribute.OPTIONAL, "true"); //$NON-NLS-1$
}

Back to the top