You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ivy-user@ant.apache.org by Konstantin Rekk <ko...@gbv.de> on 2009/01/08 03:56:52 UTC

equal weights in specialMeaning on latest-revision

Hi,

could somebody here please give me some feedback if the following
approach makes sense ( in case it does, there is a patch to make that
possible).

Use case - 
Two Reps: Local and Shared
Local: on developers machine, local-publish goes there, status
integration
Shared: integration tested goes there, status integration

Both reps should have a common buildnumber, i.e. buildnumber is
constructed over both reps (for example by using a buildnumber property
which is checked in SCM, using publication date for builds from
different machines would be an issue). 

Why would one want to do that? So most of the time a developer X working
on module A will use local version of A as dependency for B (B->A) when
working on both modules (A and B), but he should use A's fresh version
from shared after it was integration tested successfully and if it's the
latest according to build number (for example the next morning). An
other developer not working on A but using it (say for some modul C)
would always use the version from shared. Nevertheless it should be easy
to see where a version comes from (local or shared) just looking at the
jar's name.

So the idea is to have some kind of 1.0-local-buildnumber and
1.0-int-buildnumber and forcing the latest-revision to ignore local and
int:

<latest-strategies>
			<latest-revision name="dev-revision"
usedefaultspecialmeanings="false">
				<specialMeaning name="int" value="0"/>
				<specialMeaning name="local" value="0"/>
			</latest-revision>
</latest-strategies> 

It wouldn't work with current source, so in case this approach makes
some sense I provided a tiny patch at:
https://issues.apache.org/jira/browse/IVY-997

I may well be missing some core concept or misusing some features. Any
tips are appreciated.

Konstantin


Re: equal weights in specialMeaning on latest-revision

Posted by Niklas Matthies <ml...@nmhq.net>.
On Thu 2009-01-08 at 03:56h, Konstantin Rekk wrote on ivy-user:
:
> So the idea is to have some kind of 1.0-local-buildnumber and
> 1.0-int-buildnumber and forcing the latest-revision to ignore local and
> int:
> 
> <latest-strategies>
> 			<latest-revision name="dev-revision"
> usedefaultspecialmeanings="false">
[...]

You probably could also simply rely on lexicographical order. If you
drop the "int-", and buildnumber is really a number, then it should be
considered "later" than 'local', if I recall correctly.

I wonder wether it would make sense to give the local publications a
status 'local' rather than 'integration' (where 'local' would be even
"lower" than 'integration'), then you could switch your local build
dependencies individually between "latest.local" and "latest.integration".

-- Niklas Matthies