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 "m.lo" <mi...@raiffeisen.ch> on 2010/05/19 10:33:37 UTC

ivy-settings for special revision-keywords (e. g. spring)

Hi,

i experience, that spring sometimes has special keywords in their revisions,
and as far as i can see ivy is not able to handle them by default. my
current problem is with the two modules

name:spring-core, revision:2.5.6
name:spring-core, revision:2.5.6.SEC01

ivy evicts the revision with suffix "SEC01", but its newer

[ivy:resolve] 	org.springframework#spring-core;2.5.6.SEC01 by
[org.springframework#spring-core;2.5.6] in [default]

i would like to keep the conflict-resolution-strategy "latest-revision". i
assume i can define a custom "latest-strategy" in the settings.xml, but my
first tries didn't solve the problem, and the documentation of this feature
i found is quite sparse. my try is:

<!-- start extract of settings-xml -->
<settings defaultResolver="default_chain"
defaultLatestStrategy="custom-latest-revision"
defaultConflictManager="latest-revision"/>
...
	
<latest-strategies>
	<latest-revision name="custom-latest-revision">
		<specialMeaning name="SEC01" value="-1"/>
	</latest-revision>
</latest-strategies>
<!-- end of extract settings-xml -->

can someone give me a hint how to configure ivy such that the
revision-suffix "SEC01" is identified as newer than the revision without
suffix?

thank you very much for your help!
michael
-- 
View this message in context: http://old.nabble.com/ivy-settings-for-special-revision-keywords-%28e.-g.-spring%29-tp28605446p28605446.html
Sent from the ivy-user mailing list archive at Nabble.com.


Re: ivy-settings for special revision-keywords (e. g. spring)

Posted by Maarten Coene <ma...@yahoo.com>.
Maybe you could write your own LatestStrategy implementation and configure Ivy to use this custom strategy instead of the default one?

Maarten



----- Original Message ----
From: m.lo <mi...@raiffeisen.ch>
To: ivy-user@ant.apache.org
Sent: Fri, May 21, 2010 8:49:39 AM
Subject: Re: ivy-settings for special revision-keywords (e. g. spring)


Hi Maarten,

thank you for your reply! Removing the numbers didn't help. I browsed the
ivy-sourcecode a little and found the class "LatestRevisionStrategy" which
seems to be in charge for comparing the revision numbers.

it looks like this to me:
- if the version numbers have a different number of parts (split by "."),
the special meanings are irrelevant for the last part of the longer version
number. if the last part is no number, it is assumed as smaller version
number

I'm looking for another solution now. My goal is that this comparison (2.5.6
vs. 2.5.6.SEC01) don't happen in my resolution.

Michael



Maarten Coene wrote:
> 
> I'm not sure it will help, but could you remove the numbers from your
> custom specialMeaning?
> 
>     <latest-revision name="custom-latest-revision">
>        
> <specialMeaning name="SEC" value="-1"/>
>    
> </latest-revision>
> 
> Maarten
> 
> 
> 
> 
> ----- Original Message ----
> From: m.lo <mi...@raiffeisen.ch>
> To: ivy-user@ant.apache.org
> Sent: Wed, May 19, 2010 10:33:37 AM
> Subject: ivy-settings for special revision-keywords (e. g. spring)
> 
> 
> Hi,
> 
> i experience, that spring sometimes has special keywords in their
> revisions,
> and as far as i can see ivy is not able to handle them by default. my
> current problem is with the two modules
> 
> name:spring-core, revision:2.5.6
> name:spring-core, revision:2.5.6.SEC01
> 
> ivy evicts the revision with suffix "SEC01", but its newer
> 
> [ivy:resolve]     org.springframework#spring-core;2.5.6.SEC01 by
> [org.springframework#spring-core;2.5.6] in [default]
> 
> i would like to keep the conflict-resolution-strategy "latest-revision". i
> assume i can define a custom "latest-strategy" in the settings.xml, but my
> first tries didn't solve the problem, and the documentation of this
> feature
> i found is quite sparse. my try is:
> 
> <!-- start extract of settings-xml -->
> <settings defaultResolver="default_chain"
> defaultLatestStrategy="custom-latest-revision"
> defaultConflictManager="latest-revision"/>
> ...
>    
> <latest-strategies>
>     <latest-revision name="custom-latest-revision">
>         <specialMeaning name="SEC01" value="-1"/>
>     </latest-revision>
> </latest-strategies>
> <!-- end of extract settings-xml -->
> 
> can someone give me a hint how to configure ivy such that the
> revision-suffix "SEC01" is identified as newer than the revision without
> suffix?
> 
> thank you very much for your help!
> michael
> -- 
> View this message in context:
> http://old.nabble.com/ivy-settings-for-special-revision-keywords-%28e.-g.-spring%29-tp28605446p28605446.html
> Sent from the ivy-user mailing list archive at Nabble.com.
> 
> 
>      
> 
> 

-- 
View this message in context: http://old.nabble.com/ivy-settings-for-special-revision-keywords-%28e.-g.-spring%29-tp28605446p28630228.html
Sent from the ivy-user mailing list archive at Nabble.com.


      

Re: ivy-settings for special revision-keywords (e. g. spring)

Posted by "m.lo" <mi...@raiffeisen.ch>.
Hi Maarten,

thank you for your reply! Removing the numbers didn't help. I browsed the
ivy-sourcecode a little and found the class "LatestRevisionStrategy" which
seems to be in charge for comparing the revision numbers.

it looks like this to me:
- if the version numbers have a different number of parts (split by "."),
the special meanings are irrelevant for the last part of the longer version
number. if the last part is no number, it is assumed as smaller version
number

I'm looking for another solution now. My goal is that this comparison (2.5.6
vs. 2.5.6.SEC01) don't happen in my resolution.

Michael



Maarten Coene wrote:
> 
> I'm not sure it will help, but could you remove the numbers from your
> custom specialMeaning?
> 
>     <latest-revision name="custom-latest-revision">
>         
> <specialMeaning name="SEC" value="-1"/>
>     
> </latest-revision>
> 
> Maarten
> 
> 
> 
> 
> ----- Original Message ----
> From: m.lo <mi...@raiffeisen.ch>
> To: ivy-user@ant.apache.org
> Sent: Wed, May 19, 2010 10:33:37 AM
> Subject: ivy-settings for special revision-keywords (e. g. spring)
> 
> 
> Hi,
> 
> i experience, that spring sometimes has special keywords in their
> revisions,
> and as far as i can see ivy is not able to handle them by default. my
> current problem is with the two modules
> 
> name:spring-core, revision:2.5.6
> name:spring-core, revision:2.5.6.SEC01
> 
> ivy evicts the revision with suffix "SEC01", but its newer
> 
> [ivy:resolve]     org.springframework#spring-core;2.5.6.SEC01 by
> [org.springframework#spring-core;2.5.6] in [default]
> 
> i would like to keep the conflict-resolution-strategy "latest-revision". i
> assume i can define a custom "latest-strategy" in the settings.xml, but my
> first tries didn't solve the problem, and the documentation of this
> feature
> i found is quite sparse. my try is:
> 
> <!-- start extract of settings-xml -->
> <settings defaultResolver="default_chain"
> defaultLatestStrategy="custom-latest-revision"
> defaultConflictManager="latest-revision"/>
> ...
>     
> <latest-strategies>
>     <latest-revision name="custom-latest-revision">
>         <specialMeaning name="SEC01" value="-1"/>
>     </latest-revision>
> </latest-strategies>
> <!-- end of extract settings-xml -->
> 
> can someone give me a hint how to configure ivy such that the
> revision-suffix "SEC01" is identified as newer than the revision without
> suffix?
> 
> thank you very much for your help!
> michael
> -- 
> View this message in context:
> http://old.nabble.com/ivy-settings-for-special-revision-keywords-%28e.-g.-spring%29-tp28605446p28605446.html
> Sent from the ivy-user mailing list archive at Nabble.com.
> 
> 
>       
> 
> 

-- 
View this message in context: http://old.nabble.com/ivy-settings-for-special-revision-keywords-%28e.-g.-spring%29-tp28605446p28630228.html
Sent from the ivy-user mailing list archive at Nabble.com.


Re: ivy-settings for special revision-keywords (e. g. spring)

Posted by Maarten Coene <ma...@yahoo.com>.
I'm not sure it will help, but could you remove the numbers from your custom specialMeaning?

    <latest-revision name="custom-latest-revision">
        
<specialMeaning name="SEC" value="-1"/>
    
</latest-revision>

Maarten




----- Original Message ----
From: m.lo <mi...@raiffeisen.ch>
To: ivy-user@ant.apache.org
Sent: Wed, May 19, 2010 10:33:37 AM
Subject: ivy-settings for special revision-keywords (e. g. spring)


Hi,

i experience, that spring sometimes has special keywords in their revisions,
and as far as i can see ivy is not able to handle them by default. my
current problem is with the two modules

name:spring-core, revision:2.5.6
name:spring-core, revision:2.5.6.SEC01

ivy evicts the revision with suffix "SEC01", but its newer

[ivy:resolve]     org.springframework#spring-core;2.5.6.SEC01 by
[org.springframework#spring-core;2.5.6] in [default]

i would like to keep the conflict-resolution-strategy "latest-revision". i
assume i can define a custom "latest-strategy" in the settings.xml, but my
first tries didn't solve the problem, and the documentation of this feature
i found is quite sparse. my try is:

<!-- start extract of settings-xml -->
<settings defaultResolver="default_chain"
defaultLatestStrategy="custom-latest-revision"
defaultConflictManager="latest-revision"/>
...
    
<latest-strategies>
    <latest-revision name="custom-latest-revision">
        <specialMeaning name="SEC01" value="-1"/>
    </latest-revision>
</latest-strategies>
<!-- end of extract settings-xml -->

can someone give me a hint how to configure ivy such that the
revision-suffix "SEC01" is identified as newer than the revision without
suffix?

thank you very much for your help!
michael
-- 
View this message in context: http://old.nabble.com/ivy-settings-for-special-revision-keywords-%28e.-g.-spring%29-tp28605446p28605446.html
Sent from the ivy-user mailing list archive at Nabble.com.