In MyEclipse7.0 and 7.1 (build 7.1.1-20090310):
Closing a maven project that has a testng test case invalidates the project launch configuration.
More info:
This bug was fixed in m2eclipse 0.9.7 (see below)
Steps to reproduce:
# install the testng eclipse plugin (http://beust.com/eclipse)
# Create a “Java Maven Project”
# Add the testng library
# Create a testng test class:
package testing;
import org.testng.annotations.Test;
public class AppTest {
@Test
public void test() {
}
}
# Run test class
# Close project
# Re-open project
# Run test class (from launch menu)
m2eclipse Fix information:
http://svn.sonatype.org/m2eclipse/tags/0.9.7.200811301804/org.maven.ide.eclipse.jdt/src/org/maven/ide/eclipse/jdt/internal/launch/MavenRuntimeClasspathProvider.java
…
public static final String JDT_TESTNG_TEST = “org.testng.eclipse.launchconfig”;
…
} else if(JDT_JUNIT_TEST.equals(typeid) || JDT_TESTNG_TEST.equals(typeid)) {
return BuildPathManager.CLASSPATH_TEST;
} else {
throw new CoreException(new Status(IStatus.ERROR, IMavenConstants.PLUGIN_ID, 0,
“Unsupported launch configuration type ” + typeid, null));
}
…