You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Ch...@emc.com on 2012/02/15 19:23:14 UTC

customizing the snapshot version build number

I'm trying to figure out a way to get my Hudson build number onto my snapshot artifact names.  I noticed that the timestamp in the snapshot unique version number is followed by a build number.  Is there way to inject my own value here, the Hudson build number for instance.

Re: customizing the snapshot version build number

Posted by Brian Topping <to...@codehaus.org>.
On Feb 22, 2012, at 10:16 AM, <Ch...@emc.com> wrote:

> 
>> P.S. I think screwing around with the Maven snapshot naming scheme is
>> asking for trouble. Putting it in the manifest seems safer to me.
>> Unfortunately, you didn't elaborate on *why* you want to do this, so we
>> can't really comment on any alternative solutions.
>> 
> 
> Oh, I can elaborate ;)  This is currently how my team traces its way back from an binary artifact in the field to source control checkins.  I assume there are much better ways to do this, but, my approach, is an incremental re-work of our nonstandard build with an eye towards the lowest hanging fruit, iteratively.  Know what I mean?

It sounds like you're describing ad-hoc releases.  Recording the SCM id in the manifest will provide traceability, but you're also opening up the can of worms that variances in snapshots of the transitive dependencies make the version of a field installation the *set* of versions for the transitive snapshots that could also vary.  Make sense?  Resolving issues will get a lot harder because of this.

For that reason, I'd adjust your process so field engineers can generate releases on the CI in a self-service manner.  If I were BigCo, I'd probably link the release generation requests to the field sites that use them so that I can figure out what customers have these "releases" when it comes time to get them all updated.

Brian
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


RE: customizing the snapshot version build number

Posted by Ch...@emc.com.
> P.S. I think screwing around with the Maven snapshot naming scheme is
> asking for trouble. Putting it in the manifest seems safer to me.
> Unfortunately, you didn't elaborate on *why* you want to do this, so we
> can't really comment on any alternative solutions.
> 

Oh, I can elaborate ;)  This is currently how my team traces its way back from an binary artifact in the field to source control checkins.  I assume there are much better ways to do this, but, my approach, is an incremental re-work of our nonstandard build with an eye towards the lowest hanging fruit, iteratively.  Know what I mean?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: customizing the snapshot version build number

Posted by Curtis Rueden <ct...@wisc.edu>.
Hi Chad,

I'm trying to figure out a way to get my Hudson build number onto my
> snapshot artifact names.
>

Did you see this thread on the Jenkins mailing list?
http://jenkins.361315.n4.nabble.com/Maven-Artifacts-using-Hudson-build-numbers-td372479.html

In particular, it references this article:
http://weblogs.java.net/blog/johnsmart/archive/2008/03/using_hudson_en.html

It does a similar thing (injects build number into the JAR manifest).

-Curtis

P.S. I think screwing around with the Maven snapshot naming scheme is
asking for trouble. Putting it in the manifest seems safer to me.
Unfortunately, you didn't elaborate on *why* you want to do this, so we
can't really comment on any alternative solutions.


On Wed, Feb 15, 2012 at 12:23 PM, <Ch...@emc.com> wrote:

> I'm trying to figure out a way to get my Hudson build number onto my
> snapshot artifact names.  I noticed that the timestamp in the snapshot
> unique version number is followed by a build number.  Is there way to
> inject my own value here, the Hudson build number for instance.
>