Hi all,

I discovered some strange behavior regarding the SNAPSHOT versions and the 
local repository update strategy in Maven 3.0.2 (on a Linux system):

If I have a project named "projectA" with version 1.0-SNAPSHOT and I call "mvn 
install" it copies the built artifact and the POM of projectA into the local 
repository as expected. However, the last modified date of the 
projectA-1.0-SNAPSHOT.pom file does not reflect the build or upload time but 
the real last modified date of the POM as it is set in the workspace (i.e. if 
the POM was last modified 5 days ago the file date of the POM in the local 
repository is also 5 days old)

If I now build a project "projectB" that depends on the Snapshot version of  
project "projectA ", Maven looks into the central repository and overrides my 
just built and installed version with an older one from the central repository. 
My guess is that this happened because it compares the meta-information of the 
central repository with the "last modified" file system attribute of the 
projectA -1.0-SNAPSHOT.pom file.

Is this an already known bug?
If it is a bug, does there exist any workaround (e.g. tell the install plugin 
to change the "last modified" attribute of the POM when copying it into the 
local repository)?

Thanks in advance,
Joern

Reply via email to