Author: ekoneil Date: Wed Jan 5 14:27:47 2005 New Revision: 124286 URL: http://svn.apache.org/viewcvs?view=rev&rev=124286 Log: Fixup the support for Struts 1.1 / 1.2 in the NetUI's build files.
- add a "struts.version" property which can be passed when creating a web application. Valid values are "1.1" and "1.2", with the latter as the default. - fixup the coreWeb build.xml file to remove the overwrite of 1.2 with 1.1 - switch to using <fileset>s for the Struts 1.1 / 1.2 WEB-INF and WEB-INF/lib resources - same thing for the NetUI runtime BB: self DRT: Beehive pass Modified: incubator/beehive/trunk/netui/ant/build.xml incubator/beehive/trunk/netui/ant/netui.properties incubator/beehive/trunk/netui/ant/webappTemplate.xml incubator/beehive/trunk/netui/build.xml incubator/beehive/trunk/netui/src/pageflow/build.xml incubator/beehive/trunk/netui/test/webapps/drt/build.xml incubator/beehive/trunk/test/ant/webappRuntimeCore.xml Modified: incubator/beehive/trunk/netui/ant/build.xml Url: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/ant/build.xml?view=diff&rev=124286&p1=incubator/beehive/trunk/netui/ant/build.xml&r1=124285&p2=incubator/beehive/trunk/netui/ant/build.xml&r2=124286 ============================================================================== --- incubator/beehive/trunk/netui/ant/build.xml (original) +++ incubator/beehive/trunk/netui/ant/build.xml Wed Jan 5 14:27:47 2005 @@ -64,18 +64,6 @@ <delete dir="${webappTemplate.dir}"/> </target> - <target name="deploy.netui.runtime" description="Deploy the NetUI webapp template to a skeleton webapp"> - <ant antfile="webappTemplate.xml" target="deploy.netui.runtime"> - <property name="webapp.dir" value="${webapp.dir}"/> - </ant> - </target> - - <target name="undeploy.netui.runtime" description="Clean the NetUI runtime from a webapp"> - <ant antfile="webappTemplate.xml" target="undeploy.netui.runtime"> - <property name="webapp.dir" value="${webapp.dir}"/> - </ant> - </target> - <target name="prepare"> <mkdir dir="${build.dir}"/> <mkdir dir="${build.lib.dir}"/> Modified: incubator/beehive/trunk/netui/ant/netui.properties Url: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/ant/netui.properties?view=diff&rev=124286&p1=incubator/beehive/trunk/netui/ant/netui.properties&r1=124285&p2=incubator/beehive/trunk/netui/ant/netui.properties&r2=124286 ============================================================================== --- incubator/beehive/trunk/netui/ant/netui.properties (original) +++ incubator/beehive/trunk/netui/ant/netui.properties Wed Jan 5 14:27:47 2005 @@ -34,7 +34,6 @@ build.external.dir=${build.dir}/external struts.dir=${build.external.dir}/struts -struts11.dir=${struts.dir}/legacy/jakarta-struts-1.1-lib jsf.dir=${build.external.dir}/jsf xdoclet.dir=${build.external.dir}/xdoclet @@ -49,8 +48,6 @@ # # --------------------------------------------------------------------------------- -# External JARs - # # These JARs are referenced by the bootstrap module build. # @@ -69,7 +66,6 @@ jakarta-oro.jar=${struts.dir}/jakarta-oro.jar commons-el.jar=${build.external.dir}/commons-el/commons-el.jar -apache-xml-resolver.jar=${external.dir}/apache-xml-resolver.jar # # JSF Modified: incubator/beehive/trunk/netui/ant/webappTemplate.xml Url: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/ant/webappTemplate.xml?view=diff&rev=124286&p1=incubator/beehive/trunk/netui/ant/webappTemplate.xml&r1=124285&p2=incubator/beehive/trunk/netui/ant/webappTemplate.xml&r2=124286 ============================================================================== --- incubator/beehive/trunk/netui/ant/webappTemplate.xml (original) +++ incubator/beehive/trunk/netui/ant/webappTemplate.xml Wed Jan 5 14:27:47 2005 @@ -6,20 +6,16 @@ <property file="${os.BEEHIVE_HOME}/beehive.properties"/> <property file="netui.properties"/> - <property name="template.root.dir" location="${src.dir}/webapp-template/"/> <property name="resource.dir.name" value="resources/beehive/version1"/> + <property name="template.root.dir" location="${src.dir}/webapp-template/"/> + <property name="struts11.dir" location="${struts.dir}/legacy/jakarta-struts-1.1-lib"/> - <target name="all.templates"> - <antcall target="generic"/> - </target> - - <target name="generic" description="Deploy the NetUI / generic webapp template"> + <target name="all.templates" description="Deploy the NetUI / generic webapp template"> <echo>Build NetUI Webapp Template to Directory: ${webapp.dist.dir}</echo> <property name="webapp.dir" location="${webapp.dist.dir}"/> <property name="webinf.dir" location="${webapp.dir}/WEB-INF"/> <property name="webinf.lib" location="${webapp.dir}/WEB-INF/lib"/> - <property name="javascript.dir" location="${webapp.dir}/${resource.dir.name}/javascript"/> <mkdir dir="${webapp.dist.dir}"/> @@ -27,60 +23,30 @@ <mkdir dir="${webinf.dir}"/> <mkdir dir="${webinf.dir}/lib"/> <mkdir dir="${webinf.dir}/classes"/> - - <!-- create the javascript directories --> <mkdir dir="${javascript.dir}"/> - <!-- copy the Struts JARs --> - <copy todir="${webinf.lib}" file="${struts.dir}/struts.jar"/> - <copy todir="${webinf.lib}" file="${struts.dir}/commons-beanutils.jar"/> - <copy todir="${webinf.lib}" file="${struts.dir}/commons-digester.jar"/> - <copy todir="${webinf.lib}" file="${struts.dir}/commons-logging.jar"/> - <copy todir="${webinf.lib}" file="${struts.dir}/commons-collections.jar"/> - <copy todir="${webinf.lib}" file="${struts.dir}/commons-validator.jar"/> - <copy todir="${webinf.lib}" file="${struts.dir}/commons-fileupload.jar"/> - <copy todir="${webinf.lib}" file="${struts.dir}/jakarta-oro.jar"/> - <copy todir="${webinf.lib}" file="${commons-el.jar}"/> - <!-- copy the Validator rules definitions file --> - <copy todir="${webinf.dir}" file="${struts.dir}/validator-rules.xml"/> - - - <!-- copy the 3rd party JARs --> - <copy todir="${webinf.lib}" file="${jstl.jar}"/> - <copy todir="${webinf.lib}" file="${standard.jar}"/> - <copy todir="${webinf.lib}" file="${xbean.jar}"/> - <copy todir="${webinf.lib}" file="${jsr173.jar}"/> - <copy todir="${webinf.lib}" file="${log4j.jar}"/> - <copy todir="${webinf.lib}" file="${commons-codec.jar}"/> - - <!-- copy the Beehive JARs --> - <copy todir="${webinf.lib}" file="${controls.jar}"/> - - <!-- copy the NetUI JARs --> - <copy todir="${webinf.lib}" file="${scoping.jar}"/> - <copy todir="${webinf.lib}" file="${util.jar}"/> - <copy todir="${webinf.lib}" file="${pageflow.jar}"/> - <copy todir="${webinf.lib}" file="${tags.html.jar}"/> - <copy todir="${webinf.lib}" file="${tags.template.jar}"/> - <copy todir="${webinf.lib}" file="${tags.databinding.jar}"/> - - <!-- copy the NetUI TLDs --> - <copy todir="${webinf.dir}" file="${netui-tags-html.tld}"/> - <copy todir="${webinf.dir}" file="${netui-tags-html.tldx}"/> - <copy todir="${webinf.dir}" file="${netui-tags-template.tld}"/> - <copy todir="${webinf.dir}" file="${netui-tags-template.tldx}"/> - <copy todir="${webinf.dir}" file="${netui-tags-databinding.tld}"/> - <copy todir="${webinf.dir}" file="${netui-tags-databinding.tldx}"/> + <antcall target="deploy.struts"/> + <antcall target="deploy.netui"/> + + <copy todir="${webinf.lib}"> + <fileset file="${commons-el.jar}"/> + <fileset file="${commons-codec.jar}"/> + <fileset file="${jstl.jar}"/> + <fileset file="${standard.jar}"/> + <fileset file="${xbean.jar}"/> + <fileset file="${jsr173.jar}"/> + <fileset file="${log4j.jar}"/> + <fileset file="${controls.jar}"/> + </copy> + <!-- copy JavaScript and resources --> + <copy file="${src.dir}/javascript/tagshtml/netui-tree.js" todir="${javascript.dir}"/> <copy todir="${webapp.dir}"> <fileset dir="${template.root.dir}/default"> <include name="**/*"/> </fileset> </copy> - <!-- copy the javascript files to the javavscript directory --> - <copy file="${src.dir}/javascript/tagshtml/netui-tree.js" todir="${javascript.dir}"/> - <!-- copy the NetUI compiler --> <mkdir dir="${compiler.dist.dir}"/> <copy todir="${compiler.dist.dir}" file="${compiler.jar}"/> @@ -97,11 +63,19 @@ <mkdir dir="${webapp.dir}/${resource.dir.name}"/> <echo>Deploy the NetUI runtime to webapp rooted at: ${webapp.dir}</echo> - <copy todir="${webapp.dir}"> - <fileset dir="${webapp.dist.dir}"> - <patternset refid="netui.runtime"/> - <patternset refid="struts.runtime"/> - </fileset> + + <antcall target="deploy.struts"/> + <antcall target="deploy.netui"/> + + <copy todir="${webapp.dir}/WEB-INF/lib"> + <fileset file="${commons-el.jar}"/> + <fileset file="${commons-codec.jar}"/> + <fileset file="${jstl.jar}"/> + <fileset file="${standard.jar}"/> + <fileset file="${xbean.jar}"/> + <fileset file="${jsr173.jar}"/> + <fileset file="${log4j.jar}"/> + <fileset file="${controls.jar}"/> </copy> <!-- Beehive/NetUI assumes ownership of the resources/beehive/version1 directory --> @@ -110,23 +84,11 @@ <include name="**/*"/> </fileset> </copy> - - <copy todir="${webapp.dir}/WEB-INF/" file="${deployed.netuiconfig.xml}"/> - - <!-- - @todo: it's as yet undecided how these should get into Tomcat classpath; for now, - they are copied directly into WEB-INF/lib of the webapp template. - --> - <copy todir="${webapp.dir}/WEB-INF/lib" file="${log4j.jar}"/> - <copy todir="${webapp.dir}/WEB-INF/lib" file="${commons-codec.jar}"/> - <copy todir="${webapp.dir}/WEB-INF/lib" file="${controls.jar}"/> - <copy todir="${webapp.dir}/WEB-INF/lib" file="${jsr173.jar}"/> - <copy todir="${webapp.dir}/WEB-INF/lib" file="${xbean.jar}"/> </target> <target name="undeploy.netui.runtime" description="Clean the NetUI runtime from a webapp root directory."> - <echo>Clean NetUI from: ${webapp.dir}</echo> + <property name="webinf.dir" location="${webapp.dir}/WEB-INF"/> <delete dir="${resource.dir.name}" quiet="true"/> @@ -143,6 +105,19 @@ --> <delete file="${webinf.dir}/netui-config.xml" quiet="true"/> + <echo>struts version: ${struts.version}</echo> + <condition property="struts.fileset" value="struts11"> + <equals arg1="${struts.version}" arg2="1.1"/> + </condition> + <condition property="struts.fileset" value="struts12"> + <or> + <equals arg1="${struts.version}" arg2="12"/> + <not><isset property="struts.version"/></not> + </or> + </condition> + + <echo>struts.fileset: ${struts.fileset}</echo> + <delete quiet="true"> <fileset dir="${webapp.dir}"> <include name="${resource.dir.name}/javascript/netui-*.js"/> @@ -153,64 +128,151 @@ <include name="WEB-INF/classes/**/*.properties"/> <include name="WEB-INF/classes/**/*.xml"/> <include name="WEB-INF/classes/**/*.xsd"/> - <include name="WEB-INF/lib/apache-xbean.jar"/> - <include name="WEB-INF/lib/log4j-1.2.8.jar"/> - <include name="WEB-INF/lib/controls.jar"/> - <include name="WEB-INF/lib/jsr173_1.0_api.jar"/> - <patternset refid="struts.runtime"/> - <patternset refid="netui.runtime"/> - <patternset refid="jsf.runtime"/> + </fileset> + <fileset dir="${webapp.dir}/WEB-INF/"> + <patternset refid="netui.webinf"/> + <patternset refid="jsf.webinf"/> + <patternset refid="${struts.fileset}.webinf"/> + </fileset> + <fileset dir="${webapp.dir}/WEB-INF/lib"> + <patternset refid="netui.jars"/> + <patternset refid="jsf.jars"/> + <patternset refid="beehive.jars"/> + <patternset refid="${struts.fileset}.jars"/> </fileset> </delete> </target> - <target name="deploy.struts.alternate" if="alternate.struts.version" - description="Overlay alternate Struts libraries into the webapp."> - <condition property="struts.alternate.lib.dir" value="${struts11.dir}"> - <equals arg1="${alternate.struts.version}" arg2="1.1"/> + <target name="deploy.netui"> + <copy todir="${webapp.dir}/WEB-INF"> + <fileset dir="${build.lib.dir}"> + <patternset refid="netui.webinf"/> + </fileset> + </copy> + <copy todir="${webapp.dir}/WEB-INF/lib"> + <fileset dir="${build.lib.dir}"> + <patternset refid="netui.jars"/> + </fileset> + </copy> + </target> + + <target name="deploy.struts"> + <echo>struts version: ${struts.version}</echo> + <condition property="struts11" value="true"> + <equals arg1="${struts.version}" arg2="1.1"/> </condition> - <fail unless="struts.alternate.lib.dir" message="Invalid value for alternate.struts.version: ${alternate.struts.version}"/> - <echo message="Deploying alternate Struts libraries from ${struts.alternate.lib.dir}"/> - <copy todir="${webapp.dir}/WEB-INF/lib" overwrite="true"> - <fileset dir="${struts.alternate.lib.dir}" includes="*.jar"/> + <condition property="struts12" value="true"> + <or> + <equals arg1="${struts.version}" arg2="1.2"/> + <not><isset property="struts.version"/></not> + </or> + </condition> + + <echo>struts11: ${struts11}</echo> + <echo>struts12: ${struts12}</echo> + + <antcall target="struts11"/> + <antcall target="struts12"/> + <!-- todo: would be great to check here for the struts.jar in the webinf.lib dir --> + </target> + + <target name="struts11" if="struts11"> + <echo>Deploy Struts 1.1</echo> + <copy todir="${webapp.dir}/WEB-INF/lib"> + <fileset dir="${struts11.dir}"> + <patternset refid="struts11.jars"/> + </fileset> + </copy> + <copy todir="${webapp.dir}/WEB-INF"> + <fileset dir="${struts11.dir}"> + <patternset refid="struts11.webinf"/> + </fileset> + </copy> + </target> + + <target name="struts12" if="struts12"> + <echo>Deploy Struts 1.2</echo> + <!-- copy the Struts JARs --> + <copy todir="${webapp.dir}/WEB-INF/lib"> + <fileset dir="${struts.dir}"> + <patternset refid="struts12.jars"/> + </fileset> </copy> - <copy todir="${webapp.dir}/WEB-INF" overwrite="true"> - <fileset dir="${struts.alternate.lib.dir}" includes="validator-rules.xml"/> + <copy todir="${webapp.dir}/WEB-INF"> + <fileset dir="${struts.dir}"> + <patternset refid="struts12.webinf"/> + </fileset> </copy> </target> - <patternset id="jsf.runtime"> - <include name="WEB-INF/jsf_core.tld"/> - <include name="WEB-INF/jsf_core.tldx"/> - <include name="WEB-INF/html_basic.tld"/> - <include name="WEB-INF/html_basic.tldx"/> + <patternset id="jsf.jars"> <include name="WEB-INF/lib/jsf-api.jar"/> <include name="WEB-INF/lib/jsf-impl.jar"/> - <include name="WEB-INF/faces-config.xml"/> </patternset> - <patternset id="netui.runtime"> - <include name="WEB-INF/lib/beehive-netui*.jar"/> - <include name="WEB-INF/beehive-netui*.tld"/> - <include name="WEB-INF/beehive-netui*.tldx"/> - - <include name="WEB-INF/lib/commons-el.jar"/> - - <!-- JSTL support JARs --> - <include name="WEB-INF/lib/jstl.jar"/> - <include name="WEB-INF/lib/standard.jar"/> - </patternset> - - <patternset id="struts.runtime"> - <include name="WEB-INF/lib/struts.jar"/> - <include name="WEB-INF/lib/commons-beanutils.jar"/> - <include name="WEB-INF/lib/commons-digester.jar"/> - <include name="WEB-INF/lib/commons-logging.jar"/> - <include name="WEB-INF/lib/commons-collections.jar"/> - <include name="WEB-INF/lib/commons-validator.jar"/> - <include name="WEB-INF/lib/commons-fileupload.jar"/> - <include name="WEB-INF/lib/jakarta-oro.jar"/> - <include name="WEB-INF/validator-rules.xml"/> + <patternset id="jsf.webinf"> + <include name="jsf_core.tld"/> + <include name="jsf_core.tldx"/> + <include name="html_basic.tld"/> + <include name="html_basic.tldx"/> + <include name="faces-config.xml"/> + </patternset> + + <patternset id="netui.jars"> + <include name="beehive-netui-pageflow.jar"/> + <include name="beehive-netui-scoping.jar"/> + <include name="beehive-netui-tags-databinding.jar"/> + <include name="beehive-netui-tags-html.jar"/> + <include name="beehive-netui-tags-template.jar"/> + <include name="beehive-netui-util.jar"/> + </patternset> + + <patternset id="netui.webinf"> + <include name="beehive-netui-*.tld"/> + <include name="beehive-netui-*.tldx"/> + </patternset> + + <patternset id="beehive.jars"> + <include name="commons-el.jar"/> + <include name="commons-codec-1.3.jar"/> + <include name="jstl.jar"/> + <include name="standard.jar"/> + <include name="apache-xbean.jar"/> + <include name="log4j-1.2.8.jar"/> + <include name="controls.jar"/> + <include name="jsr173_1.0_api.jar"/> + </patternset> + + <patternset id="struts11.jars"> + <include name="commons-beanutils.jar"/> + <include name="commons-collections.jar"/> + <include name="commons-digester.jar"/> + <include name="commons-fileupload.jar"/> + <include name="commons-lang.jar"/> + <include name="commons-logging.jar"/> + <include name="commons-validator.jar"/> + <include name="jakarta-oro.jar"/> + <include name="struts-legacy.jar"/> + <include name="struts.jar"/> + </patternset> + + <patternset id="struts11.webinf"> + <include name="validator-rules.xml"/> + </patternset> + + <patternset id="struts12.jars"> + <include name="commons-beanutils.jar"/> + <include name="commons-collections.jar"/> + <include name="commons-digester.jar"/> + <include name="commons-fileupload.jar"/> + <include name="commons-logging.jar"/> + <include name="commons-validator.jar"/> + <include name="jakarta-oro.jar"/> + <include name="struts.jar"/> + </patternset> + + <patternset id="struts12.webinf"> + <include name="validator-rules.xml"/> </patternset> </project> Modified: incubator/beehive/trunk/netui/build.xml Url: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/build.xml?view=diff&rev=124286&p1=incubator/beehive/trunk/netui/build.xml&r1=124285&p2=incubator/beehive/trunk/netui/build.xml&r2=124286 ============================================================================== --- incubator/beehive/trunk/netui/build.xml (original) +++ incubator/beehive/trunk/netui/build.xml Wed Jan 5 14:27:47 2005 @@ -75,8 +75,10 @@ <echo>Deploy NetUI to webapp rooted at: ${webapp.dir}</echo> - <ant dir="${os.BEEHIVE_HOME}/netui/ant" antfile="${os.BEEHIVE_HOME}/netui/ant/build.xml" - target="deploy.netui.runtime" inheritAll="false"> + <ant dir="${os.BEEHIVE_HOME}/netui/ant" + antfile="${os.BEEHIVE_HOME}/netui/ant/webappTemplate.xml" + target="deploy.netui.runtime" + inheritAll="false"> <property name="webapp.dir" value="${webapp.dir}"/> </ant> </target> @@ -85,8 +87,10 @@ description="Undeploy the NetUI runtime from a fully-quaflified webapp directory specified with the property 'webapp.dir'"> <echo>Undeploy NetUI from webapp rooted at: ${webapp.dir}</echo> - <ant dir="${os.BEEHIVE_HOME}/netui/ant" antfile="${os.BEEHIVE_HOME}/netui/ant/build.xml" - target="undeploy.netui.runtime" inheritAll="false"> + <ant dir="${os.BEEHIVE_HOME}/netui/ant" + antfile="${os.BEEHIVE_HOME}/netui/ant/webappTemplate.xml" + target="undeploy.netui.runtime" + inheritAll="false"> <property name="webapp.dir" value="${webapp.dir}"/> </ant> </target> Modified: incubator/beehive/trunk/netui/src/pageflow/build.xml Url: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/src/pageflow/build.xml?view=diff&rev=124286&p1=incubator/beehive/trunk/netui/src/pageflow/build.xml&r1=124285&p2=incubator/beehive/trunk/netui/src/pageflow/build.xml&r2=124286 ============================================================================== --- incubator/beehive/trunk/netui/src/pageflow/build.xml (original) +++ incubator/beehive/trunk/netui/src/pageflow/build.xml Wed Jan 5 14:27:47 2005 @@ -7,9 +7,26 @@ <property file="${os.BEEHIVE_HOME}/netui/ant/netui.properties"/> <property name="module.name" value="pageflow"/> - <property name="module.classpath" value="${struts.jar};${servlet24.jar};${jsp20.jar};${util.jar};${commons-beanutils.jar};${commons-logging.jar};${commons-collections.jar};${commons-digester.jar};${commons-validator.jar};${log4j.jar};${scoping.jar};${xbean.jar};${controls.jar};${jsf-api.jar};${commons-el.jar}"/> <property name="module.dir" location="${src.dir}/${module.name}"/> + <path id="module.classpath"> + <pathelement path="${commons-beanutils.jar}"/> + <pathelement path="${commons-logging.jar}"/> + <pathelement path="${commons-collections.jar}"/> + <pathelement path="${commons-digester.jar}"/> + <pathelement path="${commons-validator.jar}"/> + <pathelement path="${struts.jar}"/> + <pathelement path="${servlet24.jar}"/> + <pathelement path="${jsp20.jar}"/> + <pathelement path="${log4j.jar}"/> + <pathelement path="${util.jar}"/> + <pathelement path="${scoping.jar}"/> + <pathelement path="${xbean.jar}"/> + <pathelement path="${controls.jar}"/> + <pathelement path="${jsf-api.jar}"/> + <pathelement path="${commons-el.jar}"/> + </path> + <target name="build"> <echo>compile module: ${module.name}</echo> <echo>module classpath: ${module.classpath}</echo> @@ -17,7 +34,6 @@ <mkdir dir="${classes.dir}/${module.name}"/> - <!-- run the XMLBean compiler for the webapp schema --> <ant antfile="${netui.ant.dir}/xmlBean.xml"> <property name="xsd.root.dir" value="${module.dir}/schema/"/> <property name="class.output.dir" value="${classes.dir}/${module.name}"/> @@ -27,17 +43,17 @@ <javac srcdir="${module.dir}" destdir="${classes.dir}/${module.name}" - classpath="${module.classpath}" + classpathref="module.classpath" debug="${compile.debug}" deprecation="${compile.deprecation}" optimize="${compile.optimize}" source="${compile.source}"> <include name="**/*.java"/> </javac> + <copy todir="${classes.dir}/${module.name}"> <fileset dir="${module.dir}" includes="**/*.properties"/> </copy> - <jar jarfile="${build.lib.dir}/${pageflow.jar.name}"> <fileset dir="${classes.dir}/${module.name}"> Modified: incubator/beehive/trunk/netui/test/webapps/drt/build.xml Url: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/drt/build.xml?view=diff&rev=124286&p1=incubator/beehive/trunk/netui/test/webapps/drt/build.xml&r1=124285&p2=incubator/beehive/trunk/netui/test/webapps/drt/build.xml&r2=124286 ============================================================================== --- incubator/beehive/trunk/netui/test/webapps/drt/build.xml (original) +++ incubator/beehive/trunk/netui/test/webapps/drt/build.xml Wed Jan 5 14:27:47 2005 @@ -37,11 +37,6 @@ <antcall target="update.runtime"/> - <!-- If the alternate.struts.version property is specified, we will overlay that version into the webapp. --> - <ant antfile="${netui.ant.dir}/webappTemplate.xml" target="deploy.struts.alternate"> - <property name="webapp.dir" location="${webapp.dir}"/> - </ant> - <ant antfile="${buildWebapp.ant}" target="build.webapp" inheritAll="false"> <property name="webapp.dir" location="${webapp.dir}"/> </ant> @@ -52,8 +47,12 @@ </target> <target name="update.runtime" description="Update the NetUI runtime in the webapp without building the resources"> + <!-- the default version of Struts for the DRTs. To override, pass -Dstruts.version=1.1 on the command line --> + <property name="struts.version" value="1.2"/> <property name="webapp.dir" location="${app.dir}/drt/${webapp.name}"/> + <echo>struts.version: ${struts.version}</echo> + <ant antfile="${test.dir}/ant/buildWebapp.xml" target="deploy.netui" inheritAll="false"> <property name="webapp.dir" location="${webapp.dir}"/> <property name="include.testrecorder" value="true"/> @@ -61,6 +60,7 @@ <property name="test.file" location="${app.dir}/drt/testRecorder/config/testRecorder-tests.xml"/> <property name="config.file" location="${app.dir}/drt/testRecorder/config/testRecorder-config.xml"/> <property name="webapp.file" location="${app.dir}/drt/testRecorder/config/testRecorder-webapp.xml"/> + <property name="struts.version" value="${struts.version}"/> </ant> <copy file="${webapp.dir}/WEB-INF/local-netui-config.xml" @@ -129,7 +129,6 @@ <target name="drt" description="Run the drt suite with full server start / stop support."> <ant dir="${test.dir}" antfile="${test.dir}/ant/testRecorder.xml" inheritAll="false" target="server.test"> <property name="app.build.file" location="${app.dir}/drt/build.xml"/> - <!-- Wait for the server's root url to see if the server has started --> <property name="waitfor.url" value="${server.root.url}"/> <property name="suite.name" value="drt"/> <property name="playback.webapps" value="${webapp.name}"/> @@ -140,7 +139,6 @@ <target name="bvt" description="Run the bvt suite with full server start / stop support."> <ant antfile="${test.dir}/ant/testRecorder.xml" inheritAll="false" target="server.test"> <property name="app.build.file" location="${app.dir}/drt/build.xml"/> - <!-- Wait for the server's root url to see if the server has started --> <property name="waitfor.url" value="${server.root.url}"/> <property name="suite.name" value="bvt"/> <property name="playback.webapps" value="${webapp.name}"/> @@ -148,23 +146,22 @@ </ant> </target> - <target name="suite.running" description="Playback a test recorder test suite against a running server"> - <ant antfile="${test.dir}/ant/testRecorder.xml" target="suite.callback" inheritAll="false"> - <property name="suite.name" value="${suite.name}"/> - <property name="waitfor.url" value="${webapp.waitfor.url}"/> + <target name="bvt.struts11" description="Run the bvt suite using Struts 1.1 libraries with full server start / stop support"> + <property name="struts.version" value="1.1"/> + <ant antfile="${test.dir}/ant/testRecorder.xml" inheritAll="false" target="server.test"> + <property name="app.build.file" location="${app.dir}/drt/build.xml"/> + <property name="waitfor.url" value="${server.root.url}"/> + <property name="suite.name" value="bvt.struts11"/> <property name="playback.webapps" value="${webapp.name}"/> + <property name="drt.mode" value="true"/> </ant> </target> - <!-- Run the BVTs, with Struts 1.1 libraries --> - <target name="bvt.struts11" description="Run the bvt suite (with server start/stop) using Struts 1.1 libraries."> - <ant antfile="${test.dir}/ant/testRecorder.xml" inheritAll="false" target="server.test"> - <property name="alternate.struts.version" value="1.1"/> - <property name="app.build.file" location="${app.dir}/drt/build.xml"/> + <target name="suite.running" description="Playback a test recorder test suite against a running server"> + <ant antfile="${test.dir}/ant/testRecorder.xml" target="suite.callback" inheritAll="false"> + <property name="suite.name" value="${suite.name}"/> <property name="waitfor.url" value="${webapp.waitfor.url}"/> - <property name="suite.name" value="bvt.struts11"/> <property name="playback.webapps" value="${webapp.name}"/> - <property name="drt.mode" value="true"/> </ant> </target> @@ -238,12 +235,6 @@ </zip> </target> - <target name="usage"> - <java fork="no" classname="org.apache.tools.ant.Main"> - <arg line="-projecthelp"/> - </java> - </target> - <!-- todo: this needs to compost down into buildWebapp.xml; until we're sure it works, it stays here --> <target name="ensure.deployed" description="Deploy webapp for the test recorder"> <echo>Ensuring that the webapp ${webapp.name} is deployed on a running server at the url ${webapp.waitfor.url}</echo> @@ -281,9 +272,9 @@ </waitfor> </target> - <target name="fix.tr.eol"> - <echo>Fix CRLF on pattern ${pattern}</echo> - <fixcrlf srcdir="${basedir}/testRecorder/tests" destDir="foo" eol="lf" includes="${pattern}"/> + <target name="usage"> + <java fork="no" classname="org.apache.tools.ant.Main"> + <arg line="-projecthelp"/> + </java> </target> - </project> Modified: incubator/beehive/trunk/test/ant/webappRuntimeCore.xml Url: http://svn.apache.org/viewcvs/incubator/beehive/trunk/test/ant/webappRuntimeCore.xml?view=diff&rev=124286&p1=incubator/beehive/trunk/test/ant/webappRuntimeCore.xml&r1=124285&p2=incubator/beehive/trunk/test/ant/webappRuntimeCore.xml&r2=124286 ============================================================================== --- incubator/beehive/trunk/test/ant/webappRuntimeCore.xml (original) +++ incubator/beehive/trunk/test/ant/webappRuntimeCore.xml Wed Jan 5 14:27:47 2005 @@ -1,8 +1,6 @@ <?xml version="1.0"?> -<project name="Beehive/DeployNetUI" default="usage" basedir="."> - - <property environment="os"/> +<project name="Beehive/DeployWebappRuntime" default="usage" basedir="."> <!-- ================================================================ --> <!-- -->
