ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bhatia <Bha...@OFAC.CH>
Subject Re: artifact and ivy pattern
Date Tue, 17 Jul 2007 09:59:49 GMT

I tried putting multiple patterns in my ivyconf.xml (as shown below) but Ivy
still complains; I dont know what I am doing wrong though.

<ivyconf>
	<conf defaultResolver="shared"/>
    <!-- on utilise un seul repertoire comme cellier -->
	<property name="cellier" value="I:/shared" />	
	<!-- pour ne pas genener les checksums -->
	<property name="ivy.checksums" value="" />		
	<resolvers checksums="false">
		<filesystem name="shared">
		    <ivy
pattern="${cellier}/[organisation]/[module]/[revision]/[type]s/[artifact](-[revision]).[ext],
${cellier}/[organisation]/[module]/[revision]/[type]s/[artifact].[ext]"/>		
			<artifact
pattern="${cellier}/[organisation]/[module]/[revision]/[type]s/[artifact](-[revision]).[ext],
${cellier}/[organisation]/[module]/[revision]/[type]s/[artifact].[ext]" />						
		</filesystem>			
	</resolvers>
	     
	<classpath file
="I:/shared/ofac/OFACDependencies/HEAD/jars/OFACDependencies.jar"/>

    <!-- strategie qui considere que CURRENT est plus recent que HEAD qui
est plus recent que prod etc...
         OfacLatestStrategyTest donne une bonne idee de son comportement.
-->
	<typedef name="ofac-latest-strategy" classname =
"ch.ofac.ivy.latest.OfacLatestStrategy"/>
    <latest-strategies>
       <ofac-latest-strategy name="ofac-latest" />
	</latest-strategies> 

    <!-- Conflict manager qui utilise la strategie definie plus haut -->
    <conflict-managers>
       <latest-cm  name="ofac-cm" latest="ofac-latest"/>
       <latest-revision name="latest-revision"/>
    </conflict-managers>

</ivyconf>




Xavier Hanin wrote:
> 
> On 7/17/07, bhatia <Bhatia@ofac.ch> wrote:
>>
>>
>> Hello,
>>
>> IF I use the [artifact].[ext] pattern, I cant publish my artifacts with
>> the
>> revision attribute. If I add the revision attribute like:
>> [artifact]-[revision].[ext] or [artifact](-[revision]).[ext] then Ivy
>> expects to find all my artifacts with a revision e.g. Ivy expects to find
>> jradius-client-1.0.jar instead of jradius-client.jar and therefore fails
>> to
>> download artifacts.
>>
>> <filesystem name="shared">
>>        <ivy
>>
>> pattern="${cellier}/[organisation]/[module]/[revision]/[type]s/[artifact].[ext]"/>
>>        <artifact
>>
>> pattern="${cellier}/[organisation]/[module]/[revision]/[type]s/[artifact].[ext]"
>> />                      </filesystem>
>>
>> I have versioned all 3rd party jars in the repository but I havent added
>> revsion numbers manually renaming each jar which I dont imagine I will
>> need
>> to do. As far as our proprietory artifacts are concerned, I want to
>> publish
>> them with the [revision] attribute.
>>
>> Is there a solution that would allow my publishings with a revision
>> attribute but will be lenient with the 3rd party jars which dont have a
>> revision attribute in their filename ?
> 
> 
> You can put several patterns in your filesystem resolver, one with a
> revision, one without. This will be less efficient for artifacts requiring
> the second pattern though (but usually filesystem based repository are
> pretty fast, so this might not be an issue. The solution to improve the
> perf
> is to use two resolver, one for third party and one for internal,
> configured
> appropriately, and use the modules section in your settings file to tell
> ivy
> how to use both.
> 
> See
> http://incubator.apache.org/ivy/history/trunk/configuration/module.html
> 
> Xavier
> 
> Many thanks
>> Saurabh
>>
>> --
>> View this message in context:
>> http://www.nabble.com/artifact-and-ivy-pattern-tf4095392.html#a11644892
>> Sent from the ivy-user mailing list archive at Nabble.com.
>>
>>
> 
> 
> -- 
> Xavier Hanin - Independent Java Consultant
> http://xhab.blogspot.com/
> http://incubator.apache.org/ivy/
> http://www.xoocode.org/
> 
> 

-- 
View this message in context: http://www.nabble.com/artifact-and-ivy-pattern-tf4095392.html#a11646395
Sent from the ivy-user mailing list archive at Nabble.com.


Mime
View raw message