ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Erik Hatcher" <jakarta-...@ehatchersolutions.com>
Subject Re: junit task isnt finished by the time it hands over to the next task
Date Fri, 03 May 2002 14:31:47 GMT
I can't quite follow what you've got going on without spending a lot of time
deciphering your build file.  But it seems you're sending the mails from
within the execution of Cactus <runservertests>.  How about moving it
outside of that invocation - does that fix this?


----- Original Message -----
From: "Hunt, Bryan" <B.Hunt@emuse-tech.com>
To: <ant-user@jakarta.apache.org>
Sent: Thursday, May 02, 2002 2:42 PM
Subject: junit task isnt finished by the time it hands over to the next task


>
> Hello All,
> I am having an unusual problem with the junit, junitreport and mimemail
> tasks.
> I believe that it may expose a threading problem.
>
> DESCRIPTION:
> I have two ant targets named test and mailreport.
> test performs a Junit batch test and then a junitreport on the generated
xml
> files.
> mailreport takes the generated html file and mimemails it to me.
>
> I started getting strange error messages , telling me that xml files were
> not being
> found. When the mail was being sent the file that was supposed to be
> mimemailed to me
> was empty or truncated. I ran a packet sniffer on the mail server and
> watched as the
> mail came in and it was being sent that way. I eventually figured out that
> the problem
> was that the mailreport task was being run before the test target had
> finished its
> junitreport task
>
> MY WORKAROUND:
> I found that by adding a <sleep seconds="10"/> into the mailreport target
> before it
> hit the mimemail task I managed to get my script to work consistently
> however I worry that
> as the reports take longer to perform I will have to manually increase the
> length of time
> that it sleeps for.
>
> QUESTION:
> Has anyone else had this problem ? Are the developers aware of this type
of
> behaviour ?
>
> Please see below for the file in question
>
> cut=
> <project name="test" default="compile" basedir=".">
>
>     <target name="init">
>         <taskdef name="checkstyle"
> classname="com.puppycrawl.tools.checkstyle.CheckStyleTask"/>
>         <echo>NB ** "build options" will print a listing of possible
targets
> ** NB</echo>
>         <!-- Create a timestamp -->
>         <tstamp/>
>         <!-- Set the directory variables -->
>         <property name="project.source.dir" value="../src"/>
>         <property name="project.output.dir" value="classes"/>
>
>         <property name="project.config.client.dir" value="config/client"/>
>         <property name="project.config.server.dir" value="config/server"/>
>         <property name="project.config.web.dir" value="config/web"/>
>         <property name="project.config.build.dir" value="config/build"/>
>         <property name="project.config.test.dir" value="config/test"/>
>
>         <property name="project.dist.dir" value="dist"/> <!-- delete
me -->
>         <property name="project.webapps.dir" value="webapps"/>
>
>         <property name="project.log.dir" value="logs"/>
>         <property name="project.report.dir" value="xmlreports"/>
>         <property name="project.formatted.report.dir"
> value="./htmlreports"/>
>         <property name="project.javadocs.dir" value="javadocs"/>
>         <property name="project.temp.dir" value="tmp"/>
>         <!-- Set the class variables -->
>         <property name="project.junit.classes"
> value="../libs/junit/3.7/junit.jar"/>
>         <property name="project.log4j.classes"
> value="../libs/log4j/1.1.3/log4j.jar"/>
>         <property name="project.xalan.classes"
> value="../libs/xalan/bin/xalan.jar"/>
>         <property name="project.bsf.classes"
> value="../libs/xalan/bin/bsf.jar"/>
>         <property name="project.jaf.classes"
> value="../libs/sun/jaf/activation.jar"/>
>         <property name="project.javamail.classes"
> value="../libs/sun/javamail/"/>
>         <!-- Set the Jetty variables -->
>         <property name="jettyDir" value="./tools/Jetty-4.0.D4/"/>
>         <property name="jettyLibDir" value="./tools/Jetty-4.0.D4/lib/"/>
>         <!-- set the cactus variables -->
>         <property name="servlet.jar"
> value="${jettyLibDir}javax.servlet.jar"/>
>         <property name="cactus.jar" value="./tools/ant/lib/cactus.jar"/>
>         <property name="cactus-ant.jar"
> value="./tools/ant/lib/cactus-ant.jar"/>
>         <property name="httpclient.jar"
> value="./tools/ant/lib/httpclient.jar"/>
>         <property name="httpunit.jar"
value="./tools/ant/lib/httpunit.jar"/>
>         <!-- set the DBunit variables -->
>         <property name="dbunit.jar"
value="../libs/dbunit/1.3/dbunit.jar"/>
>         <property name="exml.jar" value="../libs/dbunit/1.3/exml.jar"/>
>         <property name="dbunit_jars" value="${dbunit.jar};${exml.jar}"/>
>
>         <property name="ant.lib.dir" value="./tools/ant/lib/"/>
>         <property name="chainsaw.jar"
> value="${ant.lib.dir}chainsaw-1.1.jar"/>
>         <property name="log4j.jar" value="${ant.lib.dir}log4j.jar"/>
>         <property name="crimson.jar" value="${ant.lib.dir}crimson.jar"/>
>         <property name="chainsaw_jars"
> value="${chainsaw.jar};${log4j.jar};${crimson.jar}"/>
>         <echo message="chainsaw_jars = ${chainsaw_jars}"/>
>         <property name="cactus_test_jars"
> value="${cactus.jar};${httpclient.jar};${httpunit.jar}"/>
>         <!-- Set the xml variables -->
>         <property name="project.xsl.build.transformer"
> value="../deployment/stylesheets/structure.xsl"/>
>         <!-- Get the env variable -->
>         <property environment="env"/>
>         <!-- <echo message="Number of Processors =
> ${env.NUMBER_OF_PROCESSORS}"/> -->
>         <property name="project.j2ee.classes"
> value="${env.J2EE_HOME}/lib/j2ee.jar"/>
>         <property name="tools.jar"
value="${env.JAVA_HOME}/lib/tools.jar"/>
>         <!-- Jboss stuff -->
>         <property name="project.j2ee.jboss.deploydir"
> value="${env.JBOSS_HOME}/server/default/deploy/"/>
>         <property name="project.j2ee.jboss.configdir"
> value="${env.JBOSS_HOME}/server/default/conf/"/>
>         <property name="project.j2ee.jboss.xmlfiles"
> value="../deployment/jboss/"/>
>         <property name="project.j2ee.jboss.libfiles"
> value="../deployment/jboss/lib/"/>
>         <property name="project.j2ee.jboss.META-INF"
> value="../deployment/jboss/META-INF/"/>
>         <property name="project.j2ee.jboss.clientfiles"
>
value="${env.JBOSS_HOME}/client/jnp-client.jar;${env.JBOSS_HOME}/client/jbos
>
s-client.jar;${env.JBOSS_HOME}/client/jbosssx-client.jar;${env.JBOSS_HOME}/c
> lient/jboss-common-client.jar;${env.JBOSS_HOME}/client/log4j.jar"/>
>         <property name="jetty.scratch.dir" value="jettyscratch"/>
>         <!-- define a task fro starting and stopping a process -->
>         <taskdef name="runservertests"
> classname="org.apache.cactus.ant.RunServerTestsTask">
>             <classpath>
>                 <pathelement location="${cactus.ant.jar}"/>
>                 <pathelement path="${java.class.path}"/>
>             </classpath>
>         </taskdef>
>     </target>
>
>     <target name="clean" depends="init" description="remove all the
> generated stuff">
>         <!--Remove all the created directories -->
>         <!-- <delete dir="${project.output.dir}/*"/> -->
>         <delete dir="${project.dist.dir}"/>
>         <delete dir="${project.javadocs.dir}/*"/>
>         <delete failonerror="false" dir="${project.log.dir}"/>
>         <delete dir="${project.report.dir}"/>
>         <delete dir="${project.formatted.report.dir}"/>
>         <delete dir="${project.temp.dir}"/>
>         <!-- <delete dir="${project.webapps.dir}"/> -->
>         <delete dir="${jetty.scratch.dir}"/>
>     </target>
>
>     <target name="clean-jboss" depends="init">
>         <!--Remove all the created directories -->
>         <delete file="${project.j2ee.jboss.deployedjar}"/>
>     </target>
>
>
>
>     <target name="purge" depends="init" description="remove all generated
> dirs and files">
>         <!--Really remove all the created directories -->
>         <delete dir="${project.output.dir}"/>
>         <delete dir="${project.dist.dir}"/>
>         <delete dir="${project.javadocs.dir}"/>
>         <delete dir="${project.log.dir}"/>
>         <delete dir="${project.report.dir}"/>
>         <delete dir="${project.formatted.report.dir}"/>
>         <delete dir="${project.temp.dir}"/>
>         <delete dir="${project.webapps.dir}"/>
>         <delete dir="${jetty.scratch.dir}"/>
>     </target>
>
>     <target name="prepare" depends="clean">
>         <!--Create all the necessary directories -->
>         <mkdir dir="${project.output.dir}"/>
>         <mkdir dir="${project.dist.dir}"/>
>         <mkdir dir="${project.javadocs.dir}"/>
>         <mkdir dir="${project.log.dir}"/>
>         <mkdir dir="${project.report.dir}"/>
>         <mkdir dir="${project.formatted.report.dir}"/>
>         <mkdir dir="${project.temp.dir}"/>
>         <mkdir dir="${project.webapps.dir}"/>
> </target>
>
>     <target name="compile" depends="prepare" description="compile all the
> files">
>         <javac
>          srcdir="${project.source.dir}"
>          destdir="${project.output.dir}"
>
>
classpath="${project.junit.classes};${project.log4j.classes};${project.j2ee.
> classes};${dbunit.jar};${exml.jar}"
>          deprecation="yes"
>      debug="on"
>
>          />
>
>     </target>
>
> <!-- not used
>     <target name="jar" depends="compile">
>         <jar destfile="${project.dist.dir}/MyProject-${DSTAMP}.jar"
> basedir="${project.output.dir}">
>             <fileset dir="${project.source.dir}/" excludes="test/**"/>
>         </jar>
>     </target>
>     -->
>
>     <!-- these are the tests that can be run outside a web or application
> server -->
>     <target name="test" depends="compile" description="run the unit tests
on
> the class hierarchy">
>         <copy file="${project.config.client.dir}/web_cactus.properties"
>               tofile="${project.config.client.dir}/cactus.properties"
>               overwrite="yes"/>
>         <junit printsummary="on" haltonfailure="no" dir="./">
>             <sysproperty key="log4j.configuration"
> value="log_client.properties"/>
>             <classpath>
>                 <!-- required for web properties -->
>                 <pathelement location="${project.config.web.dir}"/>
>                 <!-- this is for the log4j properties file-->
>                 <pathelement location="${project.config.client.dir}"/>
>                 <pathelement path="${java.class.path}"/>
>                 <pathelement path="${project.output.dir}"/>
>                 <!-- for stand allone classes that have properties -->
>                 <pathelement path="${project.config.test.dir}"/>
>                 <!-- The Servlet API jar -->
>                 <pathelement location="${servlet.jar}"/>
>                 <pathelement location="${project.junit.classes}"/>
>                 <pathelement location="${project.log4j.classes}"/>
>                 <pathelement path="${project.j2ee.jboss.clientfiles}"/>
>                 <!-- required forsometests -->
>                 <pathelement location="${project.j2ee.classes}"/>
>             </classpath>
>             <batchtest fork="no" todir="${project.report.dir}">
>                 <fileset dir="${project.output.dir}">
>                     <include name="test/**/*Unit.class"/>
>                     <exclude name="test/**/entity/*Unit.class"/>
>                     <exclude name="**/AllTests.class"/>
>                 </fileset>
>                 <formatter type="xml"/>
>             </batchtest>
>         </junit>
>
>           <junitreport todir="${project.report.dir}">
>             <fileset dir="${project.report.dir}">
>                 <include name="TEST-*.xml"/>
>             </fileset>
>             <report/>
>             <report format="noframes"
> todir="${project.formatted.report.dir}"/>
>         </junitreport>
>     </target>
>
>
>     <!-- Setup JBoss for testing the entity beans -->
>     <target name="test-entity-beans-setup" depends="init"
description="setup
> JBoss for testing the entity beans">
>         <copy file="${project.config.client.dir}/ejb_cactus.properties"
>               tofile="${project.config.client.dir}/cactus.properties"
>               overwrite="yes"/>
>     </target>
>
>     <!-- these are the tests that require a web or application server -->
>     <target name="test-entity-beans"
depends="init,test-entity-beans-setup"
> description="just test the entity beans">
>         <junit printsummary="on" haltonfailure="no" dir="./">
>             <!-- used to configure the logging in the emuse code -->
>             <sysproperty key="log4j.configuration"
> value="log_client.properties"/>
>             <classpath>
>                 <pathelement path="${project.output.dir}"/>
>                 <!-- this is for the log4j properties file -->
>                 <pathelement path="${project.config.client.dir}"/>
>                 <!-- for stand allone classes that have properties -->
>                 <pathelement path="${project.config.test.dir}"/>
>                 <pathelement location="${project.junit.classes}"/>
>                 <pathelement location="${project.log4j.classes}"/>
>                 <!-- The Servlet API jar -->
>                 <pathelement location="${servlet.jar}"/>
>                 <!-- cactus jars -->
>                 <pathelement location="${cactus.jar}"/>
>                 <pathelement location="${cactus-ant.jar}"/>
>                 <pathelement location="${httpclient.jar}"/>
>                 <pathelement location="${httpunit.jar}"/>
>                 <!-- -->
>                 <pathelement location="${project.j2ee.classes}"/>
>             </classpath>
>             <batchtest fork="yes" todir="${project.report.dir}">
>                 <fileset dir="${project.output.dir}">
>                     <include name="test/**/entity/*Unit.class"/>
>                     <exclude name="**/AllTests.class"/>
>                 </fileset>
>                 <formatter type="xml"/>
>             </batchtest>
>         </junit>
>     </target>
>
>     <!-- these are the tests that can be run outside a web or application
> server -->
>     <target name="db-setup" depends="init, test-entity-beans-setup"
> description="Initialise the database to a known state">
>         <junit printsummary="on" haltonfailure="no" dir="./">
>             <!-- used to configure the logging in the emuse code -->
>             <sysproperty key="log4j.configuration"
> value="log_client.properties"/>
>             <classpath>
>                 <pathelement path="${project.output.dir}"/>
>                 <!-- this is for the log4j properties file -->
>                 <pathelement path="${project.config.client.dir}"/>
>                 <pathelement location="${project.junit.classes}"/>
>                 <pathelement location="${project.log4j.classes}"/>
>                 <!-- The Servlet API jar -->
>                 <pathelement location="${servlet.jar}"/>
>                 <!-- cactus jars -->
>                 <pathelement location="${cactus.jar}"/>
>                 <pathelement location="${cactus-ant.jar}"/>
>                 <pathelement location="${httpclient.jar}"/>
>                 <pathelement location="${httpunit.jar}"/>
>                 <!-- dbunit jars -->
>                 <pathelement location="${dbunit.jar}"/>
>                 <pathelement location="${exml.jar}"/>
>                 <!-- -->
>                 <pathelement location="${project.j2ee.classes}"/>
>             </classpath>
>             <batchtest fork="yes" todir="${project.report.dir}">
>                 <fileset dir="${project.output.dir}">
>                     <include name="test/**/db/RefreshDatabase.class"/>
>                 </fileset>
>                 <formatter type="xml"/>
>             </batchtest>
>         </junit>
>     </target>
>
>     <target name="report_all" depends="test,test-entity-beans">
>         <junitreport todir="${project.report.dir}">
>             <fileset dir="${project.report.dir}">
>                 <include name="TEST-*.xml"/>
>             </fileset>
>             <report format="noframes"
> todir="${project.formatted.report.dir}"/>
>         </junitreport>
>     </target>
>
>     <target name="report" depends="test" description="create a nice html
> formatted report for your boss">
>
>
>     </target>
>
>
>     <target name="reportmail" depends="report" description="create a nice
> html formatted report for your boss and send it to bryan">
>        <!-- <sleep seconds="10"/> -->
>        <mimemail
>           messageMimeType="text/html"
>           mailhost="skippy"
>
messageFile="${project.formatted.report.dir}/junit-noframes.html"
>           tolist="root"
>           subject="Results of nightly build ${TODAY}"
>           from="b.hunt@emuse-tech.com"
>           />
>
>     </target>
>
>
>     <target name="checkstyle" depends="init"  description="run tests to
make
> sure that we are following the emuse java coding guidelines">
>         <checkstyle allowTabs="yes"
>     ignoreImports="yes"
>     maxLineLen="110"
>     javadocScope="nothing"
>     ignoreCastWhitespace="true"
>     allowNoAuthor="yes"
>     paramPattern="^[a-z][a-zA-Z0-9]*$"
>     constPattern="^[A-Z]([a-zA-Z0-9_]*[a-zA-Z0-9])?$"
>     failOnViolation="false"
>     allowProtected="yes"
>     >
>     <fileset dir="${project.source.dir}" includes="**/*.java"/>
>             <!--
>              This is an example of how you can run the style checking
tests
> on
>              just one file or group of files
>              <fileset dir="${project.source.dir}" includes="**/*.java"/>
>              <fileset dir="${project.source.dir}"
> includes="**/entity/*.java"/>
>              -->
>         </checkstyle>
>     </target>
>
>     <target name="doc-all" depends="prepare" description="create all the
> javadoc documentation">
>         <javadoc packagenames="*.*" sourcepath="${project.source.dir}"
> destdir="${project.javadocs.dir}"
>
classpath="${project.junit.classes};${project.log4j.classes};${project.j2ee.
> classes};${cactus_test_jars};${dbunit_jars}" author="true" version="true"
> use="true" windowtitle="Ichara Documentation">
>             <group title="Ichara Packages" packages="ie.*"/>
>             <group title="Test Packages" packages="test.*"/>
>             <link href="http://skippy/javadocs/jdk1.3.1_01/api/"/>
>             <link
> href="http://skippy/javadocs/jakarta-log4j-1.1.3docs/api/"/>
>             <link href="http://skippy/javadocs/junit3.7javadoc/"/>
>             <link href="http://skippy/javadocs/dbunit1.3javadoc/"/>
>         </javadoc>
>     </target>
>
>     <target name="doc-ichara" depends="prepare" description="create all
the
> ichara documentation">
>         <javadoc packagenames="ie.*" sourcepath="${project.source.dir}"
> destdir="${project.javadocs.dir}"
>
classpath="${project.junit.classes};${project.log4j.classes};${project.j2ee.
> classes};${cactus_test_jars};${dbunit_jars}" author="true" version="true"
> use="true" windowtitle="Ichara Documentation">
>             <group title="Ichara Packages" packages="ie.*"/>
>             <link href="http://skippy/javadocs/jdk1.3.1_01/api/"/>
>             <link
> href="http://skippy/javadocs/jakarta-log4j-1.1.3docs/api/"/>
>             <link href="http://skippy/javadocs/junit3.7javadoc/"/>
>             <link href="http://skippy/javadocs/dbunit1.3javadoc/"/>
>         </javadoc>
>     </target>
>
>     <target name="doc-test" depends="prepare" description="create all the
> test documentation">
>         <javadoc packagenames="test.*" sourcepath="${project.source.dir}"
> destdir="${project.javadocs.dir}"
>
classpath="${project.junit.classes};${project.log4j.classes};${project.j2ee.
> classes};${cactus_test_jars};${dbunit_jars}" author="true" version="true"
> use="true" windowtitle="Ichara Documentation">
>             <group title="Ichara Test Packages" packages="test.*"/>
>             <link href="http://skippy/javadocs/jdk1.3.1_01/api/"/>
>             <link
> href="http://skippy/javadocs/jakarta-log4j-1.1.3docs/api/"/>
>             <link href="http://skippy/javadocs/junit3.7javadoc/"/>
>             <link href="http://skippy/javadocs/dbunit1.3javadoc/"/>
>         </javadoc>
>     </target>
>
>     <target name="webapp" depends="compile">
>       <mkdir dir="${project.webapps.dir}/ichara"/>
>       <mkdir dir="${project.webapps.dir}/ichara/WEB-INF"/>
>       <mkdir dir="${project.webapps.dir}/ichara/WEB-INF/classes"/>
>       <mkdir dir="${project.webapps.dir}/ichara/WEB-INF/lib"/>
>       <copy todir="${project.webapps.dir}/ichara/WEB-INF/classes">
>           <fileset dir="${project.output.dir}"/>
>       </copy>
>       <copy todir="${project.webapps.dir}/ichara/">
>           <fileset dir="${project.source.dir}/docroot/"/>
>       </copy>
>       <copy todir="${project.webapps.dir}/ichara/WEB-INF/classes/">
>           <fileset dir="${project.config.web.dir}/">
>               <include name="**/*.properties"/>
>               <include name="**/request_mappings.xml"/>
>           </fileset>
>           <!-- Make the icharatest.properties file accessible -->
>           <fileset dir="${project.config.test.dir}/">
>               <include name="**/*.properties"/>
>           </fileset>
>
>       </copy>
>      <copy file="${cactus.jar}"
> todir="${project.webapps.dir}/ichara/WEB-INF/lib/"/>
>      <copy file="${project.config.web.dir}/webdefault.xml"
> todir="${project.webapps.dir}/"/>
>      <copy file="${project.config.web.dir}/web.xml"
> todir="${project.webapps.dir}/ichara/WEB-INF/"/>
>       <!-- <copy todir="${project.webapps.dir}/ichara/WEB-INF/libs/">
>               <fileset dir="${project.config.web.dir}/">
>               <include name="**/*.jar"/>
>               </fileset>
>            </copy> -->
>     </target>
>
>     <target name="jetty-dumb" depends="init" description="run jetty with
> ichara application without copying any files over to it">
>      <delete dir="${jetty.scratch.dir}"/>
>      <mkdir dir="${jetty.scratch.dir}"/>
>         <java classname="org.mortbay.jetty.Server" fork="yes">
>             <!-- must have name log_server as cactus is hard coded to use
> this
>              we get out code to use same file -->
>             <sysproperty key="LOG_CONFIG_FILE"
value="log_web.properties"/>
> <!-- The "log4j.configuration" property is what is used by log4j as the
name
> of the log file.
>      It does not watch the file.
>             <sysproperty key="log4j.configuration"
> value="log_web.properties"/>
> -->
>             <!-- to debug log4j  <sysproperty key="log4j.debug" value =
> "true" /> -->
>             <classpath>
>                 <!--  <pathelement path="${classpath}"/>  -->
>                 <!-- add here to find to log4j file -->
>                 <fileset dir="${jettyLibDir}">
>                     <include name="**/*.jar"/>
>                 </fileset>
>                 <pathelement location="${project.log4j.classes}"/>
>                 <pathelement location="${project.j2ee.classes}"/>
>                 <pathelement location="${project.junit.classes}"/>
>                 <!-- <pathelement location="${cactus.jar}"/> -->
>                 <pathelement location="${tools.jar}"/>
>                 <pathelement path="${project.j2ee.jboss.clientfiles}"/>
>             </classpath>
>             <arg value="${jettyDir}/etc/ichara.xml"/>
>         </java>
>     </target>
>
>     <target name="jetty-smart" depends="init,webapp" description="run
jetty
> with ichara application copying all necessary files over to it">
>       <delete dir="${jetty.scratch.dir}"/>
>       <mkdir dir="${jetty.scratch.dir}"/>
>         <java classname="org.mortbay.jetty.Server" fork="yes">
>             <!-- must have name log_server as cactus is hard coded to use
> this
>              we get out code to use same file -->
>             <sysproperty key="LOG_CONFIG_FILE"
value="log_web.properties"/>
> <!-- The "log4j.configuration" property is what is used by log4j as the
name
> of the log file.
>      It does not watch the file.
>             <sysproperty key="log4j.configuration"
> value="log_web.properties"/>
> -->
>             <!-- to debug log4j  <sysproperty key="log4j.debug" value =
> "true" /> -->
>             <classpath>
>                 <!--  <pathelement path="${classpath}"/>  -->
>                 <!-- add here to find to log4j file -->
>                 <fileset dir="${jettyLibDir}">
>                     <include name="**/*.jar"/>
>                 </fileset>
>                 <pathelement location="${project.log4j.classes}"/>
>                 <pathelement location="${project.j2ee.classes}"/>
>                 <pathelement location="${project.junit.classes}"/>
>                 <!-- <pathelement location="${cactus.jar}"/> -->
>                 <pathelement location="${tools.jar}"/>
>                 <pathelement path="${project.j2ee.jboss.clientfiles}"/>
>             </classpath>
>             <arg value="${jettyDir}/etc/ichara.xml"/>
>         </java>
>     </target>
>
>     <target name="jspclean" depends="init" description="clean out all the
> jsp files in the scratchdir">
>       <delete dir="${jetty.scratch.dir}"/>
>       <mkdir dir="${jetty.scratch.dir}"/>
>       <copy todir="${project.webapps.dir}/ichara/">
>          <fileset dir="${project.source.dir}/docroot/"/>
>       </copy>
>     </target>
>
>
>     <!-- stop jetty -->
>     <target name="stop_jetty">
>         <echo> should stop jetty NEED a script for this.  Use
> Control+C</echo>
>     </target>
>
>     <target name="test_jetty" depends="init">
>         <!-- our webapp is named "ichara". -->
>         <runservertests testURL="http://localhost:80/ichara"
> startTarget="run" stopTarget="stop_jetty" testTarget="test_server"/>
>     </target>
>
>     <target name="jboss-ejb" depends="compile,clean-jboss,jboss-ejb-dumb"
> description=" build the jboss ejb jar files and deploy them ">
>         <!-- Copy the jar file to the jboss directory -->
>         <move file="${project.temp.dir}/ichara.ear"
> todir="${project.j2ee.jboss.deploydir}"/>
>     </target>
>
>     <target name="jboss-ejb-dumb" depends="compile">
>         <!-- web application archive used for test code in
> cactus/jetty/jboss -->
>         <war destfile="${project.temp.dir}/test.war"
>              webxml="${project.config.build.dir}/appserver_web.xml">
>         </war>
>         <jar destfile="${project.temp.dir}/ichara.jar"
>              manifest="${project.config.build.dir}/icharamanifest.mf">
>             <fileset dir="${project.output.dir}/"
includes="ie/emuse/**/*"/>
>             <!--     excludes="ie/emuse/ichara/shared/trace/*.class"/> -->
>             <fileset dir="${project.output.dir}/"
> includes="test/**/entity/**/*"/>
>             <fileset dir="${project.output.dir}/"
> includes="test/**/shared/test/*"/>
>             <fileset dir="${project.output.dir}/"
includes="test/**/db/*"/>
>             <fileset dir="${project.j2ee.jboss.xmlfiles}"
> includes="META-INF/*"/>
>             <fileset dir="${project.config.test.dir}">
>                 <include name="icharatest.properties"/>
>                 <include name="databasedata.xml"/>
>             </fileset>
>         </jar>
>         <!-- enterprise application archive used to package web and ejb
> modules -->
>         <copy file="${cactus.jar}" todir="${project.temp.dir}/lib/"/>
>         <copy file="${project.junit.classes}"
> todir="${project.temp.dir}/lib/"/>
>         <copy file="${dbunit.jar}" todir="${project.temp.dir}/lib/"/>
>         <copy file="${exml.jar}" todir="${project.temp.dir}/lib/"/>
>         <ear destfile="${project.temp.dir}/ichara.ear"
>
appxml="${project.config.build.dir}/appserver_application.xml"
> >
>              <fileset dir="${project.temp.dir}"
> includes="*.jar,*.war,lib/*.jar"/>
>         </ear>
>     </target>
>
>     <!-- Initialise JBoss with the files we need to access the PostgreSQL
> database -->
>     <target name="jboss-setup" depends="compile,clean-jboss"
> description="Set-up JBoss with the necessary files to access the
PostgreSQL
> database">
>         <copy
> file="${project.j2ee.jboss.xmlfiles}/global-files/xml/jbossmq-service.xml"
> todir="${project.j2ee.jboss.deploydir}" overwrite="Yes"/>
>         <copy
> file="${project.j2ee.jboss.xmlfiles}/global-files/xml/login-config.xml"
> todir="${project.j2ee.jboss.configdir}" overwrite="Yes"/>
>         <copy
> file="${project.j2ee.jboss.xmlfiles}/global-files/lib/pgjdbc2.jar"
> todir="${env.JBOSS_HOME}/lib" overwrite="Yes"/>
>         <copy
>
file="${project.j2ee.jboss.xmlfiles}/global-files/xml/postgres-service.xml"
> todir="${project.j2ee.jboss.deploydir}" overwrite="Yes"/>
>         <replace
>             file="${project.j2ee.jboss.deploydir}/postgres-service.xml"
>             token="@@@EMUSE_USER@@@"
>             value="${env.USERNAME}"
>         />
>     </target>
>
>     <!--This task is for checking this build.xml's dependancy
structure -->
>     <target name="structure" depends="init" description="List the
dependancy
> tree in this file">
>         <java fork="true"
> classname="ie.emuse.ichara.shared.utils.BuildDependanciesDisplay">
>             <arg
>
value="-Djavax.xml.transform.TransformerFactory=org.apache.xalan.transformer
> .TransformerImpl"/>
>             <arg value="${project.xsl.build.transformer}"/>
>             <arg value="build.xml"/>
>             <arg value="structure.html"/>
>             <classpath>
>                 <pathelement path="${java.class.path}"/>
>                 <pathelement path="${project.output.dir}"/>
>             </classpath>
>         </java>
>     </target>
>
>     <target name="chainsaw" depends="init" description="runs the chainsaw
> GUI which is a log4j viewer http://logui.sourceforge.net/)">
>         <java classname="com.puppycrawl.tools.chainsaw.Main" fork="yes">
>             <classpath>
>                 <pathelement path="${chainsaw_jars}"/>
>             </classpath>
>         </java>
>     </target>
>
>    <target name="jboss-build" description="build everything necessary for
> jboss">
>    </target>
>    <target name="jboss-war" description="create the jboss war file">
>    </target>
>    <target name="jboss" description="deploy the war file">
>    </target>
>
>    <target name="jetty-build" description="build everthing necessary for
> jetty and place in webapps dir">
>    </target>
>    <target name="jetty-war" description="create the jetty war file">
>    </target>
>    <target name="jetty" description="at the moment do nothing but in
future
> deploy the war file">
>    </target>
>
> </project>
> =cut
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> ___________________________________________
>
> emuse technologies
> Hanover Quay
> Dublin 2
> Ireland
>
> Tel:  353-1-671-7317
> Fax:  353-1-671-7319
>
> website: www.emusetechnologies.com
> email: info@emuse-tech.com
>
> ___________________________________________
>
> This message has been scanned for viruses using GroupShield 4.5 for
Exchange
> Server 5.5
>
> CONFIDENTIALITY NOTICE - The information contained in this email message
is
> intended only for confidential use of the named recipient. If the reader
is
> not the intended recipient or the person responsible for delivering it to
> the recipient, you are hereby notified that you have received this
> communication in error and that any review, dissemination or copying of
this
> communication is strictly prohibited. If you have received this in error,
> please notify the sender immediately.
>
> --
> To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>
>
> --
> To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>
>
>


--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message