You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Brian Fox <br...@infinity.nu> on 2009/09/04 16:58:39 UTC

Multi-Platform snapshots

I was recently working with a customer to move them off of using
non-unique snapshots for various reasons. In the process we discovered
a problem with snapshots, classifiers and multi-platform builds.

In this scenario, we have a project that is built on multiple
platforms, say windows, solaris and mac. The binaries must be built on
the target platform. The source is the same, so the gav is the same. A
CI build actually consists of 3 builds running in parallel. Each build
deploys a classified artifact where the classifier is the platform, ie
[windows|solaris|mac].

When we flipped them over to using timestamped snapshots, we uncovered
a problem. As each build finishes, maven increments the timestamp and
build number and deploys their artifacts. The trouble is that each
timestamped build consists of only 1/3 of the classified artifacts. So
for example, once the Mac target is deployed, the Windows SNAPSHOT
version is no longer able to be located because the maven-metadata.xml
says the latest is the Mac only build.

Since the source in this case is identical, having separate modules
for this seems out of the way. Classifier really is the right way to
distinguish between different flavors normally, but obviously this
doesn't work well when you have to produce the artifacts from separate
mvn invocations.

It feels to me like we need some better support in Maven to handle
these types of multi-platform builds, but I'm curious how people are
handling it now?

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


Re: Multi-Platform snapshots

Posted by Brian Fox <br...@infinity.nu>.
On Fri, Sep 4, 2009 at 4:36 PM, Jason van Zyl<jv...@sonatype.com> wrote:
> Why not just incorporate the full coordinate in the metadata. This is also a
> problem for finding attached artifacts like javadocs and sources. There is
> no record of them in the metadata. If we had a complete catalog of the the
> artifacts deployed and not just for the primary this would not be an issues,
> yes?

That's one solution, sure. I'm not sure if it fixes the full scope of
multiple target platforms or not, since I don't have enough personal
experience in this area.

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


Re: Multi-Platform snapshots

Posted by Donszelmann Mark <ma...@gmail.com>.
Hi

I had the same problem in with the NAR plugin at the time. No way to  
make those SNAPSHOTS
work if you deploy multi-platform artifacts with classifiers. I hope  
this can be fixed in 3.0 as
there did not seem a way out in 2.x for NAR to handle it correctly.

Regards
Mark Donszelmann

On Sep 4, 2009, at 10:36 PM, Jason van Zyl wrote:

> Why not just incorporate the full coordinate in the metadata. This  
> is also a problem for finding attached artifacts like javadocs and  
> sources. There is no record of them in the metadata. If we had a  
> complete catalog of the the artifacts deployed and not just for the  
> primary this would not be an issues, yes?
>
> On 2009-09-04, at 4:58 PM, Brian Fox wrote:
>
>> I was recently working with a customer to move them off of using
>> non-unique snapshots for various reasons. In the process we  
>> discovered
>> a problem with snapshots, classifiers and multi-platform builds.
>>
>> In this scenario, we have a project that is built on multiple
>> platforms, say windows, solaris and mac. The binaries must be built  
>> on
>> the target platform. The source is the same, so the gav is the  
>> same. A
>> CI build actually consists of 3 builds running in parallel. Each  
>> build
>> deploys a classified artifact where the classifier is the platform,  
>> ie
>> [windows|solaris|mac].
>>
>> When we flipped them over to using timestamped snapshots, we  
>> uncovered
>> a problem. As each build finishes, maven increments the timestamp and
>> build number and deploys their artifacts. The trouble is that each
>> timestamped build consists of only 1/3 of the classified artifacts.  
>> So
>> for example, once the Mac target is deployed, the Windows SNAPSHOT
>> version is no longer able to be located because the maven- 
>> metadata.xml
>> says the latest is the Mac only build.
>>
>> Since the source in this case is identical, having separate modules
>> for this seems out of the way. Classifier really is the right way to
>> distinguish between different flavors normally, but obviously this
>> doesn't work well when you have to produce the artifacts from  
>> separate
>> mvn invocations.
>>
>> It feels to me like we need some better support in Maven to handle
>> these types of multi-platform builds, but I'm curious how people are
>> handling it now?
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>> For additional commands, e-mail: dev-help@maven.apache.org
>>
>
> Thanks,
>
> Jason
>
> ----------------------------------------------------------
> Jason van Zyl
> Founder,  Apache Maven
> http://twitter.com/jvanzyl
> http://twitter.com/SonatypeNexus
> http://twitter.com/SonatypeM2E
> ----------------------------------------------------------
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>


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


Re: Multi-Platform snapshots

Posted by Jason van Zyl <jv...@sonatype.com>.
Why not just incorporate the full coordinate in the metadata. This is  
also a problem for finding attached artifacts like javadocs and  
sources. There is no record of them in the metadata. If we had a  
complete catalog of the the artifacts deployed and not just for the  
primary this would not be an issues, yes?

On 2009-09-04, at 4:58 PM, Brian Fox wrote:

> I was recently working with a customer to move them off of using
> non-unique snapshots for various reasons. In the process we discovered
> a problem with snapshots, classifiers and multi-platform builds.
>
> In this scenario, we have a project that is built on multiple
> platforms, say windows, solaris and mac. The binaries must be built on
> the target platform. The source is the same, so the gav is the same. A
> CI build actually consists of 3 builds running in parallel. Each build
> deploys a classified artifact where the classifier is the platform, ie
> [windows|solaris|mac].
>
> When we flipped them over to using timestamped snapshots, we uncovered
> a problem. As each build finishes, maven increments the timestamp and
> build number and deploys their artifacts. The trouble is that each
> timestamped build consists of only 1/3 of the classified artifacts. So
> for example, once the Mac target is deployed, the Windows SNAPSHOT
> version is no longer able to be located because the maven-metadata.xml
> says the latest is the Mac only build.
>
> Since the source in this case is identical, having separate modules
> for this seems out of the way. Classifier really is the right way to
> distinguish between different flavors normally, but obviously this
> doesn't work well when you have to produce the artifacts from separate
> mvn invocations.
>
> It feels to me like we need some better support in Maven to handle
> these types of multi-platform builds, but I'm curious how people are
> handling it now?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>

Thanks,

Jason

----------------------------------------------------------
Jason van Zyl
Founder,  Apache Maven
http://twitter.com/jvanzyl
http://twitter.com/SonatypeNexus
http://twitter.com/SonatypeM2E
----------------------------------------------------------


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


Re: Multi-Platform snapshots

Posted by Dan Tran <da...@gmail.com>.
I ran to the same thing and ended up to turn off timestamp snapshot

-D

On Fri, Sep 4, 2009 at 8:04 AM, Christian Edward
Gruber<ch...@gmail.com> wrote:
> I've used classifiers before, though I think it's a bit of a hack.  There's
> also the native plugin which makes .nar archives  - you should look and see
> what it does, since it is geared for native c/c++ builds (I believe)
>
> Christian.
>
> On Sep 4, 2009, at 10:58 AM, Brian Fox wrote:
>
>> I was recently working with a customer to move them off of using
>> non-unique snapshots for various reasons. In the process we discovered
>> a problem with snapshots, classifiers and multi-platform builds.
>>
>> In this scenario, we have a project that is built on multiple
>> platforms, say windows, solaris and mac. The binaries must be built on
>> the target platform. The source is the same, so the gav is the same. A
>> CI build actually consists of 3 builds running in parallel. Each build
>> deploys a classified artifact where the classifier is the platform, ie
>> [windows|solaris|mac].
>>
>> When we flipped them over to using timestamped snapshots, we uncovered
>> a problem. As each build finishes, maven increments the timestamp and
>> build number and deploys their artifacts. The trouble is that each
>> timestamped build consists of only 1/3 of the classified artifacts. So
>> for example, once the Mac target is deployed, the Windows SNAPSHOT
>> version is no longer able to be located because the maven-metadata.xml
>> says the latest is the Mac only build.
>>
>> Since the source in this case is identical, having separate modules
>> for this seems out of the way. Classifier really is the right way to
>> distinguish between different flavors normally, but obviously this
>> doesn't work well when you have to produce the artifacts from separate
>> mvn invocations.
>>
>> It feels to me like we need some better support in Maven to handle
>> these types of multi-platform builds, but I'm curious how people are
>> handling it now?
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>> For additional commands, e-mail: dev-help@maven.apache.org
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>

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


Re: Multi-Platform snapshots

Posted by Christian Edward Gruber <ch...@gmail.com>.
I've used classifiers before, though I think it's a bit of a hack.   
There's also the native plugin which makes .nar archives  - you should  
look and see what it does, since it is geared for native c/c++ builds  
(I believe)

Christian.

On Sep 4, 2009, at 10:58 AM, Brian Fox wrote:

> I was recently working with a customer to move them off of using
> non-unique snapshots for various reasons. In the process we discovered
> a problem with snapshots, classifiers and multi-platform builds.
>
> In this scenario, we have a project that is built on multiple
> platforms, say windows, solaris and mac. The binaries must be built on
> the target platform. The source is the same, so the gav is the same. A
> CI build actually consists of 3 builds running in parallel. Each build
> deploys a classified artifact where the classifier is the platform, ie
> [windows|solaris|mac].
>
> When we flipped them over to using timestamped snapshots, we uncovered
> a problem. As each build finishes, maven increments the timestamp and
> build number and deploys their artifacts. The trouble is that each
> timestamped build consists of only 1/3 of the classified artifacts. So
> for example, once the Mac target is deployed, the Windows SNAPSHOT
> version is no longer able to be located because the maven-metadata.xml
> says the latest is the Mac only build.
>
> Since the source in this case is identical, having separate modules
> for this seems out of the way. Classifier really is the right way to
> distinguish between different flavors normally, but obviously this
> doesn't work well when you have to produce the artifacts from separate
> mvn invocations.
>
> It feels to me like we need some better support in Maven to handle
> these types of multi-platform builds, but I'm curious how people are
> handling it now?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>


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


Re: Multi-Platform snapshots

Posted by Paul Gier <pg...@redhat.com>.
I don't think that's really practical if you are tightly integrated with a 
project that has a non-maven build.  We have some projects with Ant builds that 
regularly need to be integrated and tested with Maven built projects.  So it 
might mean deploying a release version once a day in some cases.  This is 
possible, but doesn't seem like an elegant solution.

IMO this is just a limitation of the deploy plugin because deploying multiple 
snapshot files together can be done with the Maven Ant tasks or with a custom 
plugin.

Brian Fox wrote:
> From my point of view you can't have SNAPSHOTs of things not built
> with Maven. Just give them a release version, anything without
> SNAPSHOT and go with it. I would typically use the svn rev if i
> grabbed code, or some other id like a date.
> 
> On Wed, Sep 16, 2009 at 11:01 AM, Paul Gier <pg...@redhat.com> wrote:
>> Another case where this comes up is when deploying snapshot versions of
>> non-maven built jars.  For example I deploy projectA-1-SNAPSHOT using
>> deploy:deploy-file, and now I want to deploy the associated -sources jar.
>>  It will give a new timestamp for the source jar and won't be able to find
>> the first jar I uploaded.
>>
>> Jira issue: MDEPLOY-48
>>
>> Brian Fox wrote:
>>> I was recently working with a customer to move them off of using
>>> non-unique snapshots for various reasons. In the process we discovered
>>> a problem with snapshots, classifiers and multi-platform builds.
>>>
>>> In this scenario, we have a project that is built on multiple
>>> platforms, say windows, solaris and mac. The binaries must be built on
>>> the target platform. The source is the same, so the gav is the same. A
>>> CI build actually consists of 3 builds running in parallel. Each build
>>> deploys a classified artifact where the classifier is the platform, ie
>>> [windows|solaris|mac].
>>>
>>> When we flipped them over to using timestamped snapshots, we uncovered
>>> a problem. As each build finishes, maven increments the timestamp and
>>> build number and deploys their artifacts. The trouble is that each
>>> timestamped build consists of only 1/3 of the classified artifacts. So
>>> for example, once the Mac target is deployed, the Windows SNAPSHOT
>>> version is no longer able to be located because the maven-metadata.xml
>>> says the latest is the Mac only build.
>>>
>>> Since the source in this case is identical, having separate modules
>>> for this seems out of the way. Classifier really is the right way to
>>> distinguish between different flavors normally, but obviously this
>>> doesn't work well when you have to produce the artifacts from separate
>>> mvn invocations.
>>>
>>> It feels to me like we need some better support in Maven to handle
>>> these types of multi-platform builds, but I'm curious how people are
>>> handling it now?
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: dev-help@maven.apache.org
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>> For additional commands, e-mail: dev-help@maven.apache.org
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
> 


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


Re: Multi-Platform snapshots

Posted by Brian Fox <br...@infinity.nu>.
>From my point of view you can't have SNAPSHOTs of things not built
with Maven. Just give them a release version, anything without
SNAPSHOT and go with it. I would typically use the svn rev if i
grabbed code, or some other id like a date.

On Wed, Sep 16, 2009 at 11:01 AM, Paul Gier <pg...@redhat.com> wrote:
> Another case where this comes up is when deploying snapshot versions of
> non-maven built jars.  For example I deploy projectA-1-SNAPSHOT using
> deploy:deploy-file, and now I want to deploy the associated -sources jar.
>  It will give a new timestamp for the source jar and won't be able to find
> the first jar I uploaded.
>
> Jira issue: MDEPLOY-48
>
> Brian Fox wrote:
>>
>> I was recently working with a customer to move them off of using
>> non-unique snapshots for various reasons. In the process we discovered
>> a problem with snapshots, classifiers and multi-platform builds.
>>
>> In this scenario, we have a project that is built on multiple
>> platforms, say windows, solaris and mac. The binaries must be built on
>> the target platform. The source is the same, so the gav is the same. A
>> CI build actually consists of 3 builds running in parallel. Each build
>> deploys a classified artifact where the classifier is the platform, ie
>> [windows|solaris|mac].
>>
>> When we flipped them over to using timestamped snapshots, we uncovered
>> a problem. As each build finishes, maven increments the timestamp and
>> build number and deploys their artifacts. The trouble is that each
>> timestamped build consists of only 1/3 of the classified artifacts. So
>> for example, once the Mac target is deployed, the Windows SNAPSHOT
>> version is no longer able to be located because the maven-metadata.xml
>> says the latest is the Mac only build.
>>
>> Since the source in this case is identical, having separate modules
>> for this seems out of the way. Classifier really is the right way to
>> distinguish between different flavors normally, but obviously this
>> doesn't work well when you have to produce the artifacts from separate
>> mvn invocations.
>>
>> It feels to me like we need some better support in Maven to handle
>> these types of multi-platform builds, but I'm curious how people are
>> handling it now?
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>> For additional commands, e-mail: dev-help@maven.apache.org
>>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>

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


Re: Multi-Platform snapshots

Posted by Paul Gier <pg...@redhat.com>.
Another case where this comes up is when deploying snapshot versions of 
non-maven built jars.  For example I deploy projectA-1-SNAPSHOT using 
deploy:deploy-file, and now I want to deploy the associated -sources jar.  It 
will give a new timestamp for the source jar and won't be able to find the first 
jar I uploaded.

Jira issue: MDEPLOY-48

Brian Fox wrote:
> I was recently working with a customer to move them off of using
> non-unique snapshots for various reasons. In the process we discovered
> a problem with snapshots, classifiers and multi-platform builds.
> 
> In this scenario, we have a project that is built on multiple
> platforms, say windows, solaris and mac. The binaries must be built on
> the target platform. The source is the same, so the gav is the same. A
> CI build actually consists of 3 builds running in parallel. Each build
> deploys a classified artifact where the classifier is the platform, ie
> [windows|solaris|mac].
> 
> When we flipped them over to using timestamped snapshots, we uncovered
> a problem. As each build finishes, maven increments the timestamp and
> build number and deploys their artifacts. The trouble is that each
> timestamped build consists of only 1/3 of the classified artifacts. So
> for example, once the Mac target is deployed, the Windows SNAPSHOT
> version is no longer able to be located because the maven-metadata.xml
> says the latest is the Mac only build.
> 
> Since the source in this case is identical, having separate modules
> for this seems out of the way. Classifier really is the right way to
> distinguish between different flavors normally, but obviously this
> doesn't work well when you have to produce the artifacts from separate
> mvn invocations.
> 
> It feels to me like we need some better support in Maven to handle
> these types of multi-platform builds, but I'm curious how people are
> handling it now?
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
> 



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


Re: Multi-Platform snapshots

Posted by Brett Porter <br...@apache.org>.
On 08/09/2009, at 5:44 PM, Jason van Zyl wrote:

> I don't think changing the POM or metadata formats in 3.0 is a good  
> idea. 3.0 needs to be release and we watch how it's working and make  
> any and all corrections to move 2.x users forward in a drop-in  
> replacement fashion. In the planning for 3.1 we should start talking  
> about additions to the model. I think in 3.x the metadata format can  
> be used in 3.x and not affect 2.x. It's too late now to make  
> something future proof in Maven for the POM and metadata model. I  
> think that's going to take some serious work as I would like not to  
> ever have to worry about versions changes again.

Sorry, I just meant the infrastucture to facilitate it, not  
necessarily changes themselves. Anyway, I agree on all that.

>
> One strategy I have been using a lot is actually encapsulating  
> pseudo model changes is specifying them in plugins. This might not  
> be the most elegant solution but it works. I was playing around with  
> this for mixins. I just specify they in a plugin instead of having  
> to make model changes. It's backward compatible and it works. Low  
> tech but the plugin element is the form of namespacing we have and  
> maybe we just leverage that.

Makes sense.

>
> On 2009-09-08, at 3:04 AM, Brett Porter wrote:
>
>>
>> On 07/09/2009, at 11:55 PM, Jason van Zyl wrote:
>>
>>> I don't think this is very hard and for 2.x we could just leave  
>>> the old format. 3.x can read both and we'll phase out the old  
>>> format.
>>
>> This has to include the POM too:
>>
>> http://markmail.org/message/a42w3dqkmogbj4rq
>>
>> I think there's pretty good consensus on this, and I've been  
>> itching at it for years. Is it in scope for 3.0 so that the POM and  
>> metadata can evolve going forward?
>>
>> - Brett
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>> For additional commands, e-mail: dev-help@maven.apache.org
>>
>
> Thanks,
>
> Jason
>
> ----------------------------------------------------------
> Jason van Zyl
> Founder,  Apache Maven
> http://twitter.com/jvanzyl
> http://twitter.com/SonatypeNexus
> http://twitter.com/SonatypeM2E
> ----------------------------------------------------------
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>


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


Re: Multi-Platform snapshots

Posted by Jason van Zyl <jv...@sonatype.com>.
I don't think changing the POM or metadata formats in 3.0 is a good  
idea. 3.0 needs to be release and we watch how it's working and make  
any and all corrections to move 2.x users forward in a drop-in  
replacement fashion. In the planning for 3.1 we should start talking  
about additions to the model. I think in 3.x the metadata format can  
be used in 3.x and not affect 2.x. It's too late now to make something  
future proof in Maven for the POM and metadata model. I think that's  
going to take some serious work as I would like not to ever have to  
worry about versions changes again.

One strategy I have been using a lot is actually encapsulating pseudo  
model changes is specifying them in plugins. This might not be the  
most elegant solution but it works. I was playing around with this for  
mixins. I just specify they in a plugin instead of having to make  
model changes. It's backward compatible and it works. Low tech but the  
plugin element is the form of namespacing we have and maybe we just  
leverage that.

On 2009-09-08, at 3:04 AM, Brett Porter wrote:

>
> On 07/09/2009, at 11:55 PM, Jason van Zyl wrote:
>
>> I don't think this is very hard and for 2.x we could just leave the  
>> old format. 3.x can read both and we'll phase out the old format.
>
> This has to include the POM too:
>
> http://markmail.org/message/a42w3dqkmogbj4rq
>
> I think there's pretty good consensus on this, and I've been itching  
> at it for years. Is it in scope for 3.0 so that the POM and metadata  
> can evolve going forward?
>
> - Brett
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>

Thanks,

Jason

----------------------------------------------------------
Jason van Zyl
Founder,  Apache Maven
http://twitter.com/jvanzyl
http://twitter.com/SonatypeNexus
http://twitter.com/SonatypeM2E
----------------------------------------------------------


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


Re: Multi-Platform snapshots

Posted by Brett Porter <br...@apache.org>.
On 07/09/2009, at 11:55 PM, Jason van Zyl wrote:

> I don't think this is very hard and for 2.x we could just leave the  
> old format. 3.x can read both and we'll phase out the old format.

This has to include the POM too:

http://markmail.org/message/a42w3dqkmogbj4rq

I think there's pretty good consensus on this, and I've been itching  
at it for years. Is it in scope for 3.0 so that the POM and metadata  
can evolve going forward?

- Brett


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


Re: Multi-Platform snapshots

Posted by Jason van Zyl <jv...@sonatype.com>.
I don't think this is very hard and for 2.x we could just leave the  
old format. 3.x can read both and we'll phase out the old format.

On 2009-09-07, at 10:15 AM, Tamás Cservenák wrote:

> I think that extending the repo metadata with full coordinates is
> still the best general solution.
>
> These builds are de facto different builds, I see no value producing
> them with _same_ timestamp. They will all be resolvable using standard
> metadata resolution and version "1.0-SNAPSHOT" to their latest
> versions. Since they are different OSes, and different machines, the
> builds should be considered separate too.
>
> Thanks,
> ~t~
>
> On Mon, Sep 7, 2009 at 3:16 AM, Brian Fox<br...@infinity.nu> wrote:
>>> I agree, but I got the feeling Brian would like the same version  
>>> on these
>>> parallel builds which will need extra to make sure they are in sync.
>>>
>> I'm just exploring the concepts and options. I think most cases could
>> be solved by being able to resolve the latest snapshot of a  
>> particular
>> classifier...which means tracking that info in the metadata in
>> addition to what's currently there. I don't know how you would
>> synchronize the output of multiple systems to try and have a
>> consistent "version" ie timestamp...nor if that would even be better
>> than tracking the classifier.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>> For additional commands, e-mail: dev-help@maven.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>

Thanks,

Jason

----------------------------------------------------------
Jason van Zyl
Founder,  Apache Maven
http://twitter.com/jvanzyl
http://twitter.com/SonatypeNexus
http://twitter.com/SonatypeM2E
----------------------------------------------------------


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


Re: Multi-Platform snapshots

Posted by Tamás Cservenák <ta...@cservenak.net>.
I think that extending the repo metadata with full coordinates is
still the best general solution.

These builds are de facto different builds, I see no value producing
them with _same_ timestamp. They will all be resolvable using standard
metadata resolution and version "1.0-SNAPSHOT" to their latest
versions. Since they are different OSes, and different machines, the
builds should be considered separate too.

Thanks,
~t~

On Mon, Sep 7, 2009 at 3:16 AM, Brian Fox<br...@infinity.nu> wrote:
>> I agree, but I got the feeling Brian would like the same version on these
>> parallel builds which will need extra to make sure they are in sync.
>>
> I'm just exploring the concepts and options. I think most cases could
> be solved by being able to resolve the latest snapshot of a particular
> classifier...which means tracking that info in the metadata in
> addition to what's currently there. I don't know how you would
> synchronize the output of multiple systems to try and have a
> consistent "version" ie timestamp...nor if that would even be better
> than tracking the classifier.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>

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


Re: Multi-Platform snapshots

Posted by Brian Fox <br...@infinity.nu>.
> I agree, but I got the feeling Brian would like the same version on these
> parallel builds which will need extra to make sure they are in sync.
>
I'm just exploring the concepts and options. I think most cases could
be solved by being able to resolve the latest snapshot of a particular
classifier...which means tracking that info in the metadata in
addition to what's currently there. I don't know how you would
synchronize the output of multiple systems to try and have a
consistent "version" ie timestamp...nor if that would even be better
than tracking the classifier.

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


Re: Multi-Platform snapshots

Posted by Brett Porter <br...@apache.org>.
On 06/09/2009, at 4:57 AM, Jason van Zyl wrote:

>
> On 2009-09-05, at 4:51 PM, Brett Porter wrote:
>
>>
>> On 05/09/2009, at 12:58 AM, Brian Fox wrote:
>>
>>> Since the source in this case is identical, having separate modules
>>> for this seems out of the way. Classifier really is the right way to
>>> distinguish between different flavors normally, but obviously this
>>> doesn't work well when you have to produce the artifacts from  
>>> separate
>>> mvn invocations.
>>>
>>> It feels to me like we need some better support in Maven to handle
>>> these types of multi-platform builds, but I'm curious how people are
>>> handling it now?
>>
>> Given they are separate executions, there isn't much Maven can do.  
>> To throw out some ideas, a "partial deploy" that only deploys new  
>> attachments and reuses metadata is one option, but potentially  
>> unreliable with sequencing. I'd think you're better off being able  
>> to pass in a "forced" timestamp and build number rather than having  
>> Maven allocate it (would help for all those wanting to use svn rev  
>> or CI build number instead too). If you still want to use the Maven  
>> metadata, something will need to query the repository to figure out  
>> what to use itself.
>>
>
> Without a full description of each artifact that is actually  
> deployed nothing is going to work reliably. Only taking into account  
> the primary artifact is just a short coming we need to address.

I agree, but I got the feeling Brian would like the same version on  
these parallel builds which will need extra to make sure they are in  
sync.

- Brett


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


Re: Multi-Platform snapshots

Posted by Jason van Zyl <jv...@sonatype.com>.
On 2009-09-05, at 4:51 PM, Brett Porter wrote:

>
> On 05/09/2009, at 12:58 AM, Brian Fox wrote:
>
>> Since the source in this case is identical, having separate modules
>> for this seems out of the way. Classifier really is the right way to
>> distinguish between different flavors normally, but obviously this
>> doesn't work well when you have to produce the artifacts from  
>> separate
>> mvn invocations.
>>
>> It feels to me like we need some better support in Maven to handle
>> these types of multi-platform builds, but I'm curious how people are
>> handling it now?
>
> Given they are separate executions, there isn't much Maven can do.  
> To throw out some ideas, a "partial deploy" that only deploys new  
> attachments and reuses metadata is one option, but potentially  
> unreliable with sequencing. I'd think you're better off being able  
> to pass in a "forced" timestamp and build number rather than having  
> Maven allocate it (would help for all those wanting to use svn rev  
> or CI build number instead too). If you still want to use the Maven  
> metadata, something will need to query the repository to figure out  
> what to use itself.
>

Without a full description of each artifact that is actually deployed  
nothing is going to work reliably. Only taking into account the  
primary artifact is just a short coming we need to address.

> HTH,
> - Brett
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>

Thanks,

Jason

----------------------------------------------------------
Jason van Zyl
Founder,  Apache Maven
http://twitter.com/jvanzyl
http://twitter.com/SonatypeNexus
http://twitter.com/SonatypeM2E
----------------------------------------------------------


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


Re: Multi-Platform snapshots

Posted by Brett Porter <br...@apache.org>.
On 05/09/2009, at 12:58 AM, Brian Fox wrote:

> Since the source in this case is identical, having separate modules
> for this seems out of the way. Classifier really is the right way to
> distinguish between different flavors normally, but obviously this
> doesn't work well when you have to produce the artifacts from separate
> mvn invocations.
>
> It feels to me like we need some better support in Maven to handle
> these types of multi-platform builds, but I'm curious how people are
> handling it now?

Given they are separate executions, there isn't much Maven can do. To  
throw out some ideas, a "partial deploy" that only deploys new  
attachments and reuses metadata is one option, but potentially  
unreliable with sequencing. I'd think you're better off being able to  
pass in a "forced" timestamp and build number rather than having Maven  
allocate it (would help for all those wanting to use svn rev or CI  
build number instead too). If you still want to use the Maven  
metadata, something will need to query the repository to figure out  
what to use itself.

HTH,
- Brett


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


Re: Multi-Platform snapshots

Posted by Brian Fox <br...@infinity.nu>.
On Fri, Sep 4, 2009 at 11:12 AM, Stephen
Connolly<st...@gmail.com> wrote:
> In fact we rarely deploy -SNAPSHOTs at all... the only time we have deployed
> -SNAPSHOT builds is when SV have a complex test scenario and we need to
> check the fix before we roll a big suite release
>

The normal best practice is to have a CI system deploying your snapshots.

> 2009/9/4 Stephen Connolly <st...@gmail.com>
>
>> I find that we have given up on unique snapshots....
>>
>> we just use non-unique all the time.
>>
>> if you need a unique snapshot, just roll a release, e.g. 1.0-milestone-1


I'm not condoning using the timestamp in lieu of a version number, in
fact that's pretty much impossible when you have a repo manager
cleaning up old snapshots. I just think it's more reliable in terms of
proxies and read/write access to files when you aren't stomping on the
same one over and over. And I also like to look in my repo or my
package and know exactly which snapshot i have in case there's a
discrepancy.

>>
>> -Stephen
>>
>> 2009/9/4 Brian Fox <br...@infinity.nu>
>>
>> I was recently working with a customer to move them off of using
>>> non-unique snapshots for various reasons. In the process we discovered
>>> a problem with snapshots, classifiers and multi-platform builds.
>>>
>>> In this scenario, we have a project that is built on multiple
>>> platforms, say windows, solaris and mac. The binaries must be built on
>>> the target platform. The source is the same, so the gav is the same. A
>>> CI build actually consists of 3 builds running in parallel. Each build
>>> deploys a classified artifact where the classifier is the platform, ie
>>> [windows|solaris|mac].
>>>
>>> When we flipped them over to using timestamped snapshots, we uncovered
>>> a problem. As each build finishes, maven increments the timestamp and
>>> build number and deploys their artifacts. The trouble is that each
>>> timestamped build consists of only 1/3 of the classified artifacts. So
>>> for example, once the Mac target is deployed, the Windows SNAPSHOT
>>> version is no longer able to be located because the maven-metadata.xml
>>> says the latest is the Mac only build.
>>>
>>> Since the source in this case is identical, having separate modules
>>> for this seems out of the way. Classifier really is the right way to
>>> distinguish between different flavors normally, but obviously this
>>> doesn't work well when you have to produce the artifacts from separate
>>> mvn invocations.
>>>
>>> It feels to me like we need some better support in Maven to handle
>>> these types of multi-platform builds, but I'm curious how people are
>>> handling it now?
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: dev-help@maven.apache.org
>>>
>>>
>>
>

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


Re: Multi-Platform snapshots

Posted by Christian Edward Gruber <ch...@gmail.com>.
True - I missed that part.  We used -SNAPSHOT only for volatile  
versions, but if we wanted to lock in on a specific snapshot, we'd  
roll a milestone or nightly build.  In fact, one client just rolled a  
nightly release and stamped it 1.2.3-NIGHTLY-20070325 (or so). But  
this is a real release, just like 1.5-alpha-5 would be.

Christian.

On Sep 4, 2009, at 11:12 AM, Stephen Connolly wrote:

> In fact we rarely deploy -SNAPSHOTs at all... the only time we have  
> deployed
> -SNAPSHOT builds is when SV have a complex test scenario and we need  
> to
> check the fix before we roll a big suite release
>
> 2009/9/4 Stephen Connolly <st...@gmail.com>
>
>> I find that we have given up on unique snapshots....
>>
>> we just use non-unique all the time.
>>
>> if you need a unique snapshot, just roll a release, e.g. 1.0- 
>> milestone-1
>>
>> -Stephen
>>
>> 2009/9/4 Brian Fox <br...@infinity.nu>
>>
>> I was recently working with a customer to move them off of using
>>> non-unique snapshots for various reasons. In the process we  
>>> discovered
>>> a problem with snapshots, classifiers and multi-platform builds.
>>>
>>> In this scenario, we have a project that is built on multiple
>>> platforms, say windows, solaris and mac. The binaries must be  
>>> built on
>>> the target platform. The source is the same, so the gav is the  
>>> same. A
>>> CI build actually consists of 3 builds running in parallel. Each  
>>> build
>>> deploys a classified artifact where the classifier is the  
>>> platform, ie
>>> [windows|solaris|mac].
>>>
>>> When we flipped them over to using timestamped snapshots, we  
>>> uncovered
>>> a problem. As each build finishes, maven increments the timestamp  
>>> and
>>> build number and deploys their artifacts. The trouble is that each
>>> timestamped build consists of only 1/3 of the classified  
>>> artifacts. So
>>> for example, once the Mac target is deployed, the Windows SNAPSHOT
>>> version is no longer able to be located because the maven- 
>>> metadata.xml
>>> says the latest is the Mac only build.
>>>
>>> Since the source in this case is identical, having separate modules
>>> for this seems out of the way. Classifier really is the right way to
>>> distinguish between different flavors normally, but obviously this
>>> doesn't work well when you have to produce the artifacts from  
>>> separate
>>> mvn invocations.
>>>
>>> It feels to me like we need some better support in Maven to handle
>>> these types of multi-platform builds, but I'm curious how people are
>>> handling it now?
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>>> For additional commands, e-mail: dev-help@maven.apache.org
>>>
>>>
>>


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


Re: Multi-Platform snapshots

Posted by Stephen Connolly <st...@gmail.com>.
In fact we rarely deploy -SNAPSHOTs at all... the only time we have deployed
-SNAPSHOT builds is when SV have a complex test scenario and we need to
check the fix before we roll a big suite release

2009/9/4 Stephen Connolly <st...@gmail.com>

> I find that we have given up on unique snapshots....
>
> we just use non-unique all the time.
>
> if you need a unique snapshot, just roll a release, e.g. 1.0-milestone-1
>
> -Stephen
>
> 2009/9/4 Brian Fox <br...@infinity.nu>
>
> I was recently working with a customer to move them off of using
>> non-unique snapshots for various reasons. In the process we discovered
>> a problem with snapshots, classifiers and multi-platform builds.
>>
>> In this scenario, we have a project that is built on multiple
>> platforms, say windows, solaris and mac. The binaries must be built on
>> the target platform. The source is the same, so the gav is the same. A
>> CI build actually consists of 3 builds running in parallel. Each build
>> deploys a classified artifact where the classifier is the platform, ie
>> [windows|solaris|mac].
>>
>> When we flipped them over to using timestamped snapshots, we uncovered
>> a problem. As each build finishes, maven increments the timestamp and
>> build number and deploys their artifacts. The trouble is that each
>> timestamped build consists of only 1/3 of the classified artifacts. So
>> for example, once the Mac target is deployed, the Windows SNAPSHOT
>> version is no longer able to be located because the maven-metadata.xml
>> says the latest is the Mac only build.
>>
>> Since the source in this case is identical, having separate modules
>> for this seems out of the way. Classifier really is the right way to
>> distinguish between different flavors normally, but obviously this
>> doesn't work well when you have to produce the artifacts from separate
>> mvn invocations.
>>
>> It feels to me like we need some better support in Maven to handle
>> these types of multi-platform builds, but I'm curious how people are
>> handling it now?
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
>> For additional commands, e-mail: dev-help@maven.apache.org
>>
>>
>

Re: Multi-Platform snapshots

Posted by Stephen Connolly <st...@gmail.com>.
I find that we have given up on unique snapshots....

we just use non-unique all the time.

if you need a unique snapshot, just roll a release, e.g. 1.0-milestone-1

-Stephen

2009/9/4 Brian Fox <br...@infinity.nu>

> I was recently working with a customer to move them off of using
> non-unique snapshots for various reasons. In the process we discovered
> a problem with snapshots, classifiers and multi-platform builds.
>
> In this scenario, we have a project that is built on multiple
> platforms, say windows, solaris and mac. The binaries must be built on
> the target platform. The source is the same, so the gav is the same. A
> CI build actually consists of 3 builds running in parallel. Each build
> deploys a classified artifact where the classifier is the platform, ie
> [windows|solaris|mac].
>
> When we flipped them over to using timestamped snapshots, we uncovered
> a problem. As each build finishes, maven increments the timestamp and
> build number and deploys their artifacts. The trouble is that each
> timestamped build consists of only 1/3 of the classified artifacts. So
> for example, once the Mac target is deployed, the Windows SNAPSHOT
> version is no longer able to be located because the maven-metadata.xml
> says the latest is the Mac only build.
>
> Since the source in this case is identical, having separate modules
> for this seems out of the way. Classifier really is the right way to
> distinguish between different flavors normally, but obviously this
> doesn't work well when you have to produce the artifacts from separate
> mvn invocations.
>
> It feels to me like we need some better support in Maven to handle
> these types of multi-platform builds, but I'm curious how people are
> handling it now?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>