Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Changed maven classpath container check to maven nature one #1818

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading