blob: 43f9d72d216219d3817bef923d15197f9d1157b1 [file] [log] [blame]
<!--
Licensed to the Apache Software Foundation (ASF) under one or more
contributor license agreements. The ASF licenses this file to You
under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<project
default="jar"
xmlns:j="jelly:core"
xmlns:maven="jelly:maven"
xmlns:ant="jelly:ant">
<preGoal name="test:compile">
<ant:path
id="parent.test.src.dir"
location="${basedir}/../../jackrabbit/src/test"/>
<maven:addPath
id="maven.test.compile.src.set"
refid="parent.test.src.dir"/>
</preGoal>
<postGoal name="test:compile">
<copy todir="${maven.test.dest}">
<fileset dir="${basedir}/../../jackrabbit/src/test">
<exclude name="**/*.java"/>
</fileset>
</copy>
</postGoal>
<!-- Additionally cleans the test data created -->
<postGoal name="clean">
<attainGoal name="test:clean"/>
</postGoal>
<!-- deletes the test data -->
<goal name="test:clean">
<ant:delete includeEmptyDirs="true">
<ant:fileset dir="applications/test/repository">
<ant:include name="**/*"/>
<ant:exclude name="**/custom_nodetypes.xml"/>
</ant:fileset>
</ant:delete>
<ant:delete includeEmptyDirs="true">
<ant:fileset dir="applications/test/workspaces">
<ant:include name="**/*"/>
<ant:exclude name="**/workspace.xml"/>
</ant:fileset>
</ant:delete>
<ant:delete dir="applications/test/tx"/>
<ant:delete dir="applications/test/version"/>
<ant:delete file="jackrabbitdb.script" />
<ant:delete file="jackrabbitdb.data" />
<ant:delete file="jackrabbitdb.properties" />
<ant:copy file="create_db_hsqldb.sql" tofile="jackrabbitdb.script" overwrite="true" />
</goal>
<!--
<goal name="profile" prereqs="jar:jar" >
<java classname="org.apache.jackrabbit.test.ImportBenchmark" fork="yes" maxmemory="1024M">
<classpath>
<path refid="maven.dependency.classpath"/>
<pathelement path="${maven.build.dest}"/>
</classpath>
</java>
</goal>
-->
<goal name="start.test.server">
<echo message="====================================" />
<echo message=" Testing Database " />
<echo message="====================================" />
<java classname="org.hsqldb.Server" fork="yes" maxmemory="1024M">
<classpath>
<path refid="maven.dependency.classpath"/>
<pathelement path="${maven.build.dest}"/>
</classpath>
<arg value="-database" />
<arg value="jackrabbitdb" />
<arg value="-port" />
<arg value="9001" />
<arg value="-silent" />
<arg value="true" />
<arg value="-trace" />
<arg value="false" />
</java>
</goal>
</project>