Bug 546260 - junit launch classpath contaminated with other projects in workspace
Summary: junit launch classpath contaminated with other projects in workspace
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Debug (show other bugs)
Version: 4.12   Edit
Hardware: Other Linux
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Debug-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2019-04-09 15:52 EDT by Blessed Geek CLA
Modified: 2022-06-13 20:03 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Blessed Geek CLA 2019-04-09 15:52:18 EDT
I have projects A, B, C, D open in the workspace.
A has maven dependency on B and C.

I configured a junit launch A.envTest with the, project A in classpath. 

However when I launch junit A.envTest, its running classpath includes A/target/classes and B/target/classes.

That is not good because projects A and B sources which are different versions of the maven dependency artefacts, contaminates the runtime.

They are also default properties files in the Projects A and B sources which I deliberately cannot be included in the maven artefact.

Please allow choice not including other open projects from the workspace in a launch.
Comment 1 Till Brychcy CLA 2019-04-10 01:12:06 EDT
Note, that m2e tries to resolve the "maven dependencies" container for the runtime class path the same way maven does. Have you tried removing it in the launch configuration and replacing it by direct dependencies?

Otherwise, can you please provide an example project?
Comment 2 Eclipse Genie CLA 2022-06-13 20:03:08 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.