changeset 48:561ece0a8225

Return to using snapshot resolver to ensure ivy.xml file from dependency can be found and improve performance and tracbility. removed changing from chain. Modified local to be treated as local.
author smith@nwoca.org
date Thu, 16 Jun 2011 17:26:39 -0400
parents f1c7d93a41c8
children 9c652e2c5f60
files ivy-ant.xml ssdt.default.ivy.settings.xml
diffstat 2 files changed, 21 insertions(+), 26 deletions(-) [+]
line wrap: on
line diff
--- a/ivy-ant.xml	Thu Jun 16 10:54:30 2011 -0400
+++ b/ivy-ant.xml	Thu Jun 16 17:26:39 2011 -0400
@@ -34,15 +34,20 @@
         <echoproperties prefix="ivy.project"/>
     </target>
 
+    <target name="ivy-clean-all" description="cleans ssdt caches and local builds" depends="init">
+        <delete failonerror="false" includeemptydirs="true" dir="${user.home}/.ivy2"/>
+    </target>
+
     <target name="ivy-clean" description="cleans ssdt caches and local builds" depends="init">
         <delete failonerror="false" includeemptydirs="true">
             <fileset dir="${user.home}/.ivy2/cache">
                 <include name="org.ssdt_ohio/**"/>
                 <include name="org.nwoca.ssdt/**"/>
-                <include name="*org*.ssdt*.*"/>
+                <include name="*ssdt*.*"/>                
             </fileset>
         </delete>
         <delete dir="${user.home}/.ivy2/ssdt-cache"  failonerror="false"/>
+        <delete dir="${user.home}/.ivy2/snapshot-cache"  failonerror="false"/>
         <delete dir="${user.home}/.ivy2/local" failonerror="false"/>
     </target>
 
@@ -148,21 +153,21 @@
             </else>
         </if>
         <if>
-          <isset property="coverage.run.with.cobertura"/>
-             <then>
+            <isset property="coverage.run.with.cobertura"/>
+            <then>
                 <property name="precoverage.run.test.classpath" value="${run.test.classpath}"/>
                 <var name="run.test.classpath" unset="true"/>
                 <property name="run.test.classpath" value="${cobertura.instrumented.classes}${path.separator}${precoverage.run.test.classpath}${path.separator}${cobertura.classpath.path}"/>
             </then>
-       </if>
+        </if>
         <if>
-          <isset property="coverage.run.with.clover"/>
-             <then>
+            <isset property="coverage.run.with.clover"/>
+            <then>
                 <property name="preclover.run.test.classpath" value="${run.test.classpath}"/>
                 <var name="run.test.classpath" unset="true"/>
                 <property name="run.test.classpath" value="${preclover.run.test.classpath}${path.separator}${clover.jar.file}"/>
             </then>
-       </if>
+        </if>
 
         <echo level="debug" message="$${run.test.classpath} : ${run.test.classpath}"/>
 
--- a/ssdt.default.ivy.settings.xml	Thu Jun 16 10:54:30 2011 -0400
+++ b/ssdt.default.ivy.settings.xml	Thu Jun 16 17:26:39 2011 -0400
@@ -5,7 +5,7 @@
 <ivysettings>
     <settings defaultResolver="default"/>
     <caches defaultCacheDir="${user.home}/.ivy2/cache" useOrigin="true">
-        <cache name="ssdt-cache" basedir="${user.home}/.ivy2/ssdt-cache"/>
+        <cache name="snapshot-cache" basedir="${user.home}/.ivy2/snapshot-cache"/>
     </caches>
     <property name="ivy.local.default.root" value="${user.home}/.ivy2/local" override="false"/>
     <property name="ivy.default.ivy.user.dir" value="${user.home}/.ivy2" override="false"/>
@@ -15,28 +15,18 @@
     <include url="${ivy.default.settings.dir}/ivysettings-main-chain.xml"/>
     <include url="${ivy.default.settings.dir}/ivysettings-default-chain.xml"/>
     <resolvers >
-        <chain name="default" checkmodified="true" changingMatcher="*.*SNAPSHOT">
-            <filesystem name="local" checkmodified="true" force="true" cache="ssdt-cache" changingPattern=".*SNAPSHOT" >
+        <chain name="default">
+            <filesystem name="local" checkmodified="true" force="true" local="true" changingPattern=".*SNAPSHOT" >
                 <ivy pattern="${ivy.local.default.root}/${ivy.local.default.ivy.pattern}" />
                 <artifact pattern="${ivy.local.default.root}/${ivy.local.default.artifact.pattern}" />
             </filesystem>
-           
+     
+            <url name="ssdt-snapshots" changingMatcher=".*SNAPSHOT" checkmodified="true" m2compatible="true" cache="snapshot-cache">
+                <artifact pattern="http://repos.ssdt.nwoca.org/artifactory/libs-snapshots/[organisation]/[module]/[revision]/[artifact]-[revision](-[classifier]).[ext]" />
+                <ivy pattern="http://repos.ssdt.nwoca.org/artifactory/libs-snapshots/[organisation]/[module]/[revision]/ivy.xml" />
+            </url>            
 
-            
-  <!-- Need two ways to access the Artifactory repository, as it was not getting ALL of the remote repositoires with just the URL.  Another
-       way to do this might be to add the pattern used by ibiblio into the url resolver, but it works this way as long as we name the 
-       url and ibiblio differently.  It's a good way to make sure we get everything. The mscompatible="true" is necessary as it converts dots 
-       in organisation into slashes, which is necessary in this case.  
-  -->
-           <url name="ssdt-repo-one"  m2compatible="true">
-                <ivy pattern="http://repos.ssdt.nwoca.org/artifactory/ssdt-repo/[organisation]/[module]/[revision]/[artifact].[ext]"/>
-               <artifact pattern="http://repos.ssdt.nwoca.org/artifactory/ssdt-repo/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]"/>
-                </url>
-    
-    
-            <ibiblio name="ssdt-repo-two" root="http://repos.ssdt.nwoca.org/artifactory/ssdt-repo/" m2compatible="true"/>
-              
-
+            <ibiblio name="ssdt-repo" m2compatible="true" root="http://repos.ssdt.nwoca.org/artifactory/ssdt-repo" />        
            
         </chain>
     </resolvers>