[ https://issues.apache.org/jira/browse/MANT-73?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Robert Scholte closed MANT-73. ------------------------------ Resolution: Auto Closed Assignee: Robert Scholte Plugin is now retired, the issue won't be fixed. > Wrong repositories in generated get-deps task and speed improvement > ------------------------------------------------------------------- > > Key: MANT-73 > URL: https://issues.apache.org/jira/browse/MANT-73 > Project: Maven Ant Plugin > Issue Type: Bug > Affects Versions: 2.3 > Environment: linux, jDK 1.6, maven 3.0.4 > Reporter: Jorge Gomez > Assignee: Robert Scholte > Priority: Blocker > Attachments: avoidsnapshots_and_skipexisting.diff > > > When one artifact existed in more than one repository, the first was selected > by default. This lead to undesirable behaviors when developing for sonatype > repository. In this case, I observed snapshots version were automatically > selected, but they did not exist. For instance, the following was generated > for Junit 4.8.1. > <get > src="https://oss.sonatype.org/content/repositories/snapshots/junit/junit/4.8.1/junit-4.8.1.jar" > dest="${maven.repo.local}/junit/junit/4.8.1/junit-4.8.1.jar" > usetimestamp="false" > ignoreerrors="true"/> > https://oss.sonatype.org/content/repositories/snapshots/junit/junit/4.8.1/junit-4.8.1.jar > does not exist, by the way. This lead to important delays in compilation and > any other target depending on get-deps. > Making the AntBuildWriter select those repositories which are not snapshots, > solves the issues. With the attched patch, the previous task becomes into: > <get > src="https://oss.sonatype.org/content/repositories/snapshots/junit/junit/4.8.1/junit-4.8.1.jar" > dest="${maven.repo.local}/junit/junit/4.8.1/junit-4.8.1.jar" > usetimestamp="false" > ignoreerrors="true"/> > Nevertheless, this still makes the get-deps slow. By increasing the minimum > ant version to 1.8.0, it is possible to use "skipexisting" attribute for ant > task. This, combined with "usetimestamp=true" makes compilation lightning > fast once everything is downloaded. Now the task looks like: > <get > src="http://repo.maven.apache.org/maven2/junit/junit/4.8.1/junit-4.8.1.jar" > dest="${maven.repo.local}/junit/junit/4.8.1/junit-4.8.1.jar" > usetimestamp="true" > ignoreerrors="true" > skipexisting="true"/> > The attached patch was created against the 2.3 tag version of the repository, > though it is present as well in the head of the trunk. The pom.xml file was > modified only to include the 1.8.0 version of ant instead of the old 1.7. -- This message was sent by Atlassian JIRA (v7.6.3#76005)