jruaux 2003/02/24 06:01:43
Added: integration/eclipse/src/scripts/eclipse build.xml
build-share.xml
Log:
Build files for container management with Eclipse.
(differences with Ant integration :
- framework cactification (cf cactus.war target)
- cactus.test target uses eclipserunservertests
Revision Changes Path
1.1 jakarta-cactus/integration/eclipse/src/scripts/eclipse/build.xml
Index: build.xml
===================================================================
<?xml version="1.0"?>
<!DOCTYPE project [
<!ENTITY build-share SYSTEM "file:./build-share.xml">
<!ENTITY build-tests-tomcat4x SYSTEM "file:../scripts/build-tests-tomcat4x.xml">
<!ENTITY build-tests-jboss3x SYSTEM "file:../scripts/build-tests-jboss3x.xml">
<!ENTITY build-tests-resin2x SYSTEM "file:../scripts/build-tests-resin2x.xml">
<!ENTITY build-tests-orion1x SYSTEM "file:../scripts/build-tests-orion1x.xml">
<!ENTITY build-tests-weblogic7x SYSTEM
"file:../scripts/build-tests-weblogic7x.xml">
<!ENTITY build-tests-weblogic6x SYSTEM
"file:../scripts/build-tests-weblogic6x.xml">
]>
<!--
=============================================================================
Generic build file for executing Cactus tests. This Ant script is expected
to be called from another Ant script, using the <ant> task.
The following Ant properties need to be passed to this script:
cactus.home.[container] Location where the container is installed
cactus.port [OPTIONAL] Port on which to start the
containers (Default is 8080)
cactus.target.dir [OPTIONAL] Tmp directory for Cactus
operations
cactus.war Location of the war to cactify
cactus.src.dir Location of Cactus java source files
cactus.src.includes [OPTIONAL] List of Cactus java test files
to include in the test. Defaults to
"**/*Test*.java".
cactus.src.excludes [OPTIONAL] List of Cactus java test files
to exclude in the test. Defaults to
"**/AllTests.java".
cactus.jvm [OPTIONAL] JVM to use when running java
Ant tasks. Default is "java". Other possible
value is: "javaw" (windows). Note: This is
for example to prevent a shell from opening
on windows platform when this Ant script
is called from a java application that has
no shell.
cactus.context [OPTIONAL] Webapp context to use for the
cactified war. Defaults to "cactustest".
The following Ant references need to be passed to this script:
cactus.classpath [OPTIONAL] The classpath reference for
running junit on the client side. Only
needed if special jars need to be on the
classpath
=============================================================================
-->
<project name="Cactus Executor" default="cactus.init" basedir="../../ant">
&build-share;
&build-tests-tomcat4x;
&build-tests-jboss3x;
&build-tests-resin2x;
&build-tests-orion1x;
&build-tests-weblogic7x;
&build-tests-weblogic6x;
</project>
1.1
jakarta-cactus/integration/eclipse/src/scripts/eclipse/build-share.xml
Index: build-share.xml
===================================================================
<!-- Global properties -->
<!-- Default port on which to start the containers -->
<property name="cactus.port" value="8080"/>
<!-- Tmp dir used by Cactus for its operations -->
<property name="cactus.target.dir" value="target"/>
<!-- Default Cactus test files to include in the test -->
<property name="cactus.src.includes" value="**/*Test*.java"/>
<!-- Default Cactus test files to exclude from the test -->
<property name="cactus.src.excludes"
value="**/AllTests.java,**/Test*All.java"/>
<!-- Default Java VM to use for java Ant tasks -->
<property name="cactus.jvm" value="java"/>
<!-- Default webapp context -->
<property name="cactus.context" value="cactustest"/>
<!--
========================================================================
Set the properties related to the source tree.
========================================================================
-->
<property name="cactus.conf.dir" value="confs"/>
<property name="cactus.lib.dir" value="lib"/>
<property name="cactus.lib.client.dir" value="${cactus.lib.dir}/client"/>
<property name="cactus.lib.server.dir" value="${cactus.lib.dir}/server"/>
<property name="cactus.lib.common.dir" value="${cactus.lib.dir}/common"/>
<property name="cactus.script.dir" value="scripts"/>
<property name="cactus.target.classes.dir" value="${cactus.target.dir}/classes"/>
<!-- Cactus related jar locations -->
<property name="cactus.antintegration.jar"
value="${cactus.lib.client.dir}/cactus-integration-ant-1.5dev.jar"/>
<property name="cactus.framework.jar"
value="${cactus.lib.common.dir}/cactus-framework-1.5dev.jar"/>
<property name="cactus.log4j.jar"
value="${cactus.lib.common.dir}/log4j-1.2.5.jar"/>
<property name="cactus.aspectjrt.jar"
value="${cactus.lib.common.dir}/aspectjrt-1.0.6.jar"/>
<property name="cactus.commons.logging.jar"
value="${cactus.lib.common.dir}/commons-logging-1.0.jar"/>
<property name="cactus.junit.jar"
value="${cactus.lib.common.dir}/junit-3.7.jar"/>
<property name="cactus.httpunit.jar"
value="${cactus.lib.common.dir}/httpunit-1.5.1.jar"/>
<property name="cactus.commons.httpclient.jar"
value="${cactus.lib.client.dir}/commons-httpclient.jar"/>
<!--
========================================================================
Initialize the build. Must be called by all targets
========================================================================
-->
<target name="cactus.init">
<!-- Filters -->
<filter token="cactus.port" value="${cactus.port}"/>
<filter token="cactus.context" value="${cactus.context}"/>
<!-- Initialize Cactus custom Ant task needed for running the server
tests -->
<taskdef resource="cactus.tasks"
classpath="${cactus.antintegration.jar}"/>
<taskdef name="eclipseruntests"
classname="org.apache.cactus.eclipse.ant.EclipseRunTests"
classpath="[EMAIL PROTECTED]@"/>
</target>
<!--
========================================================================
Compile the Cactus tests.
========================================================================
-->
<target name="cactus.compile" if="cactus.src.dir" description="Compile the
Cactus tests">
<mkdir dir="${cactus.target.classes.dir}"/>
<javac destdir="${cactus.target.classes.dir}" srcdir="${cactus.src.dir}">
<classpath>
<pathelement location="${cactus.framework.jar}"/>
<pathelement location="${cactus.log4j.jar}"/>
<pathelement location="${cactus.aspectjrt.jar}"/>
<pathelement location="${cactus.commons.logging.jar}"/>
<pathelement location="${cactus.junit.jar}"/>
<pathelement location="${cactus.commons.httpclient.jar}"/>
<pathelement location="${cactus.httpunit.jar}"/>
<path refid="cactus.classpath"/>
</classpath>
</javac>
<!-- Copy non-java files -->
<copy todir="${cactus.target.classes.dir}">
<fileset dir="${cactus.src.dir}">
<exclude name="**/*.java"/>
<exclude name="**/*.html"/>
</fileset>
</copy>
</target>
<!--
========================================================================
Framework-cactifify (i.e. cactification without stest classes)
a plain war (pointed to by the cactus.war property).
========================================================================
-->
<target name="cactus.war" depends="cactus.compile"
description="Cactify the war">
<unwar src="${cactus.war}"
dest="${cactus.target.dir}/${cactus.context}"/>
<!-- TODO: Perform a web.xml merge -->
<!-- Copy the Cactus web.xml -->
<copy todir="${cactus.target.dir}/${cactus.context}/WEB-INF">
<fileset dir="${cactus.conf.dir}">
<include name="web.xml"/>
</fileset>
</copy>
<!-- Copy the Cactus jars -->
<copy todir="${cactus.target.dir}/${cactus.context}/WEB-INF/lib">
<fileset dir="${cactus.lib.server.dir}">
<include name="*.jar"/>
</fileset>
<fileset dir="${cactus.lib.common.dir}">
<include name="*.jar"/>
</fileset>
</copy>
<!-- Copy the JSP Redirector -->
<copy todir="${cactus.target.dir}/${cactus.context}">
<fileset dir="${cactus.conf.dir}">
<include name="jspRedirector.jsp"/>
</fileset>
</copy>
</target>
<!--
========================================================================
Run the tests in Eclipse
========================================================================
-->
<target name="cactus.test">
<eclipseruntests/>
</target>
<!--
========================================================================
Clean generated files (including distributables)
========================================================================
-->
<target name="cactus.clean" depends="cactus.init" description="Clean target
directory">
<delete includeEmptyDirs="true">
<fileset dir="${cactus.target.dir}/${cactus.context}"/>
</delete>
</target>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]