Skip to content

Commit

Permalink
Changed maven classpath container check to maven nature one
Browse files Browse the repository at this point in the history
  • Loading branch information
treilhes authored and HannesWell committed Aug 28, 2024
1 parent c8bcaaa commit b128c37
Showing 1 changed file with 1 addition and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@
import org.eclipse.debug.core.ILaunchConfigurationType;
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
import org.eclipse.debug.core.ILaunchManager;
import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
import org.eclipse.jdt.launching.JavaRuntime;

import org.apache.maven.plugin.Mojo;
Expand All @@ -47,7 +46,6 @@

import org.eclipse.m2e.core.MavenPlugin;
import org.eclipse.m2e.core.embedder.IMaven;
import org.eclipse.m2e.core.internal.IMavenConstants;
import org.eclipse.m2e.core.project.IMavenProjectFacade;
import org.eclipse.m2e.jdt.internal.launch.MavenRuntimeClasspathProvider;

Expand Down Expand Up @@ -232,12 +230,7 @@ public void setupLaunchConfiguration(ILaunchConfiguration configuration) {
}
IProject project = JavaRuntime.getJavaProject(configuration).getProject();

// maven project if project has a maven classpath
boolean isMavenProject = configuration
.getAttribute(IJavaLaunchConfigurationConstants.ATTR_CLASSPATH_PROVIDER, "")
.equals(MavenRuntimeClasspathProvider.MAVEN_CLASSPATH_PROVIDER);

if(project != null && project.hasNature(IMavenConstants.NATURE_ID) && isMavenProject) {
if(MavenPlugin.isMavenProject(project)) {

switch(configuration.getType().getIdentifier()) {
case MavenRuntimeClasspathProvider.JDT_TESTNG_TEST:
Expand Down

0 comments on commit b128c37

Please sign in to comment.