Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » How can I write code for a custom launch configuration WITH maven dependencies?(My code creates a launch configuration that has excludes maven dependencies)
How can I write code for a custom launch configuration WITH maven dependencies? [message #1796466] Sun, 14 October 2018 00:06
Alexandros Karypidis is currently offline Alexandros KarypidisFriend
Messages: 135
Registered: March 2010
Senior Member
Hello,

I would like to write code in a plugin that creates a custom Java launch configuration type for Java, and make it so that the classpath includes Maven dependencies (but only if this is a maven project).

Currently the launcher code can be seen in CucumberFeatureLaunchShortcut.java.

My problem is that when launching from a Maven (m2e) project, the generated configuration does NOT include Maven dependencies in its classpath as seen here:

https://i.imgur.com/mMwwvzR.png

I would like to be able to detect if this is a maven project and add the Maven dependencies to the classpath, as seen here in a junit launch configuration for the same project:

https://i.imgur.com/7MUuR3P.png

What is the proper way to do this? Is there some API that allows configured project natures to inject classpath entries? If not, how do I go about (i.e. what API should I use) to detect m2e and inject maven dependencies in my launch configuration?
Previous Topic:Cannot Install "Eclipse PDE Patch with Java 11 support for 2018-09 development stream"
Next Topic:My projects are not loading upon restart of Eclipse Oxygen 4.7.3a version
Goto Forum:
  


Current Time: Sat Feb 22 16:47:41 GMT 2020

Powered by FUDForum. Page generated in 0.01794 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top