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 12:57:36 GMT
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
>

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