Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 360676 - Classpath jars not correctly set when using classifiers in dependencies
Summary: Classpath jars not correctly set when using classifiers in dependencies
Status: CLOSED NOT_ECLIPSE
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: m2e (show other bugs)
Version: unspecified   Edit
Hardware: PC All
: P3 major (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-12 11:00 EDT by Darren CLA
Modified: 2021-04-19 13:23 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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/