You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by an...@apache.org on 2006/07/21 13:54:48 UTC

svn commit: r424275 - in /lenya/trunk/src: resources/build/modules2build.xsl targets/modules-build.xml targets/test-build.xml

Author: andreas
Date: Fri Jul 21 04:54:47 2006
New Revision: 424275

URL: http://svn.apache.org/viewvc?rev=424275&view=rev
Log:
Refactored module + test build process

Modified:
    lenya/trunk/src/resources/build/modules2build.xsl
    lenya/trunk/src/targets/modules-build.xml
    lenya/trunk/src/targets/test-build.xml

Modified: lenya/trunk/src/resources/build/modules2build.xsl
URL: http://svn.apache.org/viewvc/lenya/trunk/src/resources/build/modules2build.xsl?rev=424275&r1=424274&r2=424275&view=diff
==============================================================================
--- lenya/trunk/src/resources/build/modules2build.xsl (original)
+++ lenya/trunk/src/resources/build/modules2build.xsl Fri Jul 21 04:54:47 2006
@@ -51,9 +51,15 @@
         </fileset>
       </path>
       
-      <target name="compile-modules">
-        <xsl:apply-templates select="list:module" mode="call"/>
-      </target>
+      <xsl:variable name="compileDependencyList">
+        <xsl:for-each select="list:module">
+          <xsl:apply-templates select="document(concat(@src, '/module.xml'))/mod:module" mode="call"/>
+          <xsl:if test="following-sibling::list:module">
+            <xsl:text>, </xsl:text>
+          </xsl:if>
+        </xsl:for-each>
+      </xsl:variable>
+      <target name="compile-modules" depends="{$compileDependencyList}"/>
       
       <target name="test-modules">
         <xsl:apply-templates select="list:module" mode="call-test"/>
@@ -65,13 +71,8 @@
   </xsl:template>
   
   
-  <xsl:template match="list:module" mode="call">
-    <xsl:apply-templates select="document(concat(@src, '/module.xml'))/mod:module" mode="call"/>
-  </xsl:template>
-
-
   <xsl:template match="mod:module" mode="call">
-    <antcall target="deploy-module-{mod:id}"/>
+    <xsl:text>deploy-module-</xsl:text><xsl:value-of select="mod:id"/>
   </xsl:template>
   
 
@@ -118,7 +119,7 @@
     </xsl:text>
     
     <available file="{$src}/java/src" property="compile.module.{$id}"/>
-
+    
     <xsl:variable name="destDir">${build.dir}/modules/<xsl:value-of select="$id"/>/java/classes</xsl:variable>
     
     <target name="compile-module-{$id}" if="compile.module.{$id}">
@@ -232,14 +233,15 @@
       <xsl:if test="normalize-space($testDependencyList) != ''">
         <xsl:attribute name="depends"><xsl:value-of select="$testDependencyList"/></xsl:attribute>
       </xsl:if>
-      <xslt basedir="{$src}/config/cocoon-xconf"
-        destdir="${{build.dir}}/modules/{$id}/config/xtest"
+      <xslt basedir="{$src}"
+        includes="config/cocoon-xconf/**.xconf"
+        destdir="${{build.dir}}/modules/{$id}"
         style="${{src.resource.dir}}/test/xpatch2testpatch.xsl"
         extension=".xtest">
       </xslt>
       <xpatch file="${{build.test}}/org/apache/lenya/cms/LenyaTestCase.xtest"
         srcdir="${{build.dir}}/modules/{$id}"
-        includes="config/xtest/*.xtest, config/xtest/*/*.xtest"
+        includes="config/cocoon-xconf/*.xtest, config/cocoon-xconf/*/*.xtest"
         addComments="false"/>
     </target>
     
@@ -283,11 +285,11 @@
         </classpath>
         <formatter type="plain" usefile="false" />
         <formatter type="xml" />
-        <jvmarg value="-Djava.endorsed.dirs ${{build-webapp}}/WEB-INF/lib/endorsed"/>
+        <jvmarg value="-Djava.endorsed.dirs='${{basedir}}/build/lenya/webapp/WEB-INF/lib/endorsed'"/>
         <sysproperty key="junit.test.loglevel" value="${{junit.test.loglevel}}"/>
         <sysproperty key="contextRoot" value="${{basedir}}/build/lenya/webapp"/>
         <sysproperty key="tempDir" value="${{basedir}}/build/lenya/temp"/>
-        <sysproperty key="test.repo.webappDirectory" value="${{build-webapp}}"/>
+        <sysproperty key="test.repo.webappDirectory" value="${{build.webapp}}"/>
         <sysproperty key="test.repo.repositoryFactory" value="${{repository.factory}}"/>
         <batchtest todir="${{junit.dir}}">
           <fileset dir="{$testDestDir}" includes="**/*.class" excludes="**/Abstract*.class"/>

Modified: lenya/trunk/src/targets/modules-build.xml
URL: http://svn.apache.org/viewvc/lenya/trunk/src/targets/modules-build.xml?rev=424275&r1=424274&r2=424275&view=diff
==============================================================================
--- lenya/trunk/src/targets/modules-build.xml (original)
+++ lenya/trunk/src/targets/modules-build.xml Fri Jul 21 04:54:47 2006
@@ -26,8 +26,7 @@
   <property name="modules.root.dirs" value=""/>
   <property name="build.modules" value="${build.webapp}/lenya/modules"/>
   <property name="modules.copy" value="false"/>
-  
-  
+
   <target name="prepare-modules" depends="init-tasks">
     
     <property name="cocoon.xconf" value="${build.webapp}/WEB-INF/cocoon.xconf"/>
@@ -56,7 +55,7 @@
       includes="modules.xconf"
       srcdir="${build.dir}/temp/"
       file="${cocoon.xconf}"/>
-    
+
   </target>
   
   

Modified: lenya/trunk/src/targets/test-build.xml
URL: http://svn.apache.org/viewvc/lenya/trunk/src/targets/test-build.xml?rev=424275&r1=424274&r2=424275&view=diff
==============================================================================
--- lenya/trunk/src/targets/test-build.xml (original)
+++ lenya/trunk/src/targets/test-build.xml Fri Jul 21 04:54:47 2006
@@ -52,7 +52,7 @@
   <!-- Runs all tests -->
   <target name="test"
       description="Runs all tests"
-      depends="tests.junit, modules.test"/>
+    depends="modules.test, tests.junit"/>
   <!--
   depends="tests.junit, tests.anteater, tests.webtest"/>
   -->
@@ -174,21 +174,6 @@
         </fileset>
         <pathelement path="${src.test.impl.dir}"/>
       </classpath>
-      
-      <test name="org.apache.lenya.ac.impl.IdentityTest" todir="${junit.dir}"/>
-      <test name="org.apache.lenya.ac.impl.AccessControllerTest" todir="${junit.dir}"/>
-      <test name="org.apache.lenya.ac.impl.AccreditableManagerTest" todir="${junit.dir}"/>
-      <test name="org.apache.lenya.ac.impl.UserManagerTest" todir="${junit.dir}"/>
-      <test name="org.apache.lenya.ac.impl.GroupManagerTest" todir="${junit.dir}"/>
-      <test name="org.apache.lenya.ac.impl.RoleManagerTest" todir="${junit.dir}"/>
-      <test name="org.apache.lenya.ac.impl.PolicyManagerTest" todir="${junit.dir}"/>
-      <test name="org.apache.lenya.ac.impl.PolicyTest" todir="${junit.dir}"/>
-
-      <test name="org.apache.lenya.ac.file.FileUserTest" todir="${junit.dir}"/>
-      <test name="org.apache.lenya.ac.file.FileGroupTest" todir="${junit.dir}"/>
-      <test name="org.apache.lenya.ac.file.FileRoleTest" todir="${junit.dir}"/>
-      
-      <test name="org.apache.lenya.cms.ac.usecases.LoginTest" todir="${junit.dir}"/>
       
       <test name="org.apache.lenya.cms.publication.DefaultDocumentTest" todir="${junit.dir}"/>
       <test name="org.apache.lenya.cms.publication.DefaultDocumentBuilderTest" todir="${junit.dir}"/>



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@lenya.apache.org
For additional commands, e-mail: commits-help@lenya.apache.org