diff --git a/extras/org.codehaus.groovy.m2eclipse/lifecycle-mapping-metadata.xml b/extras/org.codehaus.groovy.m2eclipse/lifecycle-mapping-metadata.xml index f5b082b099..2ba6b283ab 100644 --- a/extras/org.codehaus.groovy.m2eclipse/lifecycle-mapping-metadata.xml +++ b/extras/org.codehaus.groovy.m2eclipse/lifecycle-mapping-metadata.xml @@ -57,15 +57,37 @@ org.codehaus.gmavenplus gmavenplus-plugin - [1.0,) + [1.0,1.6) addSources addTestSources generateStubs compile + removeStubs testGenerateStubs testCompile + removeTestStubs + + + + + org.codehaus.groovy.m2eclipse.configurator + + + + + + org.codehaus.gmavenplus + gmavenplus-plugin + [1.6,) + + addSources + addTestSources + generateStubs + compile removeStubs + generateTestStubs + compileTests removeTestStubs diff --git a/extras/org.codehaus.groovy.m2eclipse/src/org/codehaus/groovy/m2eclipse/ProjectSourceType.java b/extras/org.codehaus.groovy.m2eclipse/src/org/codehaus/groovy/m2eclipse/ProjectSourceType.java index aefd3d45f3..bfb34e7881 100644 --- a/extras/org.codehaus.groovy.m2eclipse/src/org/codehaus/groovy/m2eclipse/ProjectSourceType.java +++ b/extras/org.codehaus.groovy.m2eclipse/src/org/codehaus/groovy/m2eclipse/ProjectSourceType.java @@ -15,6 +15,8 @@ */ package org.codehaus.groovy.m2eclipse; +import java.util.List; + import org.apache.maven.model.Dependency; import org.apache.maven.model.Plugin; import org.apache.maven.model.PluginExecution; @@ -82,7 +84,8 @@ private static ProjectSourceType getSourceTypeInGMavenProject(Plugin plugin) { ProjectSourceType result = NONE; if (plugin != null && plugin.getExecutions() != null && !plugin.getExecutions().isEmpty()) { for (PluginExecution execution : plugin.getExecutions()) { - if (execution.getGoals().contains("compile")) { + List goals = execution.getGoals(); + if (goals.contains("compile")) { switch (result) { case NONE: result = MAIN; @@ -92,7 +95,7 @@ private static ProjectSourceType getSourceTypeInGMavenProject(Plugin plugin) { break; } } - if (execution.getGoals().contains("testCompile")) { + if (goals.contains("compileTests") || goals.contains("testCompile")) { switch (result) { case NONE: result = TEST;