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
Alex Mising name is currently offline Alex Mising nameFriend
Messages: 149
Registered: March 2010
Senior Member

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

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:

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:

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:How do I debug what the native proxy provider is doing
Next Topic:My projects are not loading upon restart of Eclipse Oxygen 4.7.3a version
Goto Forum:

Current Time: Fri Feb 23 01:11:00 GMT 2024

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

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

Back to the top