1.1 --- a/logger/uihandlerserver/build.xml Thu Nov 08 17:38:06 2007 +0000
1.2 +++ b/logger/uihandlerserver/build.xml Thu Nov 08 18:24:10 2007 +0000
1.3 @@ -14,34 +14,34 @@
1.4 <mkdir dir="nbproject/private"/>
1.5 <echo file="nbproject/private/private.properties" append="true" message="nbroot=${nbroot}${line.separator}"/>
1.6 </target>
1.7 -
1.8 -
1.9 +
1.10 +
1.11 <property name="cvsmodules" value="openide/util nbbuild libs junit/external xtest core/javahelp/external performance logger/uihandlerlib"/>
1.12 <condition property="skip.checkout">
1.13 <equals arg1="" arg2="${cvsmodules}"/>
1.14 </condition>
1.15 -
1.16 +
1.17 <target name="-post-test-run" if="have.tests" unless="ignore.test.failure" depends="init,compile-test,-pre-test-run,-do-test-run">
1.18 <fail if="tests.failed">Some tests failed; see details above.</fail>
1.19 </target>
1.20 -
1.21 - <target name="checkout" depends="-nbroot-define,init" unless="skip.checkout" description="Check out all CVS modules which are needed to build the server">
1.22 - <!-- The following mess is an attempt to guess the correct CVSROOT and branch from the current checkout. -->
1.23 - <loadfile srcfile="CVS/Root" property="cvsroot" failonerror="false" quiet="true">
1.24 - <filterchain>
1.25 - <striplinebreaks/>
1.26 - </filterchain>
1.27 - </loadfile>
1.28 - <property name="cvsroot" value=":pserver:anoncvs@cvs.netbeans.org:/cvs"/>
1.29 - <loadfile srcfile="CVS/Tag" property="cvstag" failonerror="false" quiet="true">
1.30 - <filterchain>
1.31 - <tokenfilter delimoutput="">
1.32 - <containsregex pattern="^T(.+)" replace="\1"/>
1.33 - </tokenfilter>
1.34 - </filterchain>
1.35 - </loadfile>
1.36 - <property name="cvstag" value=""/>
1.37 - <!-- on my hudson date 2007.04.20.07.52.56 is not seen as valid date for the cvs task
1.38 +
1.39 + <target name="checkout" depends="-nbroot-define,init" unless="skip.checkout" description="Check out all CVS modules which are needed to build the server">
1.40 + <!-- The following mess is an attempt to guess the correct CVSROOT and branch from the current checkout. -->
1.41 + <loadfile srcfile="CVS/Root" property="cvsroot" failonerror="false" quiet="true">
1.42 + <filterchain>
1.43 + <striplinebreaks/>
1.44 + </filterchain>
1.45 + </loadfile>
1.46 + <property name="cvsroot" value=":pserver:anoncvs@cvs.netbeans.org:/cvs"/>
1.47 + <loadfile srcfile="CVS/Tag" property="cvstag" failonerror="false" quiet="true">
1.48 + <filterchain>
1.49 + <tokenfilter delimoutput="">
1.50 + <containsregex pattern="^T(.+)" replace="\1"/>
1.51 + </tokenfilter>
1.52 + </filterchain>
1.53 + </loadfile>
1.54 + <property name="cvstag" value=""/>
1.55 + <!-- on my hudson date 2007.04.20.07.52.56 is not seen as valid date for the cvs task
1.56 <loadfile srcfile="CVS/Tag" property="cvsdate" failonerror="false">
1.57 <filterchain>
1.58 <tokenfilter delimoutput="">
1.59 @@ -50,16 +50,16 @@
1.60 </filterchain>
1.61 </loadfile>
1.62 -->
1.63 - <property name="cvsdate" value=""/>
1.64 - <echo>Right now we'll do checkout of necessary modules from CVS</echo>
1.65 - <echo>To suppress this you can invoke the Ant script with -Dskip.checkout=true</echo>
1.66 - <cvs
1.67 - command="checkout -P -f" compressionlevel="6" cvsroot="${cvsroot}"
1.68 - dest="${nbroot}" package="${cvsmodules}" tag="${cvstag}" date="${cvsdate}"
1.69 - quiet="true" failonerror="true"
1.70 - />
1.71 - </target>
1.72 -
1.73 + <property name="cvsdate" value=""/>
1.74 + <echo>Right now we'll do checkout of necessary modules from CVS</echo>
1.75 + <echo>To suppress this you can invoke the Ant script with -Dskip.checkout=true</echo>
1.76 + <cvs
1.77 + command="checkout -P -f" compressionlevel="6" cvsroot="${cvsroot}"
1.78 + dest="${nbroot}" package="${cvsmodules}" tag="${cvstag}" date="${cvsdate}"
1.79 + quiet="true" failonerror="true"
1.80 + />
1.81 + </target>
1.82 +
1.83 <!--
1.84
1.85 There exist several targets which are by default empty and which can be
1.86 @@ -192,7 +192,7 @@
1.87 </copy>
1.88 <mkdir dir="${tomcat.base}/logs/"/>
1.89 </target>
1.90 -
1.91 +
1.92 <target name="deploy" depends="-tomcat-properties,build-all,run"/>
1.93 <target name="debug" depends="deploy">
1.94 <antcall target="connect-debugger">
1.95 @@ -206,19 +206,19 @@
1.96 <target name="run" depends="-tomcat-properties,start-tomcat">
1.97 <taskdef name="deploy" classname="org.apache.catalina.ant.DeployTask"
1.98 classpath="${tomcat.home}/lib/catalina-ant.jar"/>
1.99 -
1.100 +
1.101 <deploy url="${tomcat.url}/manager" username="${tomcat.username}"
1.102 password="${tomcat.password}" path="/exceptions"
1.103 war="${basedir}/../StrutsExceptions/dist/exceptions.war" update="true"/>
1.104 -
1.105 +
1.106 <deploy url="${tomcat.url}/manager" username="${tomcat.username}"
1.107 password="${tomcat.password}" path="/analytics"
1.108 war="${basedir}/dist/analytics.war" update="true"/>
1.109 -
1.110 +
1.111 <antcall target="-define-analytics-dir" inheritall="true"/>
1.112 -
1.113 - <antcall target="-test-server" inheritall="true">
1.114 - </antcall>
1.115 +
1.116 + <antcall target="-test-server" inheritall="true"/>
1.117 + <antcall target="-test-server-upload" inheritall="true"/>
1.118 </target>
1.119
1.120 <target name="-define-analytics-dir" if="analytics.dir">
1.121 @@ -295,11 +295,11 @@
1.122 <echo message="Starting Tomcat..."/>
1.123 <property name="tomcat.root" location="${tomcat.home}/.."/>
1.124 <property name="tomcat.opts" value=""/>
1.125 -
1.126 +
1.127 <mkdir dir="${tomcat.base}/temp"/>
1.128 <exec os="Windows NT Windows 95 Windows 98 Windows 2000 Windows 2003 Windows XP"
1.129 - executable="${tomcat.root}/bin/catalina.bat" dir="${tomcat.root}/bin/"
1.130 - spawn="true"
1.131 + executable="${tomcat.root}/bin/catalina.bat" dir="${tomcat.root}/bin/"
1.132 + spawn="true"
1.133 >
1.134 <arg value="jpda"/>
1.135 <arg value="start"/>
1.136 @@ -313,13 +313,13 @@
1.137 <env key="JPDA_SUSPEND" value="${tomcat.debug.suspend}"/>
1.138 </exec>
1.139 <exec os="Linux SunOS Solaris Mac OS X"
1.140 - executable="/bin/sh" dir="${tomcat.root}/bin/"
1.141 + executable="/bin/sh" dir="${tomcat.root}/bin/"
1.142 >
1.143 <!--<arg value="-x"/>-->
1.144 <arg value="${tomcat.root}/bin/catalina.sh"/>
1.145 <arg value="jpda"/>
1.146 <arg value="start"/>
1.147 -
1.148 +
1.149 <env key="DISPLAY" value=""/>
1.150 <env key="CATALINA_HOME" value="${tomcat.root}"/>
1.151 <env key="CATALINA_BASE" value="${tomcat.base}"/>
1.152 @@ -335,7 +335,7 @@
1.153 <loadresource property="serverstamp1" failonerror="false" quiet="true">
1.154 <url url="${tomcat.url}/stamp"/>
1.155 </loadresource>
1.156 -
1.157 +
1.158 <fail message="Tomcat is not started at ${tomcat.url}">
1.159 <condition>
1.160 <not>
1.161 @@ -346,13 +346,13 @@
1.162 </target>
1.163
1.164 <target name="stop-tomcat" depends="-check-tomcat" if="tomcat.running">
1.165 -
1.166 +
1.167 <echo message="Stopping Tomcat..."/>
1.168
1.169 <property name="tomcat.root" location="${tomcat.home}/.."/>
1.170 -
1.171 +
1.172 <exec os="Windows NT Windows 95 Windows 98 Windows 2000 Windows 2003 Windows XP"
1.173 - executable="${tomcat.root}/bin/catalina.bat" dir="${tomcat.root}/bin/"
1.174 + executable="${tomcat.root}/bin/catalina.bat" dir="${tomcat.root}/bin/"
1.175 >
1.176 <arg value="stop"/>
1.177
1.178 @@ -361,10 +361,10 @@
1.179 <env key="JAVA_HOME" value="${java.home}"/>
1.180 </exec>
1.181 <exec os="Linux SunOS Solaris Mac OS X"
1.182 - executable="${tomcat.root}/bin/catalina.sh" dir="${tomcat.root}/bin/"
1.183 + executable="${tomcat.root}/bin/catalina.sh" dir="${tomcat.root}/bin/"
1.184 >
1.185 <arg value="stop"/>
1.186 -
1.187 +
1.188 <env key="DISPLAY" value=""/>
1.189 <env key="CATALINA_HOME" value="${tomcat.root}"/>
1.190 <env key="CATALINA_BASE" value="${tomcat.base}"/>
1.191 @@ -398,14 +398,11 @@
1.192 <fail unless="tomcat.url" message="tomcat.url property has to be filled now after starting tomcat"/>
1.193 <echo message="${tomcat.url}" file="${url.file}"/>
1.194 </target>
1.195 -
1.196 +
1.197 <target name="-test-server">
1.198 <tempfile destdir="build" deleteonexit="true" property="index.file"/>
1.199 <get src="${tomcat.url}/analytics/index.jsp" dest="${index.file}"/>
1.200 <loadfile srcfile="${index.file}" property="${index.content}"/>
1.201 - <tempfile deleteonexit="true" property="upload.file"/>
1.202 - <get src="${tomcat.url}/analytics/upload.jsp" dest="${upload.file}"/>
1.203 - <loadfile srcfile="${upload.file}" property="${upload.content}"/>
1.204 <fail message="Valid page must be returned">
1.205 <condition>
1.206 <and>
1.207 @@ -414,6 +411,12 @@
1.208 </and>
1.209 </condition>
1.210 </fail>
1.211 + </target>
1.212 +
1.213 + <target name="-test-server-upload" unless="skip.upload">
1.214 + <tempfile deleteonexit="true" property="upload.file"/>
1.215 + <get src="${tomcat.url}/analytics/upload.jsp" dest="${upload.file}"/>
1.216 + <loadfile srcfile="${upload.file}" property="${upload.content}"/>
1.217 <fail message="upload.jsp file should be accessible">
1.218 <condition>
1.219 <and>