Issue Details (XML | Word | Printable)

Key: MNG-1286
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Lester Ecarma
Reporter: Carlos Sanchez
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
Maven 2

Check exclusions against relocated artifacts

Created: 22/Oct/05 10:57 PM   Updated: 01/Feb/06 02:44 PM
Component/s: None
Affects Version/s: 2.0
Fix Version/s: 2.0.1

Time Tracking:
Not Specified

File Attachments: 1. Text File MNG-1286-maven-artifact_b.patch (1 kB)
2. Text File MNG-1286-maven-project_b.patch (0.8 kB)
3. Text File MNG-1287-maven-project.patch (2 kB)


Complexity: Intermediate


 Description  « Hide
When using an artifact that was relocated you need to exclude the one used directly, it doesn't work if you use the final relocated artifact. This is confusing when you get an artifact in your war but you need to exclude other.

eg. if you don't use exclusions you get jdbc-stdext in the war. Using option b doesn't work, currently you need to use option a.

<dependency>
<artifactId>commons-dbcp</artifactId>
<groupId>commons-dbcp</groupId>
<version>1.2</version>
<exclusions>
<!-- option a -->
<exclusion>
<artifactId>jdbc</artifactId>
<groupId>jdbc</groupId>
</exclusion>
<!-- option b -->
<exclusion>
<artifactId>jdbc-stdext</artifactId>
<groupId>javax.sql</groupId>
</exclusion>
</exclusions>
</dependency>



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Edwin Punzalan added a comment - 25/Oct/05 05:04 AM
Added the filter object to be passed to MavenMetadataSource.retrieve() so it can be used when relocation has been resolved.

Lester Ecarma added a comment - 26/Oct/05 09:35 PM
Please see attached patches (xxx_b.patch) for a possible solution to this issue.

Brett Porter added a comment - 01/Nov/05 05:28 AM
Do these 2 patches relate to each other?

Lester Ecarma added a comment - 01/Nov/05 07:13 PM
Yes, both need to be applied to solve the issue.

Brett Porter added a comment - 02/Nov/05 01:05 AM
I've changed return; to continue; as I think it should continue to the other children.

Is this correct?

In future, could you please provide a test case that proves that it is fixed (either a unit test, or an integration test)

Thanks!


Lester Ecarma added a comment - 02/Nov/05 03:44 AM
Yes, you're right about using continue instead.