continuum-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Binil Thomas" <binil.thomas.pub...@gmail.com>
Subject Re: SVN Revision Number in the name of a snapshot artifact
Date Wed, 02 Aug 2006 16:08:07 GMT
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 <jesse.mcconnell@gmail.com> 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 <binil.thomas.public@gmail.com> 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 <jesse.mcconnell@gmail.com> wrote:
> > >
> > > I don't really know of a simple way to do that, there are a couple of
> > > factors at play here..
> > >
> > > the <version> 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 <binil.thomas.public@gmail.com> 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
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message