[
http://jira.codehaus.org/browse/MDEP-276?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Benjamin Bentmann closed MDEP-276.
----------------------------------
Resolution: Duplicate
Assignee: Benjamin Bentmann (was: Brian Fox)
> copy does not fetch most recent snapshot when -U is set
> -------------------------------------------------------
>
> Key: MDEP-276
> URL: http://jira.codehaus.org/browse/MDEP-276
> Project: Maven 2.x Dependency Plugin
> Issue Type: Bug
> Components: copy
> Affects Versions: 2.1
> Environment: Apache 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"
> Reporter: Tobias Oberlies
> Assignee: Benjamin Bentmann
>
> 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
> {noformat}
> [INFO] snapshot example-group:example-artifact:0.1.0-SNAPSHOT: checking for
> updates from example-nexus
> {noformat}
> However no such line is printed out when there is an outdated local snapshot
> artifact and {{-U}} is set.
> Example configuration:
> {noformat}
> <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>
> {noformat}
> Btw. {{copy-dependencies}} seems to honour the {{-U}} option, but
> {{copy-dependencies}} may not be appropriate for all people's use cases.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira