Details
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.
Attachments
Issue Links
- duplicates
-
MNG-4679 [regression] command line option "-update-snapshots" does not work for dependency:copy-dependencies
- Closed