portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject svn commit: r225529 - /portals/jetspeed-2/trunk/maven.xml
Date Wed, 27 Jul 2005 14:41:50 GMT
Author: ate
Date: Wed Jul 27 07:40:53 2005
New Revision: 225529

URL: http://svn.apache.org/viewcvs?rev=225529&view=rev
Log:
Fix translating @PLATFORM@ variable in OJB repository_database.xml configuration for tests.
TestCapability failed with Hsqldb because OJB didn't take hsqldb specific sql syntax into
account because of this.
This @PLATFORM@ property should not be overlooked!

Modified:
    portals/jetspeed-2/trunk/maven.xml

Modified: portals/jetspeed-2/trunk/maven.xml
URL: http://svn.apache.org/viewcvs/portals/jetspeed-2/trunk/maven.xml?rev=225529&r1=225528&r2=225529&view=diff
==============================================================================
--- portals/jetspeed-2/trunk/maven.xml (original)
+++ portals/jetspeed-2/trunk/maven.xml Wed Jul 27 07:40:53 2005
@@ -172,28 +172,19 @@
         <j:set var="org.apache.jetspeed.database.user" value="${org.apache.jetspeed.test.database.user}"
/>
         <j:set var="org.apache.jetspeed.database.password" value="${org.apache.jetspeed.test.database.password}"
/>
 
-        <j:if test="${!pom.id.equals('jetspeed2:jetspeed')}">
-            <available property="_found" file="src/test/repository_database.xml" />
-            <j:if test="${_found}">
-                <copy file="src/test/repository_database.xml" todir="${maven.test.dest}"
overwrite="true"
-                    failonerror="false">
-                    <filterset begintoken="@" endtoken="@">
-                        <filter token="PLATFORM" value="${org.apache.jetspeed.test.database.ojb.platform}"
/>
-                    </filterset>
-                </copy>
-            </j:if>
-        </j:if>
-
-        <j:if test="${pom.id.equals('jetspeed2:jetspeed')}">
-            <available property="_found" file="src/java/repository_database.xml" />
-            <j:if test="${_found}">
-                <copy file="src/java/repository_database.xml" todir="${maven.test.dest}"
overwrite="true"
-                    failonerror="false">
-                    <filterset begintoken="@" endtoken="@">
-                        <filter token="PLATFORM" value="${org.apache.jetspeed.test.database.ojb.platform}"
/>
-                    </filterset>
-                </copy>
-            </j:if>
+        <!-- make sure OJB platform property is translated/filtered: 
+             @PLATFORM@ -> org.apache.jetspeed.test.database.ojb.platform
+        -->
+        <available property="_found" file="${maven.test.dest}/repository_database.xml"
/>
+        <j:if test="${_found}">
+          <tempfile destdir="${maven.test.dest}" prefix="tmp" suffix=".xml" property="temp.file"/>
+          <copy file="${maven.test.dest}/repository_database.xml" tofile="${temp.file}"
overwrite="true" failonerror="true">
+            <filterset begintoken="@" endtoken="@">
+              <filter token="PLATFORM" value="${org.apache.jetspeed.test.database.ojb.platform}"
/>
+            </filterset>
+          </copy>
+          <copy file="${temp.file}" tofile="${maven.test.dest}/repository_database.xml"
overwrite="true" failonerror="true"/>
+          <delete file="${temp.file}"/>
         </j:if>
 
         <path id="jdbc.drivers.path" path="${org.apache.jetspeed.test.jdbc.drivers.path}"
/>



---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@portals.apache.org
For additional commands, e-mail: jetspeed-dev-help@portals.apache.org


Mime
View raw message