I can definitely confirm that deploy overwrites the previous deployment; it never "ignores" the new version. However, as Stephen mentioned above, if you deploy twice and you have the artifact from the first deployment in your local repository, you'll have to delete it in order to get the new version.
In my company's setup, only Continuum is authorized to build a non-SNAPSHOT version, and even then only when doing a release (using the release plugin). This way, we can never release an artifact with the same version twice. We enforce this using a simple antrun execution that checks whether the version is a SNAPSHOT or not (in our "standards" POM, which everything inherits from). You can't so much as build a non-SNAPSHOT version locally in our setup. It's a very nice setup and it doesn't hold us back in any way. On Tue, Mar 10, 2009 at 10:24 AM, Sahoo <[email protected]> wrote: > If it silently ignores, then it is too bad. Let's hope someone can confirm > the behavior. > > > Stephen Connolly wrote: > >> AFAIK, it silently ignores the second deploy in newer versions of the >> maven-deploy-plugin but I could be wrong >> >> 2009/3/10 Sahoo <[email protected]> >> >> >> >>> 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] >>> >>> >>> >>> >> >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > >
