Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMilos Kleint2011-08-05 09:01:48 +0000
committerMilos Kleint2011-08-05 10:18:29 +0000
commit0ac586b9d299ec92e4b1bdd9b2d42e59876a29ab (patch)
tree98a79e55c447e7f6cd01b73b3666e0e206e28edd
parent61820ff65bb40aaf98c5302942733ae244dabe7f (diff)
downloadm2e-core-0ac586b9d299ec92e4b1bdd9b2d42e59876a29ab.tar.gz
m2e-core-0ac586b9d299ec92e4b1bdd9b2d42e59876a29ab.tar.xz
m2e-core-0ac586b9d299ec92e4b1bdd9b2d42e59876a29ab.zip
335383 when selecting version for the parent node (representing the artifactId) don't select the SNAPSHOT version
-rw-r--r--org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenPomSelectionComponent.java14
1 files changed, 13 insertions, 1 deletions
diff --git a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenPomSelectionComponent.java b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenPomSelectionComponent.java
index 74e17928..d5fbc217 100644
--- a/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenPomSelectionComponent.java
+++ b/org.eclipse.m2e.core.ui/src/org/eclipse/m2e/core/ui/internal/wizards/MavenPomSelectionComponent.java
@@ -342,7 +342,19 @@ public class MavenPomSelectionComponent extends Composite {
}
}
} else {
- result.add(ia.getFiles().iterator().next());
+ //335383 find first non-snasphot version in case none is managed
+ boolean added = false;
+ for(IndexedArtifactFile file : ia.getFiles()) {
+ //what better means of recognizing snapshots?
+ if(file.version != null && !file.version.endsWith("-SNAPSHOT")) { //$NON-NLS-1$
+ added = true;
+ result.add(file);
+ break;
+ }
+ }
+ if (!added) {//just in case we deal with all snapshots..
+ result.add(ia.getFiles().iterator().next());
+ }
}
} else if(element instanceof IndexedArtifactFile) {
result.add((IndexedArtifactFile) element);

Back to the top