You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beehive.apache.org by ek...@apache.org on 2005/11/01 18:17:59 UTC
svn commit: r330097 - in /beehive/trunk/netui/test: dist-test/files/
webapps/jsf/ webapps/jsf/jsfWeb/ webapps/jsf/src/ webapps/jsf/web/
webapps/jsf/web/WEB-INF/src/ webapps/jsf/web/index/
Author: ekoneil
Date: Tue Nov 1 09:17:50 2005
New Revision: 330097
URL: http://svn.apache.org/viewcvs?rev=330097&view=rev
Log:
Rework the jsf/ test webapp into the web/ + src/ project model.
BB: self
Test: jsfWeb tests pass in SVN and in the test distribution
Added:
beehive/trunk/netui/test/webapps/jsf/src/
- copied from r330091, beehive/trunk/netui/test/webapps/jsf/jsfWeb/WEB-INF/src/
beehive/trunk/netui/test/webapps/jsf/web/
- copied from r330091, beehive/trunk/netui/test/webapps/jsf/jsfWeb/
beehive/trunk/netui/test/webapps/jsf/web/index/Controller.java
- copied unchanged from r330091, beehive/trunk/netui/test/webapps/jsf/jsfWeb/index/Controller.jpf
Removed:
beehive/trunk/netui/test/webapps/jsf/jsfWeb/
beehive/trunk/netui/test/webapps/jsf/web/WEB-INF/src/
beehive/trunk/netui/test/webapps/jsf/web/index/Controller.jpf
Modified:
beehive/trunk/netui/test/dist-test/files/build.xml
beehive/trunk/netui/test/webapps/jsf/build.xml
Modified: beehive/trunk/netui/test/dist-test/files/build.xml
URL: http://svn.apache.org/viewcvs/beehive/trunk/netui/test/dist-test/files/build.xml?rev=330097&r1=330096&r2=330097&view=diff
==============================================================================
--- beehive/trunk/netui/test/dist-test/files/build.xml (original)
+++ beehive/trunk/netui/test/dist-test/files/build.xml Tue Nov 1 09:17:50 2005
@@ -45,6 +45,10 @@
<fail unless="dist.home" message="Could not run tests on distribution archive; please dist.home was not specified"/>
+ <ant dir="webapps/jsf" antfile="build.xml" target="bvt" inheritAll="false">
+ <property name="beehive.home" location="${dist.home}"/>
+ </ant>
+<!--
<antcall target="junit.drt"/>
<ant dir="webapps/drt" antfile="build.xml" target="drt" inheritAll="false">
@@ -54,27 +58,31 @@
</ant>
<antcall target="compiler.bvt"/>
-
+-->
<!-- coreWeb + Struts 1.2 BVT -->
+<!--
<ant dir="webapps/drt" antfile="build.xml" target="bvt" inheritAll="false">
<property name="beehive.home" location="${dist.home}"/>
<property name="xbean.jar" location="../external/apache-xbean.jar"/>
<property name="jsr173.jar" location="../external/jsr173_1.0_api.jar"/>
</ant>
-
+-->
<!-- coreWeb + Struts 1.1 BVT -->
<!-- jsfWeb + Struts 1.2 BVT -->
+<!--
<ant dir="webapps/jsf" antfile="build.xml" target="bvt" inheritAll="false">
<property name="beehive.home" location="${dist.home}"/>
</ant>
-
+-->
<!-- jsfWeb + Struts 1.1 BVT -->
<!-- urlTemplates + Struts 1.1 BVT -->
+<!--
<ant dir="webapps/urlTemplates" antfile="build.xml" target="bvt" inheritAll="false">
<property name="beehive.home" location="${dist.home}"/>
</ant>
+-->
</target>
<!--
Modified: beehive/trunk/netui/test/webapps/jsf/build.xml
URL: http://svn.apache.org/viewcvs/beehive/trunk/netui/test/webapps/jsf/build.xml?rev=330097&r1=330096&r2=330097&view=diff
==============================================================================
--- beehive/trunk/netui/test/webapps/jsf/build.xml (original)
+++ beehive/trunk/netui/test/webapps/jsf/build.xml Tue Nov 1 09:17:50 2005
@@ -7,11 +7,15 @@
<property environment="os"/>
<property file="build.properties"/>
+ <property name="webapp.build.dir" location="build"/>
+ <property name="classes.dir" location="${webapp.build.dir}/WEB-INF/classes"/>
+ <property name="src.dir" location="src"/>
+ <property name="web.dir" location="web"/>
+
<property name="webapp.name" value="jsfWeb"/>
<property name="testRecorder.config.name" value="netui-server-jsf-config"/>
<property name="server.root.url" value="http://localhost:8080"/>
<property name="webapp.waitfor.url" value="${server.root.url}/${webapp.name}"/>
- <property name="webapp.dir" location="${webapp.name}"/>
<import file="${testrecorder.dir}/testRecorder.xml"/>
<import file="${beehive.home}/beehive-imports.xml"/>
@@ -28,58 +32,59 @@
<echo>Struts version: ${struts.version}</echo>
- <deploy-netui webappdir="${webapp.dir}"/>
+ <deploy-netui webappdir="${webapp.build.dir}"/>
<testrecorder-config testfile="${basedir}/testRecorder/config/testRecorder-tests.xml"
configfile="testRecorder/config/testRecorder-config.xml"
webappfile="testRecorder/config/testRecorder-webapp-${jsf.dist}.xml"
appdir="${basedir}"
- outputdir="jsfWeb/WEB-INF/classes"/>
+ outputdir="${classes.dir}"/>
- <testrecorder-deploy webappdir="${webapp.dir}"/>
+ <testrecorder-deploy webappdir="${webapp.build.dir}"/>
- <copy file="${webapp.dir}/WEB-INF/web.xml.${jsf.dist}"
- tofile="${webapp.dir}/WEB-INF/web.xml"
+ <copy file="web/WEB-INF/web.xml.${jsf.dist}"
+ tofile="${webapp.build.dir}/WEB-INF/web.xml"
overwrite="true"
failonerror="true"/>
- <!-- this is the classpath to include when building webapp sources -->
+ <mkdir dir="${webapp.build.dir}"/>
+ <mkdir dir="${webapp.build.dir}/WEB-INF/classes"/>
+ <mkdir dir="${webapp.build.dir}/WEB-INF/lib"/>
+
+ <copy todir="${webapp.build.dir}">
+ <fileset dir="${web.dir}">
+ <exclude name="**/*.java"/>
+ </fileset>
+ </copy>
+
<path id="webapp.classpath">
<pathelement location="${servlet-api.jar}"/>
<pathelement location="${jsp-api.jar}"/>
- <pathelement location="${webapp.dir}/WEB-INF/classes"/>
- <fileset dir="${webapp.dir}/WEB-INF/lib">
- <include name="*.jar"/>
- </fileset>
- </path>
-
- <!--
- this directory needs to get whacked before every build so
- that control interface repackagings don't cause stale
- files to be compiled
- -->
- <delete dir="${webapp.dir}/WEB-INF/.tmpbeansrc" includeEmptyDirs="true"/>
-
- <mkdir dir="${webapp.dir}/WEB-INF/classes"/>
-
- <!-- compile controls -->
- <echo>Building Controls</echo>
- <build-controls srcdir="${webapp.dir}/WEB-INF/src"
- destdir="${webapp.dir}/WEB-INF/classes"
- tempdir="${webapp.dir}/WEB-INF/.tmpbeansrc"
- classpathref="webapp.classpath"/>
-
- <!-- compile JPFs -->
- <echo>Building Page Flows</echo>
- <build-pageflows srcdir="${webapp.dir}"
- tempdir="${webapp.dir}/WEB-INF/.tmpbeansrc"
+ <pathelement location="${webapp.build.dir}/WEB-INF/classes"/>
+ <fileset dir="${webapp.build.dir}/WEB-INF/lib" includes="*.jar"/>
+ </path>
+
+ <path id="webapp.sourcepath">
+ <pathelement location="${web.dir}"/>
+ <pathelement location="${src.dir}"/>
+ </path>
+
+ <build-controls srcdir="${src.dir}"
+ destdir="${classes.dir}"
+ classpathref="webapp.classpath"
+ tempdir="${webapp.build.dir}/WEB-INF/.tmpbeansrc"/>
+
+ <build-pageflows srcdir="${basedir}"
+ webcontentdir="${web.dir}"
+ destdir="${webapp.build.dir}/WEB-INF/classes"
+ tempdir="${webapp.build.dir}/WEB-INF/.tmpbeansrc"
+ sourcepathref="webapp.sourcepath"
classpathref="webapp.classpath"/>
- <!-- copy resources -->
<echo>Copying all .properties and .xml files to ${webapp.dir}/WEB-INF/classes</echo>
- <copy todir="${webapp.dir}/WEB-INF/classes">
- <fileset dir="${webapp.dir}/WEB-INF/src" includes="**/*.properties"/>
- <fileset dir="${webapp.dir}/WEB-INF/src" includes="**/*.xml"/>
+ <copy todir="${webapp.build.dir}/WEB-INF/classes">
+ <fileset dir="${src.dir}" includes="**/*.properties"/>
+ <fileset dir="${src.dir}" includes="**/*.xml"/>
</copy>
<!--
@@ -87,30 +92,30 @@
and the JSF RI, precompiled JSPs can cause CNFEs.
-->
<touch>
- <fileset dir="${webapp.dir}">
+ <fileset dir="${build.dir}">
<include name="**/*.jsp"/>
</fileset>
</touch>
</target>
+ <target name="build" description="Build the webapp using the default JSF implementation">
+ <antcall target="build.myfaces"/>
+ </target>
+
<target name="build.jsf-ri" description="Build webapp, and deploy the JSF Reference Implementation">
<echo message="--------------------------------------------------------------------------------------"/>
- <echo message="| NetUI jsfWeb BVT webapp build starting (using JSF Reference Implementation) |"/>
+ <echo message="| NetUI jsfWeb BVT webapp build starting (JSF Reference Implementation) |"/>
<echo message="---------------------------------------------------------------------------------------"/>
- <fail unless="os.JSF_HOME" message="JSF_HOME must point to the JavaServer Faces 1.1.01 Reference Implementation distribution."/>
+ <fail unless="os.JSF_HOME" message="JSF_HOME must reference a JavaServer Faces 1.1.01 Reference Implementation distribution."/>
- <property name="webinf.dir" value="${webapp.dir}/WEB-INF"/>
- <copy todir="${webinf.dir}/lib" overwrite="true" failonerror="true">
- <fileset dir="${os.JSF_HOME}/lib">
- <include name="*.jar"/>
- </fileset>
+ <copy todir="${webinf.dir}/WEB-INF/lib" overwrite="true" failonerror="true">
+ <fileset dir="${os.JSF_HOME}/lib" includes="*.jar"/>
</copy>
<property name="jsf.dist" value="jsf-ri"/>
<antcall target="build.internal"/>
-
<echo message="--------------------------------------------------"/>
<echo message="| NetUI jsfWeb BVT webapp build ending |"/>
<echo message="--------------------------------------------------"/>
@@ -118,11 +123,10 @@
<target name="build.myfaces" description="Build webapp, and deploy MyFaces">
<echo message="------------------------------------------------------------------"/>
- <echo message="| NetUI jsfWeb BVT webapp build starting (using MyFaces) |"/>
+ <echo message="| NetUI jsfWeb BVT webapp build starting (Apache MyFaces) |"/>
<echo message="------------------------------------------------------------------"/>
- <property name="webinf.dir" value="${webapp.dir}/WEB-INF"/>
- <copy todir="${webinf.dir}/lib" overwrite="true" failonerror="true">
+ <copy todir="${webapp.build.dir}/WEB-INF/lib" overwrite="true" failonerror="true">
<fileset dir="${myfaces.dir}" includes="*.jar"/>
</copy>
@@ -135,19 +139,7 @@
</target>
<target name="clean" description="Clean webapp">
- <delete dir="${webapp.dir}/resources/beehive/version1" quiet="true"/>
- <delete dir="${webapp.dir}/WEB-INF/classes" quiet="true"/>
- <delete quiet="true">
- <fileset dir="${webapp.dir}/WEB-INF/lib" includes="*.jar"/>
- </delete>
-
- <echo>Clean the test recorder to webapp at root: ${webapp.dir}</echo>
- <ant dir="${test.dir}/ant" antfile="testRecorder.xml" target="undeploy.testrecorder" inheritAll="false">
- <property name="webapp.dir" location="${webapp.dir}"/>
- </ant>
-
- <clean-webapp webappDir="${webapp.dir}"/>
- <delete file="${webapp.dir}/WEB-INF/web.xml" quiet="true"/>
+ <delete dir="${webapp.build.dir}"/>
</target>
<!-- ================================================================ -->
@@ -245,7 +237,7 @@
<!-- -->
<!-- ================================================================ -->
<target name="deploy" description="Deploy webapp">
- <deploy-webapp webappDir="${webapp.dir}" contextPath="${webapp.name}"/>
+ <deploy-webapp webappDir="${webapp.build.dir}" contextPath="${webapp.name}"/>
</target>
<target name="undeploy" description="Undeploy webapp">