Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Won't Fix
-
None
-
None
-
None
Description
Attached is an example build.xml file. The relevant line is:
<snapshots enabled="true" updatePolicy="never"/>
I completely remove the com.alterpoint.thirdPart:example directory from my local repository and, in a separate project, I build a com.alterpoint.thirdParty:example:6.0-SNAPSHOT artifact and install it back into the local repository so it's the only version there. With regular Maven, because I have a locally installed snapshot and updatePolicy=never, nothing is downloaded and it references that snapshot directly. When I run the attached build file, though, I get the following output:
F:\Temp\scratch>ant
Buildfile: build.xml
[INFO] snapshot com.alterpoint.thirdParty:example:6.0-SNAPSHOT: checking for updates from central
Downloading: com/alterpoint/thirdParty/example/6.0-SNAPSHOT/example-6.0-20070110.005843-3.pom
Transferring 2K
Downloading: com/alterpoint/thirdParty/example/6.0-SNAPSHOT/example-6.0-20070110.005843-3.jar
Transferring 17K
dist:
[copy] Copying 1 file to F:\Temp\scratch
BUILD SUCCESSFUL
Total time: 1 second
F:\Temp\scratch>
The Maven Ant tasks for some reason decide to download and update over my local SNAPSHOT even though updatePolicy=never is specified. Subsequent build deployments of that artifact remotely do not get downloaded, even if I rebuild a local SNAPSHOT. Only the first local SNAPSHOT, when it's the only SNAPSHOT, seems to cause this behavior. Unfortunately, that's a pretty common occurrence with our build system.