IDEA-109771 Incorrent Maven dependency resolution with war classes dependency
authorSergey Evdokimov <sergey.evdokimov@jetbrains.com>
Tue, 10 Sep 2013 14:24:05 +0000 (18:24 +0400)
committerSergey Evdokimov <sergey.evdokimov@jetbrains.com>
Tue, 10 Sep 2013 14:24:40 +0000 (18:24 +0400)
plugins/maven/src/main/java/org/jetbrains/idea/maven/importing/MavenModuleImporter.java

index b53471de926b29237cd0297e12fe46d63b270934..a7996a71d771b45ac0c6b110733b9fd795f0e6d0 100644 (file)
@@ -15,6 +15,7 @@
  */
 package org.jetbrains.idea.maven.importing;
 
+import com.google.common.collect.ImmutableSet;
 import com.intellij.openapi.application.AccessToken;
 import com.intellij.openapi.application.ReadAction;
 import com.intellij.openapi.module.Module;
@@ -38,11 +39,14 @@ import org.jetbrains.idea.maven.utils.MavenUtil;
 
 import java.util.List;
 import java.util.Map;
+import java.util.Set;
 
 public class MavenModuleImporter {
 
   public static final String SUREFIRE_PLUGIN_LIBRARY_NAME = "maven-surefire-plugin urls";
 
+  private static final Set<String> IMPORTED_CLASSIFIERS = ImmutableSet.of("client");
+
   private final Module myModule;
   private final MavenProjectsTree myMavenTree;
   private final MavenProject myMavenProject;
@@ -204,7 +208,7 @@ public class MavenModuleImporter {
             addAttachArtifactDependency(buildHelperCfg, scope, depProject, artifact);
           }
 
-          if (artifact.getClassifier() != null
+          if (IMPORTED_CLASSIFIERS.contains(artifact.getClassifier())
               && !isTestJar
               && !"system".equals(artifact.getScope())
               && !"false".equals(System.getProperty("idea.maven.classifier.dep"))) {