Although this is a core assumption in maven, many people don't know
this. The question that I have is why does maven not try to protect
itself from human error? Should mvn-deploy not refuse to overwrite an
artifact by default?
Sahoo
Stephen Connolly wrote:
The core assumption of a maven repository is that once a non-SNAPSHOT
version is available, that artifact will *NEVER* change.
Thus once maven downloads log4j:log4j:1.2.13 it will *NEVER* look for it
again.
This is why you should always keep your pom on a -SNAPSHOT version, as the
only thing that Maven will look for newer versions of are -SNAPSHOT
versions.
Now it sounds like you've been bold and have been deploying different
versions of an artifact with the same version number... the solution for you
is to delete the artifact you don't want from your repository and then maven
will be forced to download it again (as it no longer has a copy)
Yes this is a pain to do this by hand... consider it a penance for deploying
different versions of the same artifact with the same version number ;-)
-Stephen
2009/3/10 youhaodeyi <[email protected]>
Maven will not download dependency from remote repository if the dependency
already exists. How can I force Maven download the dependency even if the
dependency exists?
--
View this message in context:
http://www.nabble.com/How-can-I-force-maven-download-dependency--tp22428816p22428816.html
Sent from the Maven - Users mailing list archive at Nabble.com.
---------------------------------------------------------------------
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]