From continuum-users-return-2336-apmail-maven-continuum-users-archive=maven.apache.org@maven.apache.org Wed Aug 02 16:08:34 2006 Return-Path: Delivered-To: apmail-maven-continuum-users-archive@www.apache.org Received: (qmail 62100 invoked from network); 2 Aug 2006 16:08:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 2 Aug 2006 16:08:34 -0000 Received: (qmail 15276 invoked by uid 500); 2 Aug 2006 16:08:32 -0000 Delivered-To: apmail-maven-continuum-users-archive@maven.apache.org Received: (qmail 15258 invoked by uid 500); 2 Aug 2006 16:08:32 -0000 Mailing-List: contact continuum-users-help@maven.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: continuum-users@maven.apache.org Delivered-To: mailing list continuum-users@maven.apache.org Received: (qmail 15247 invoked by uid 99); 2 Aug 2006 16:08:32 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Aug 2006 09:08:32 -0700 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_ABUSE,HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of binil.thomas.public@gmail.com designates 64.233.182.187 as permitted sender) Received: from [64.233.182.187] (HELO nf-out-0910.google.com) (64.233.182.187) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 02 Aug 2006 09:08:31 -0700 Received: by nf-out-0910.google.com with SMTP id q29so699495nfc for ; Wed, 02 Aug 2006 09:08:07 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:references; b=jT4jtIkt995yjFjYv40pkIMW8HCt+jEZZLdounJGEZkcF+ySzjeiyp1jYEfpwT5+PsEd9uLY1nHHNi+/PkCtVq8mdNiupLk6Ub8df55Ux7IkDxV8HhjhHS/vuCVC9VqBZuRtmihhRDR2ELjRVDFmkloDKByJr3d1owvu2cRM0m4= Received: by 10.82.112.3 with SMTP id k3mr281196buc; Wed, 02 Aug 2006 09:08:07 -0700 (PDT) Received: by 10.82.120.8 with HTTP; Wed, 2 Aug 2006 09:08:07 -0700 (PDT) Message-ID: <6762a1400608020908l4db448c5ifc9d3bafa1474665@mail.gmail.com> Date: Wed, 2 Aug 2006 21:38:07 +0530 From: "Binil Thomas" To: continuum-users@maven.apache.org Subject: Re: SVN Revision Number in the name of a snapshot artifact In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_166_6715985.1154534887185" References: <6762a1400608010409r8931ab4x45139c2654c66a88@mail.gmail.com> <6762a1400608020557s33baba4dh9561dc3df05ad69c@mail.gmail.com> X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_Part_166_6715985.1154534887185 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline Thanks for replying! I think I understand this better now. In my build logs, I have [INFO] [deploy:deploy] [INFO] Retrieving previous build number from artifacts Uploading: /path/to/shared/repo/project/mymodule/1.0-SNAPSHOT/mymodule-1.0-20060802.093051-13.jar 71K uploaded So, it looks like Maven looks at the shared repository, and figures out a version qualifier & build number. The qualifier is the timestamp and build number is figured out by incrementing the last build number. In my case, I guess, since I started from a clean repository and no build has failed yet, the build number corresponds to Continuum build number (which mislead me into thinking that Continuum decides the build number). I will try the Maven user list. Thanks, Binil On 8/2/06, Jesse McConnell wrote: > > ah I see where your going, have you tried the maven users list? that > is very much something that would be configured directly in maven, if > it can be done like you are shooting for, which I am not to confident > would be supported without adding some custom artifact resolvers. > > cheers! > > On 8/2/06, Binil Thomas wrote: > > Hi Jesse, > > > > Thanks for the reply. > > > > I am using SNAPSHOT dependencies between modules. Continuum does > generate > > the SNAPSHOT binaries with a timestamp, and Maven 2 lets developers > depend > > on the latest SNAPSHOT automatically. All that functionality you mention > > works fine for me. > > > > Since the SCM I am using - SVN - does version the repository by revision > > numbers, I am interested in making the artifact's name also to contain > it. > > > > Right now, Continuum generates artifacts named like, say, > > artifact-1.0-20060801.123409-10.jar. Here, the number 10, I think, is > the > > build number. Instead of this, I was hoping that I can get the revision > > number from SVN. This way, looking at the artifact name I can know > precisely > > where it came from. SVN does a great job of ensuring atomic commits and > > maintaining revision numbers for the whole repository; it would be a > shame > > not to make use of that. > > > > To summarize, I am fine with the way SNAPSHOT builds work in general. > All I > > am looking for is a way to make use of the SVN revision number within > the > > SNAPSHOT version number. Note that for non-SNAPSHOT binaries, I *want* > > version numbers exactly as mentioned in the POM. :-) > > > > Thanks, > > Binil > > > > On 8/1/06, Jesse McConnell wrote: > > > > > > I don't really know of a simple way to do that, there are a couple of > > > factors at play here.. > > > > > > the tag in the pom.xml is what governs the version that is > > > appended to the artifact for storage in the repository, and that > > > version doesn't change with scm version numbers anyway that I know of > > > (of course I could be wrong, there might be a way). > > > > > > If you need functionality that can map a version in a repository to a > > > particular snapshot in time of the scm then I would recommend using > > > the SNAPSHOTs setup. In these the version of your pom would be > > > something like 1.0-SNAPSHOT and then whenever continuum deployed the > > > snapshot it would replace that version with a timestamp. That > > > timestamp could be turn be converted into a date that could you pass > > > into subversion and get the checkout of source corresponding to that > > > point in time. > > > > > > that is nice also in that developers using your continuum published > > > repository don't have to do anything to get the latest releases of > > > code into thier development environment, maven will download the > > > latest snapshot for them. > > > > > > anyway, good luck! > > > > > > On 8/1/06, Binil Thomas wrote: > > > > Hi all, > > > > > > > > I am using Continuum 1.0.3, Maven 2.0.4 & SVN . I have configured > > > Continuum > > > > to publish the artifacts it build into a shared repository, as > described > > > in > > > > the 'Better Builds With Maven' book. I would like the revision > number of > > > the > > > > SVN repository to be part of the version number of artifacts > generated > > > by > > > > Continuum. Is there a simple way to achieve this? > > > > > > > > Thanks, > > > > Binil > > > > > > > > PS: I am unsure if this question had been asked here before; I tried > > > > searching the list archives and could not find the answer. > > > > > > > > > > > > > > > > > -- > > > jesse mcconnell > > > jesse.mcconnell@gmail.com > > > > > > > > > > -- > jesse mcconnell > jesse.mcconnell@gmail.com > ------=_Part_166_6715985.1154534887185--