You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomee.apache.org by Jacek Laskowski <ja...@laskowski.net.pl> on 2007/05/20 12:39:15 UTC

uniqueVersion=true makes SNASPHOT nicer

Hi,

Just spot it today and thought I'd share it here for further consideration.

Every time Geronimo is released we're bothered with releasing OpenEJB
3.0 so no SNAPSHOT is to be included in a milestone release. I came
across the uniqueVersion element of snapshotRepository [1] that could
make the process nicer. If we used uniqueVersion instead of SNAPSHOT
while deploying openejb to the remote repository Geronimo could rely
on them rather than SNAPSHOTs that seem unreliable and error-prone.
It's a trade-off - a mini-release - between SNAPSHOTs and full-blown
releases. If we think Geronimo should use a higher version after it's
been published to a remote repository, Geronimo would be upgraded,
else it'd hold the earlier semi-SNAPSHOT.

WDYT?

[1] http://maven.apache.org/ref/2.0.4/maven-model/maven.html#class_snapshotRepository

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl

Re: uniqueVersion=true makes SNASPHOT nicer

Posted by Jacek Laskowski <ja...@laskowski.net.pl>.
On 5/20/07, David Blevins <da...@visi.com> wrote:

> That's enabled by default.

Well, but its use is none. I mean no project I've seen uses it.

>  I think Geronimo just prefers the SNAPSHOT version.

Oh, really? I don't think so - when a release time comes we'll hear about it.

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl

Re: uniqueVersion=true makes SNASPHOT nicer

Posted by David Blevins <da...@visi.com>.
On May 20, 2007, at 3:39 AM, Jacek Laskowski wrote:

> Hi,
>
> Just spot it today and thought I'd share it here for further  
> consideration.
>
> Every time Geronimo is released we're bothered with releasing OpenEJB
> 3.0 so no SNAPSHOT is to be included in a milestone release. I came
> across the uniqueVersion element of snapshotRepository [1] that could
> make the process nicer. If we used uniqueVersion instead of SNAPSHOT
> while deploying openejb to the remote repository Geronimo could rely
> on them rather than SNAPSHOTs that seem unreliable and error-prone.
> It's a trade-off - a mini-release - between SNAPSHOTs and full-blown
> releases. If we think Geronimo should use a higher version after it's
> been published to a remote repository, Geronimo would be upgraded,
> else it'd hold the earlier semi-SNAPSHOT.
>
> WDYT?
>
> [1] http://maven.apache.org/ref/2.0.4/maven-model/ 
> maven.html#class_snapshotRepository

That's enabled by default.  I think Geronimo just prefers the  
SNAPSHOT version.

-David


Re: uniqueVersion=true makes SNASPHOT nicer

Posted by Jacek Laskowski <ja...@laskowski.net.pl>.
On 5/21/07, Jason Dillon <ja...@planet57.com> wrote:

> OpenEJB is a wee little project (er, from size of modules, not from
> purpose and functionality) so I would not expect you to have too much
> problems using Maven.  What exactly are the issues you are seeing?

Nothing really. Just thought it might help with Geronimo dependency on
openejb snapshots. I thought it's sort of an undocumented feature or
possibly a great idea (a humble opinion of mine  ;-)) that a feature
intended for something else can be used differently.

Thanks for the thorough explanation. It helped me a lot!

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl

Re: uniqueVersion=true makes SNASPHOT nicer

Posted by Jason Dillon <ja...@planet57.com>.
On May 21, 2007, at 12:09 AM, Jacek Laskowski wrote:
> n 5/20/07, Jason Dillon <ja...@planet57.com> wrote:
>
>> I really don't see how using this helps with anything... 'cept maybe
>> reduce the number of artifacts in the repo, and maybe remove the need
>> for that ${version} properly... at the expense of users not being
>> able to use past snapshot artifacts when newer snaps break their
>> project.
>
> I meant (but never tried it myself, but I guess I should) that
> declaring dependency with an exact number not SNAPSHOT would work as
> if the SNAPSHOT were released. Might it work?

Yes, this will trick Maven's release muck and snapshot updating logic  
into thinking that those SNAPSHOT artifacts are not really  
SNAPSHOTs... but in reality they still are.  I've sent lots of mail  
on this to the G list specifically about using these types of pinned  
SNAPSHOT artifacts and how that is very harmful.

The crux of the problem is that these *are still SNAPSHOT artifacts*  
and they still live in SNAPSHOT repositories, which most have a lax  
policy about keeping those artifacts around or changing them.   
Compaired to non-SNAPSHOT repositories, which are (in theory)  
supposed to contain artifacts that never change and are never  
removed.  Of course we all know that is crazy to rely on, since its  
just a filesystem, with no real checks or balances to ensure that  
policy is enforced, but that is how they are supposed to work.

I can go on and on if you need more clarification for why its bad to  
use pinned snapshots, except in very rare cases (and maybe not even  
then its really a good choice).  I certainly do *not* recommend using  
them unless you really, really, really need to.

Um... and really, if that was what you were talking about I certainly  
did not get that from the content of your mail :-P

  * * *

Maven is good and Maven is bad... sometimes you love it, sometimes  
you hate it... or at least that is how it is for me.  I keep thinking  
about rewriting something like Maven with out all of its horrible  
wrinkles, but really I'd just end up making another beast that sucked  
in other ways ;-)

The idea you are floating here to "get around" problems with Maven is  
really going to just cause you more and more problems.  Its Maven's  
way or the highway in this case... if you try to hack around problems  
like this you are going to end up with build roadkill for dinner (not  
really my favorite choice for dinner).

The way to fix this is to... get dependency projects to publish  
SNAPSHOTs to keep up with code changes, or limit your dependence on  
SNAPSHOT artifacts.  The latter is obviously preferred and easier,  
though not always possible... which is almost certainly the case with  
the relationship between the Geronimo and OpenEJB projects.

  * * *

OpenEJB is a wee little project (er, from size of modules, not from  
purpose and functionality) so I would not expect you to have too much  
problems using Maven.  What exactly are the issues you are seeing?

--jason

Re: uniqueVersion=true makes SNASPHOT nicer

Posted by Jacek Laskowski <ja...@laskowski.net.pl>.
n 5/20/07, Jason Dillon <ja...@planet57.com> wrote:

> I really don't see how using this helps with anything... 'cept maybe
> reduce the number of artifacts in the repo, and maybe remove the need
> for that ${version} properly... at the expense of users not being
> able to use past snapshot artifacts when newer snaps break their
> project.

I meant (but never tried it myself, but I guess I should) that
declaring dependency with an exact number not SNAPSHOT would work as
if the SNAPSHOT were released. Might it work?

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl

Re: uniqueVersion=true makes SNASPHOT nicer

Posted by Jason Dillon <ja...@planet57.com>.
Setting uniqueVersion = false, causes artifacts with SNAPSHOT  
versions to be published as the exact version, and not with a unique  
timestamp-buildnumber.

So, you don't really use uniqueVersion instead of SNAPSHOT, you use  
it with SNAPSHOT.

And uniqueVersion is set to true by default in Maven, which is why by  
default when you publish SNAPSHOTS that it makes timestamp- 
buildnumber artifacts in the remote repository.

I really don't see how using this helps with anything... 'cept maybe  
reduce the number of artifacts in the repo, and maybe remove the need  
for that ${version} properly... at the expense of users not being  
able to use past snapshot artifacts when newer snaps break their  
project.

--jason


On May 20, 2007, at 3:39 AM, Jacek Laskowski wrote:

> Hi,
>
> Just spot it today and thought I'd share it here for further  
> consideration.
>
> Every time Geronimo is released we're bothered with releasing OpenEJB
> 3.0 so no SNAPSHOT is to be included in a milestone release. I came
> across the uniqueVersion element of snapshotRepository [1] that could
> make the process nicer. If we used uniqueVersion instead of SNAPSHOT
> while deploying openejb to the remote repository Geronimo could rely
> on them rather than SNAPSHOTs that seem unreliable and error-prone.
> It's a trade-off - a mini-release - between SNAPSHOTs and full-blown
> releases. If we think Geronimo should use a higher version after it's
> been published to a remote repository, Geronimo would be upgraded,
> else it'd hold the earlier semi-SNAPSHOT.
>
> WDYT?
>
> [1] http://maven.apache.org/ref/2.0.4/maven-model/ 
> maven.html#class_snapshotRepository
>
> Jacek
>
> -- 
> Jacek Laskowski
> http://www.JacekLaskowski.pl