Skip to content

fix: Use launch configuration to resolve the classpath - #738

Merged
Sheng Chen (jdneo) merged 2 commits into
masterfrom
cs/issue-623
Jun 25, 2019
Merged

Sheng Chen (jdneo) merged 2 commits into
masterfrom
cs/issue-623

Conversation

@jdneo

Copy link
Copy Markdown
Member

Fix #623

return classpaths.toArray(new String[classpaths.size()]);
}

private static class JavaApplicationLaunchConfiguration extends LaunchConfiguration {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

JunitLaunchConfiguration?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

}

private static class JavaApplicationLaunchConfiguration extends LaunchConfiguration {
public static final String JAVA_APPLICATION_LAUNCH = "<?xml version=\"1.0\" encoding=\"UTF-8\"" +

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

JUNIT_LAUNCH

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

sourcepathProvider = "org.eclipse.m2e.launchconfig.sourcepathProvider";
} else if (ProjectUtils.isGradleProject(project)) {
classpathProvider = "org.eclipse.buildship.core.classpathprovider";
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what if not maven or gradle?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works as expected.

demo

}

private static String[] resolveClasspath(IJavaProject javaProject) throws CoreException {
// final JUnitLaunchConfigurationDelegate delegate = new JUnitLaunchConfigurationDelegate();

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unused comments here?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated

@jdneo
Sheng Chen (jdneo) merged commit e30e641 into master Jun 25, 2019
@jdneo
Sheng Chen (jdneo) deleted the cs/issue-623 branch June 25, 2019 06:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Multi-Root Workspace with two Maven projects uses wrong pom dependencies

3 participants