Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Duplicate
-
Affects Version/s: 2.1
-
Fix Version/s: None
-
Component/s: copy
-
Labels:None
-
Environment:HideApache Maven 3.0-beta-1 (r935667; 2010-04-19 19:00:39+0200)
Java version: 1.6.0_18
Default locale: en_IE, platform encoding: Cp1252
OS name: "windows vista" version: "6.0" arch: "x86" Family: "windows"ShowApache Maven 3.0-beta-1 (r935667; 2010-04-19 19:00:39+0200) Java version: 1.6.0_18 Default locale: en_IE, platform encoding: Cp1252 OS name: "windows vista" version: "6.0" arch: "x86" Family: "windows"
-
Number of attachments :
Description
The copy goal seems to ignore the -U command line option. With the configuration below and -U set, the most recent snapshot of an artifact is not fetched if there is a reasonably new (in my case a few hours) snapshot version cached in the local repository. This is not sufficient. Afaik -U is supposed to force the check for new snapshot versions.
When I delete the local snapshot artifact, the MOJO logs the message
[INFO] snapshot example-group:example-artifact:0.1.0-SNAPSHOT: checking for updates from example-nexus
However no such line is printed out when there is an outdated local snapshot artifact and -U is set.
Example configuration:
<build>
<plugins>
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.1</version>
<executions>
<execution>
<id>copy-snapshot</id>
<phase>compile</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>example-group</groupId>
<artifactId>example-artifact</artifactId>
<version>0.1.0-SNAPSHOT</version>
<overWrite>true</overWrite>
</artifactItem>
</artifactItems>
<stripVersion>true</stripVersion>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
Btw. copy-dependencies seems to honour the -U option, but copy-dependencies may not be appropriate for all people's use cases.
Issue Links
- duplicates
-
MNG-4679
[regression] command line option "-update-snapshots" does not work for dependency:copy-dependencies
-