Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 360676

Summary: Classpath jars not correctly set when using classifiers in dependencies
Product: z_Archived Reporter: Darren <bugzilla>
Component: m2eAssignee: Project Inbox <m2e.core-inbox>
Status: CLOSED NOT_ECLIPSE QA Contact:
Severity: major    
Priority: P3 CC: bugzilla, igor
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: All   
Whiteboard:

Description Darren CLA 2011-10-12 11:00:40 EDT
Build Identifier: 20110916-0149

If you have two dependencies like so:

         <dependency>
            <groupId>javax.validation</groupId>
            <artifactId>validation-api</artifactId>
			<version>1.0.0.GA</version>
         </dependency>
         <dependency>
            <groupId>javax.validation</groupId>
            <artifactId>validation-api</artifactId>
			<version>1.0.0.GA</version>
			<classifier>sources</classifier>
          </dependency>

The build path jars added by m2e will only give you the last one declared and not both.  If you look in the POM Editor under "Dependency Hierarchy" you can see both jars listed but they don't show up in the project.

Reproducible: Always

Steps to Reproduce:
1. Add dependency
2. Add same dependency with different classifier
3. Observe build path jars don't include both dependencies under the "Maven Dependencies" section
Comment 1 Darren CLA 2011-10-12 11:03:20 EDT
I also have noticed that this happens when the packaging type is set to "war"
Comment 2 Igor Fedorenko CLA 2011-10-12 11:16:56 EDT
Please report m2e-wtp integration issues to https://issues.sonatype.org/browse/MECLIPSEWTP . 

For the record, plain m2e correctly adds both dependencies to compile classpath.
Comment 3 Darren CLA 2011-10-12 11:28:33 EDT
Good to know.  Anyone else with this problem can find the issue at https://issues.sonatype.org/browse/MECLIPSEWTP-184  which was resolved a few days ago and will be out  in the 0.15 m2e-wtp release
Comment 4 Denis Roy CLA 2021-04-19 13:23:27 EDT
Moved to https://github.com/eclipse-m2e/m2e-core/issues/