Issue Details (XML | Word | Printable)

Key: MNG-3513
Type: Improvement Improvement
Status: Open Open
Priority: Major Major
Assignee: Unassigned
Reporter: Marco Beelen
Votes: 0
Watchers: 0
Operations

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

Add filtering to determine if a artifact should be downloaded from a repository.

Created: 10/Apr/08 08:00 AM   Updated: 12/Jun/08 08:31 PM
Component/s: Artifacts and Repositories
Affects Version/s: None
Fix Version/s: 3.0

Time Tracking:
Not Specified

Complexity: Intermediate


 Description  « Hide
Then the settings.xml starts to contain various repositories maven will try to download artifacts from all defined repository until it is found.
Since the central repo is the last repo being queried all other repositories will be queried for all artifacts as well.
This causes the build to take extra unneccesary time and additional load on some repository servers.

In order to prevent this I would like to be able to specify some filters on the repostories, so maven can check whether or not to ask a repository for a certain component.

Suggestion for adjustments in settings.xml:

<repository>
<id>atlassian</id>
<name>Atlassian Repository</name>
<url>http://repository.atlassian.com</url>
<layout>legacy</layout>
<includes>
<include>com.atlassion</include
</includes>
</repository>

<repository>
<id>codehaus</id>
<name>Codehaus Repository</name>
<url>http://repository.codehaus.org//</url>
<includes>
<include>org.codehaus</include
</includes>
</repository>

<repository>
<id>central</id>
<name>The default maven2 repository</name>
<url>http://repo1.maven.org/maven2/</url>
<excludes>
<exclude>com.atlassion</exclude>
<exclude>org.codehaus</exclude>
</excludes>
</repository>

Maven should only attempt to download a certain artifact from a defined repository if the groupId of the artifact could be found on that server.
If a repository contains an includes-filter, then only those groupId's configured should be downloaded there.
If a repository contains an excludes-filter, then everything except those should be downloaded there.



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Brett Porter added a comment - 12/Jun/08 08:31 PM
I think some way to do this natively is a good idea, but it is worth noting that most repository managers already support this behaviour and are well worth using.