Hi,
I created MyJavaLaunchDelegate that extends JavaLaunchDelegate for running
my own type of files. Files are inside JavaProject with m2e nature. I would
like to add maven dependencies to the classpath of my run.
As I know I have to put them into:
@Override
public String[] getClasspath(ILaunchConfiguration configuration) throws
CoreException {
List<String> extendedClasspath = new ArrayList<>();
Collections.addAll(extendedClasspath, super.getClasspath(configuration));
IProject project =
ResourcesPlugin.getWorkspace().getRoot().getProject(configuration.getAttribute(SystemInCloudLaunchConfigurationConstants.ATTR_PROJECT_NAME,
""));
IPath path = project.getLocation();
extendedClasspath.add(path.toString() + "/target/test-classes");
extendedClasspath.add(path.toString() + "/target/classes");
...
return extendedClasspath.toArray(new String[extendedClasspath.size()]);
}
I am adding already classes of my project.
I will be thankful for any tips.
Marek
--
Marek Jagielski
_______________________________________________
m2e-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/m2e-users