In the Better Builds with Maven book, Section 7, it describes Team Collaboration with Maven.
It describes that when you use the deploy goal to deploy to a remote repostitry, the file names are postfixed with a time stamp. Such as proficio-api-1.0-20060211.131114-1.jar
From the book..
In Maven, this is achieved by regularly deploying snapshots to a shared repository, such as the internal repository set up in section 7.3. Considering that example, you'll see that the repository was defined in proficio/pom.xml: Better Builds With Maven 214 Team Collaboration with Maven ... <distributionManagement> <repository> <id>internal</id> <url>file://localhost/c:/mvnbook/repository/internal</url> </repository> ... </distributionManagement> Now, deploy proficio-api to the repository with the following command: C:\mvnbook\proficio\proficio-api> mvn deploy You'll see that it is treated differently than when it was installed in the local repository. The filename that is used is similar to proficio-api-1.0-20060211.131114-1.jar. In this case, the version used is the time that it was deployed (in the UTC timezone) and the build number. If you were to deploy again, the time stamp would change and the build number would increment to 2. This technique allows you to continue using the latest version by declaring a dependency on 1.0-SNAPSHOT, or to lock down a stable version by declaring the dependency version to be the specific equivalent such as 1.0-20060211.131114-1. While this is not usually the case, locking the version in this way may be important if there are recent changes to the repository that need to be ignored temporarily. On 5/23/06, ben short <[EMAIL PROTECTED]> wrote:
Kind of going against the whole idea of maven then. On 5/23/06, Plygawko Dariusz (Centrala PZUSA) <[EMAIL PROTECTED]> wrote: > Is it possible to workaround this problem if I don't want to use snapshots? :) > > > -----Original Message----- > From: Wim Deblauwe [mailto:[EMAIL PROTECTED] > Sent: Tuesday, May 23, 2006 12:14 PM > To: Maven Users List > Subject: Re: How to prevent from deploying the same version of artefact twice? > > > Use the release plugin, this will automatically change the version to the > next SNAPSHOT version. > > 2006/5/23, dariusz.p <[EMAIL PROTECTED]>: > > > > > > It's possible to overwrite the same version of an artefact (when you > > forget > > to increment version in pom.xml after you changed something in source > > code). > > How to prevent from it? I use ftp server as internal repository (I can > > switch to sth else if it's necessary). I would prefer to fix it on the > > server side instead of pachting deploy-plugin (there is always a chance > > that > > someone will have a wrong version of it). We have a big team of developers > > and I'm affraid we might have some problems with maven (uncontrolled > > overwriting). > > > > Thank You a lot in advance, > > Dariusz > > -- > > View this message in context: > > http://www.nabble.com/How+to+prevent+from+deploying+the+same+version+of+artefact+twice--t1668061.html#a4520449 > > Sent from the Maven - Users forum 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]