incubator-easyant-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jlboud...@apache.org
Subject svn commit: r1373377 - in /incubator/easyant/plugins/trunk/offline/src: main/resources/offline.ant test/antunit/offline-test.xml
Date Wed, 15 Aug 2012 12:48:09 GMT
Author: jlboudart
Date: Wed Aug 15 12:48:09 2012
New Revision: 1373377

URL: http://svn.apache.org/viewvc?rev=1373377&view=rev
Log:
Configure offline repository is done by easyant core itself
update offline plugin according to previous commit

Modified:
    incubator/easyant/plugins/trunk/offline/src/main/resources/offline.ant
    incubator/easyant/plugins/trunk/offline/src/test/antunit/offline-test.xml

Modified: incubator/easyant/plugins/trunk/offline/src/main/resources/offline.ant
URL: http://svn.apache.org/viewvc/incubator/easyant/plugins/trunk/offline/src/main/resources/offline.ant?rev=1373377&r1=1373376&r2=1373377&view=diff
==============================================================================
--- incubator/easyant/plugins/trunk/offline/src/main/resources/offline.ant (original)
+++ incubator/easyant/plugins/trunk/offline/src/main/resources/offline.ant Wed Aug 15 12:48:09
2012
@@ -25,25 +25,10 @@
     <ea:parameter property="project.buildscope.resolver" default="project.buildscope.repository"
description="name of project build scope repository"/>
     <ea:parameter property="easyant.buildscope.resolver" default="easyant.buildscope.repository"
description="name of easyant build scope resolver"/>
     <ea:parameter property="easyant.offline" default="false" description="specify if you're
running easyant in offline mode"/>
-
-    <macrodef name="configure-build-repository">
-         <attribute name="dictator" default="true"/>
-         <sequential>
-             <ea:configure-build-scoped-repository generateWrapperResoler="false" dictator="@{dictator}"
name="${project.buildscope.resolver}" settingsRef="${project.ivy.instance}"/>
-             <ea:configure-build-scoped-repository generateWrapperResoler="false" dictator="@{dictator}"
name="${easyant.buildscope.resolver}" settingsRef="easyant.ivy.instance"/>
-        </sequential>
-    </macrodef>
-    <ac:if>
-        <istrue  value="${easyant.offline}"/>
-        <ac:then>
-             <configure-build-repository/>  
-        </ac:then>
-    </ac:if>
-    
+    <ea:parameter property="offline.base.directory" default="${basedir}/offline/" description="specify
offline base directory"/>
 
     <target name="offline:go-offline">
-        <configure-build-repository dictator="false"/>
-     
+        <fail if="${easyant.offline}" message="can't run offline:go-offline when you are
already offline"/>
         <ea:go-offline projectResolverName="${project.buildscope.resolver}" easyantResolverName="${easyant.buildscope.resolver}"/>
     </target>
 

Modified: incubator/easyant/plugins/trunk/offline/src/test/antunit/offline-test.xml
URL: http://svn.apache.org/viewvc/incubator/easyant/plugins/trunk/offline/src/test/antunit/offline-test.xml?rev=1373377&r1=1373376&r2=1373377&view=diff
==============================================================================
--- incubator/easyant/plugins/trunk/offline/src/test/antunit/offline-test.xml (original)
+++ incubator/easyant/plugins/trunk/offline/src/test/antunit/offline-test.xml Wed Aug 15 12:48:09
2012
@@ -31,12 +31,15 @@
         <delete dir="${basedir}" includeemptydirs="true">
             <include name="**/target/**"/>
             <include name="**/lib/**"/>
+            <include name="**/offline/**"/>
         </delete>
     </target>
     
     <target name="setUp" depends="clean">
-      <ivy:settings id="project.ivy.instance"/>
       <property name="easyant.file" value="${basedir}/sample-module.ivy"/>
+      <ea:loadmodule buildModule="${easyant.file}"/>
+<!--<ea:configure-build-scoped-repository generateWrapperResoler="false" dictator="@{dictator}"
name="${project.buildscope.resolver}" settingsRef="${project.ivy.instance}"/>
+-->
     </target>
     <target name="tearDown" depends="clean"/>
     
@@ -45,7 +48,7 @@
         <au:assertPropertyEquals name="project.buildscope.resolver" value="project.buildscope.repository"/>
         <au:assertPropertyEquals name="easyant.buildscope.resolver" value="easyant.buildscope.repository"/>
         <au:assertPropertyEquals name="easyant.offline" value="false"/>
-        <!--TODO: check if buildscope repository are registered -->
+        <au:assertPropertyEquals name="offline.base.directory" value="${basedir}/offline/"/>
     </target>
 
 
@@ -56,12 +59,8 @@
         <au:assertLogContains text=":: installing org.apache.easyant.plugins#rat;0.9 ::"
/>
         <au:assertLogContains text=":: installing org.apache.rat#apache-rat-tasks;0.7
::" />
 
-        <property name="ea.repo" value="${target}/repository/easyant.buildscope.repository"/>
-        <property name="project.repo" value="${target}/repository/project.buildscope.repository"/>
-        <au:assertLogContains text="Registering build scope repository : ${easyant.buildscope.resolver}
in ${ea.repo}" level="debug"/>
-        <au:assertLogContains text="Registering build scope repository : ${project.buildscope.resolver}
in ${project.repo}" level="debug"/>
-        <au:assertLogContains text="${easyant.buildscope.resolver} registration succeeded"
level="debug"/>
-        <au:assertLogContains text="${project.buildscope.resolver} registration succeeded"
level="debug"/>
+        <property name="ea.repo" value="${offline.base.directory}/repository/easyant.buildscope.repository"/>
+        <property name="project.repo" value="${offline.base.directory}/repository/project.buildscope.repository"/>
         <au:assertFileExists file="${ea.repo}"/>
         <au:assertFileExists file="${project.repo}"/>
         <au:assertFileExists file="${ea.repo}/org.apache.easyant.plugins/rat/0.9/rat.ant"/>



Mime
View raw message