It's because the same modello model is used for both, but that value is ignored. Trust me, if you try to start changing releases, you will have endless problems.
-----Original Message----- From: Richard Chamberlain [mailto:[email protected]] Sent: Monday, March 30, 2009 4:39 AM To: Maven Users List Subject: RE: dependency:unpack-dependencies not updating releases Hi Brian, I'm confused. What is the meaning of an updatePolicy for releases? <repositories> <repository> <releases> <updatePolicy>always</updatePolicy> </releases> <snapshots> <updatePolicy>always</updatePolicy> </snapshots> <id>caplin</id> <url>file://///maven/maven-repo</url> </repository> Richard -----Original Message----- From: Brian E. Fox [mailto:[email protected]] Sent: 27 March 2009 18:44 To: Maven Users List Subject: RE: dependency:unpack-dependencies not updating releases By changing a release artifact you are violating Maven Commandment #1: Release artifacts are immutable. Maven will never recheck for updated release artifacts, so it will just hand back what's in the local repository to the plugin every time. -----Original Message----- From: Richard Chamberlain [mailto:[email protected]] Sent: Friday, March 27, 2009 12:28 PM To: Maven Users List Subject: dependency:unpack-dependencies not updating releases Hi, I'm using dependency:unpack-dependencies to get some zips of artefacts from our company repository. However if I update a released artefact without changing the version (i.e. documentation change), our company repository is never checked by my script. The only way to get the latest version is to delete the artefact from my cache so it re-resolves it. When a dependency is a snapshot it is always updated. The command i'm using is: mvn dependency:unpack-dependencies -DoutputDirectory=mvn -DmarkersDirectory=mvn And the output from "mvn help:effective-pom" shows that my updatePolicy is set to always: ... <repositories> <repository> <releases> <updatePolicy>always</updatePolicy> </releases> <snapshots> <updatePolicy>always</updatePolicy> </snapshots> <id>caplin</id> <url>file://///maven/maven-repo</url> </repository> <repository> <snapshots> <enabled>false</enabled> </snapshots> <id>central</id> <name>Maven Repository Switchboard</name> <url>http://repo1.maven.org/maven2</url> </repository> </repositories> ... My project pom file is: <?xml version="1.0"?> <project> <modelVersion>4.0.0</modelVersion> <groupId>caplin</groupId> <artifactId>testproject</artifactId> <version>1.4.1</version> <dependencies> <dependency> <groupId>test.richardc</groupId> <artifactId>test</artifactId> <version>1.0</version> <type>zip</type> </dependency> </dependencies> </project> And the debug output is: D:\Development\Sandbox\test>mvn -X dependency:unpack-dependencies -DoutputDirect ory=mvn -DmarkersDirectory=mvn + Error stacktraces are turned on. Maven version: 2.0.10-RC7 Java version: 1.5.0_08 OS name: "windows xp" version: "5.1" arch: "x86" Family: "windows" [DEBUG] Building Maven user-level plugin registry from: 'C:\Documents and Settin gs\richardc\.m2\plugin-registry.xml' [DEBUG] Building Maven global-level plugin registry from: 'D:\buildTools\apache- maven-2.0.10-RC7\bin\..\conf\plugin-registry.xml' [INFO] Scanning for projects... [INFO] Searching repository for plugin with prefix: 'dependency'. [DEBUG] Loading plugin prefixes from group: com.octo.mtg [DEBUG] Loading plugin prefixes from group: org.apache.maven.plugins [DEBUG] Loading plugin prefixes from group: org.codehaus.mojo [DEBUG] Retrieving parent-POM: org.apache.maven.plugins:maven-plugins:pom:10 for project: org.apache.maven.plugins:maven-dependency-plugin:maven-plugin:2.0 from the repository. [DEBUG] Retrieving parent-POM: org.apache.maven:maven-parent:pom:7 for project: org.apache.maven.plugins:maven-plugins:pom:10 from the repository. [DEBUG] Retrieving parent-POM: org.apache:apache:pom:4 for project: org.apache.m aven:maven-parent:pom:7 from the repository. [DEBUG] Wagons could not be registered as the extension container was never crea ted [INFO] ------------------------------------------------------------------------ [INFO] Building Unnamed - caplin:testproject:jar:1.4.1 [INFO] task-segment: [dependency:unpack-dependencies] [INFO] ------------------------------------------------------------------------ [DEBUG] caplin:testproject:jar:1.4.1 (selected for null) [DEBUG] test.richardc:test:zip:1.0:compile (selected for compile) [DEBUG] Plugin dependencies for: org.apache.maven.plugins:maven-dependency-plugin:2.0 are: org.apache.maven:maven-artifact:jar:2.0.8:runtime org.apache.maven:maven-plugin-api:jar:2.0.8:runtime org.apache.maven:maven-project:jar:2.0.8:runtime org.apache.maven:maven-model:jar:2.0.8:runtime org.apache.maven:maven-core:jar:2.0.8:runtime org.codehaus.plexus:plexus-archiver:jar:1.0-alpha-9:runtime org.codehaus.plexus:plexus-utils:jar:1.4.6:runtime org.apache.maven.shared:file-management:jar:1.1:runtime org.codehaus.plexus:plexus-container-default:jar:1.0-alpha-9-stable-1:ru ntime org.apache.maven.shared:maven-dependency-analyzer:jar:1.0:runtime org.apache.maven.shared:maven-dependency-tree:jar:1.1:runtime org.apache.maven.shared:maven-common-artifact-filters:jar:1.0:runtime org.codehaus.plexus:plexus-io:jar:1.0-alpha-1:runtime org.apache.maven.reporting:maven-reporting-api:jar:2.0.6:runtime org.apache.maven.reporting:maven-reporting-impl:jar:2.0.4:runtime org.apache.maven.doxia:doxia-sink-api:jar:1.0-alpha-8:runtime org.apache.maven.doxia:doxia-site-renderer:jar:1.0-alpha-8:runtime [DEBUG] org.apache.maven.plugins:maven-dependency-plugin:maven-plugin:2.0:runtim e (selected for runtime) [DEBUG] Retrieving parent-POM: org.apache.maven:maven:pom:2.0.8 for project: nul l:maven-artifact:jar:null from the repository. ..... I've tested this on maven 2.0.9 and a 2.0.10 RC. I've tried alot and nothing seems to trigger an updates check. I've tried: - Deleting markers - Using -U - Changing the profiles Has anybody had this issue, is there anything more i can do to debug this issue? Thanks, Richard --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
