ant-ivy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Richard_Senior <richard.sen...@gmail.com>
Subject Re: Publishing...
Date Thu, 24 Mar 2011 13:01:39 GMT

I have found a solution using the resolvers 'cache' attribute and multiple
caches.
So each module publishes to the temporary resolver.
At the top of a build which kicks off builds for all modules, the temporary
cache folder can be deleted.

   <settings defaultResolver="resolvers"/>
           
    <caches>
    	<!-- permanent cache is for 3rd party libraries like Spring, Junit etc.
-->
        <cache name="permanent" basedir="${repository.dir.permanent}">
            <ttl duration="0d" />
        </cache>
        <!-- temporary cache is for modules. This cache can be wiped at the
beginning of every build -->
        <cache name="temporary" basedir="${repository.dir.temporary}">
            <ttl duration="0d" />
        </cache>        
    </caches>
     
    <resolvers>
    	<chain name="resolvers" returnFirst="true">
    		<!-- this resolver is a duplicate of the 'temporary' cache location
allowing us to publish directly to the temporary cache -->
       		<filesystem name="temporary" cache="temporary">
    			<ivy
pattern="${repository.dir.temporary}/[organisation]/[module]/ivy-[revision].xml"
/>
    			<artifact
pattern="${repository.dir.temporary}/[organisation]/[module]/[type]s/[artifact]-[revision].[ext]"
/>
			</filesystem>
				  		
	  		<!-- if module projects don't publish to the temporary cache because
they are not run as part of the build, then pre-built artifacts can be found
on cruisecontrol and put in the temporary cache here -->
	  		<url name="cruisecontrol" cache="temporary">  			
	  			<artifact
pattern="http://thecake.orange.co.uk:8080/artifacts/[organisation]/[branch]/live/[artifact].[revision].[ext]"
/>
			</url>
			<-- remaining resolvers get 3rd party dependancies such as spring, junit
etc -->
			<url name="com.springsource.repository.bundles.release"
cache="permanent">
			    <ivy
pattern="http://repository.springsource.com/ivy/bundles/release/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]"
/>
			    <artifact
pattern="http://repository.springsource.com/ivy/bundles/release/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]"
/>
			</url>			
			<url name="com.springsource.repository.bundles.external"
cache="permanent">
			    <ivy
pattern="http://repository.springsource.com/ivy/bundles/external/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]"
/>
			    <artifact
pattern="http://repository.springsource.com/ivy/bundles/external/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]"
/>
			</url>				
			<ibiblio name="ibiblio" m2compatible="true" cache="permanent" />								
		</chain>          		
    </resolvers>


-- 
View this message in context: http://old.nabble.com/Publishing...-tp31221641p31228686.html
Sent from the ivy-user mailing list archive at Nabble.com.


Mime
View raw message