You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beehive.apache.org by ri...@apache.org on 2005/05/19 06:30:20 UTC
svn commit: r170865 - in /incubator/beehive/trunk: ./ netui/ netui/ant/
netui/test/dist-test/ant/ netui/test/webapps/jsf/
netui/test/webapps/jsf/jsfWeb/WEB-INF/ samples/
samples/netui-jsf/WEB-INF/lib/ samples/netui-jsf/WEB-INF/src/
samples/netui-samples/WEB-INF/lib/ samples/netui-samples/WEB-INF/src/
Author: rich
Date: Wed May 18 21:30:17 2005
New Revision: 170865
URL: http://svn.apache.org/viewcvs?rev=170865&view=rev
Log:
NetUI/JSF Sample build work, most importantly:
- WEB-INF/src/build.xml now has two targets: build-myfaces and build-jsf-ri (for building against MyFaces or the JSF Reference Implementation). They require "myfaces.dir" or "jsf-ri-dir" to be set, respectively.
- Each of netui-samples and netui-jsf now use a single build.properties and build.xml (the build-dist.properties and build-dist.xml files are gone). In the future, they may need to be split out, but build-dist.* were not being used in the distribution currently.
- netui-jsf sample is tied into the distribution build.
tests: bvt.myfaces and bvt.jsf-ri in netui/test/webapps/jsf, run.tests against the distributions (WinXP)
BB: self (linux)
Removed:
incubator/beehive/trunk/samples/netui-jsf/WEB-INF/lib/
incubator/beehive/trunk/samples/netui-jsf/WEB-INF/src/build-dist.properties
incubator/beehive/trunk/samples/netui-jsf/WEB-INF/src/build-dist.xml
incubator/beehive/trunk/samples/netui-samples/WEB-INF/lib/
incubator/beehive/trunk/samples/netui-samples/WEB-INF/src/build-dist.properties
incubator/beehive/trunk/samples/netui-samples/WEB-INF/src/build-dist.xml
Modified:
incubator/beehive/trunk/distribution.xml
incubator/beehive/trunk/netui/ant/netui.properties
incubator/beehive/trunk/netui/netui-imports.xml
incubator/beehive/trunk/netui/test/dist-test/ant/netui-test-imports.xml
incubator/beehive/trunk/netui/test/dist-test/ant/testWebBuild.xml
incubator/beehive/trunk/netui/test/webapps/jsf/build.xml
incubator/beehive/trunk/netui/test/webapps/jsf/jsfWeb/WEB-INF/web.xml.jsf-ri
incubator/beehive/trunk/samples/build.xml
incubator/beehive/trunk/samples/netui-jsf/WEB-INF/src/build.properties
incubator/beehive/trunk/samples/netui-jsf/WEB-INF/src/build.xml
incubator/beehive/trunk/samples/netui-samples/WEB-INF/src/build.properties
incubator/beehive/trunk/samples/netui-samples/WEB-INF/src/build.xml
Modified: incubator/beehive/trunk/distribution.xml
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/distribution.xml?rev=170865&r1=170864&r2=170865&view=diff
==============================================================================
--- incubator/beehive/trunk/distribution.xml (original)
+++ incubator/beehive/trunk/distribution.xml Wed May 18 21:30:17 2005
@@ -32,6 +32,7 @@
<project name="Beehive/Distribution" default="usage" basedir=".">
<import file="beehive-imports.xml"/>
+ <import file="netui/netui-imports.xml"/>
<import file="ant/axis-import.xml"/>
<property name="dist.src.name" value="${dist.name}-src"/>
@@ -91,6 +92,9 @@
<ant antfile="${samples.verify.dir}/samples/wsm-addressbook-enhanced/WEB-INF/src/build.xml" target="build" inheritAll="false"/>
<ant antfile="${samples.verify.dir}/samples/netui-samples/WEB-INF/src/build.xml" target="build" inheritAll="false"/>
+ <ant antfile="${samples.verify.dir}/samples/netui-jsf/WEB-INF/src/build.xml" target="build-myfaces" inheritAll="false">
+ <property name="myfaces.dir" location="${myfaces.dir}"/>
+ </ant>
<ant antfile="${samples.verify.dir}/samples/wsm-samples/WEB-INF/src/build.xml" target="build" inheritAll="false"/>
<ant antfile="${samples.verify.dir}/samples/controls-webservices-blank/build.xml" target="build" inheritAll="false"/>
@@ -302,8 +306,12 @@
<copy todir="${dist.dir}/samples/netui-samples" failOnError="true">
<fileset dir="samples/netui-samples">
- <exclude name="WEB-INF/src/build-dist.xml"/>
- <exclude name="WEB-INF/src/build-dist.properties"/>
+ <exclude name="WEB-INF/lib/*.jar"/>
+ </fileset>
+ </copy>
+
+ <copy todir="${dist.dir}/samples/netui-jsf" failOnError="true">
+ <fileset dir="samples/netui-jsf">
<exclude name="WEB-INF/lib/*.jar"/>
</fileset>
</copy>
Modified: incubator/beehive/trunk/netui/ant/netui.properties
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/ant/netui.properties?rev=170865&r1=170864&r2=170865&view=diff
==============================================================================
--- incubator/beehive/trunk/netui/ant/netui.properties (original)
+++ incubator/beehive/trunk/netui/ant/netui.properties Wed May 18 21:30:17 2005
@@ -31,8 +31,10 @@
struts.dir=${netui.home}/external/struts
struts11.dir=${struts.dir}/legacy/jakarta-struts-1.1-lib
struts12.dir=${struts.dir}
-jsf.dir=${netui.home}/external/jsf/myfaces-1.0.9
tomcat.lib.dir=${netui.home}/external/tomcat
+myfaces.dir=${netui.home}/external/jsf/myfaces-1.0.9/lib
+myfaces.jar=${myfaces.dir}/myfaces.jar
+jsf-api.jar=${myfaces.dir}/myfaces-jsf-api.jar
#
# Tomcat properties. These JARs are used to compile the Tomcat 5x ServletContextAdapter.
Modified: incubator/beehive/trunk/netui/netui-imports.xml
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/netui-imports.xml?rev=170865&r1=170864&r2=170865&view=diff
==============================================================================
--- incubator/beehive/trunk/netui/netui-imports.xml (original)
+++ incubator/beehive/trunk/netui/netui-imports.xml Wed May 18 21:30:17 2005
@@ -35,9 +35,7 @@
</path>
<path id="jsf.dependency.path">
- <fileset dir="${jsf.dir}/lib">
- <include name="myfaces-jsf-api.jar"/>
- </fileset>
+ <fileset file="${jsf-api.jar}"/>
</path>
<path id="commons-el.dependency.path">
Modified: incubator/beehive/trunk/netui/test/dist-test/ant/netui-test-imports.xml
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/dist-test/ant/netui-test-imports.xml?rev=170865&r1=170864&r2=170865&view=diff
==============================================================================
--- incubator/beehive/trunk/netui/test/dist-test/ant/netui-test-imports.xml (original)
+++ incubator/beehive/trunk/netui/test/dist-test/ant/netui-test-imports.xml Wed May 18 21:30:17 2005
@@ -9,7 +9,7 @@
<property name="log4jconfig.verbose.junit" location="${test.dir}/conf/junitLogCfgVerbose.xml"/>
<property name="log4jconfig.junit" location="${test.dir}/conf/junitLogCfg.xml"/>
<property name="netui.ant.dir" location="${test.dir}/ant"/>
- <property name="jsf.dir" location="${test.dir}/jsf/myfaces-1.0.9"/>
+ <property name="jsf.dir" location="${test.dir}/jsf/myfaces-1.0.9/lib"/>
<property name="struts11.dir" location="${test.dir}/struts/struts1.1"/>
<property name="struts12.dir" location="${test.dir}/struts/struts1.2"/>
<property name="test.classes.dir" location="${test.dir}/junit"/>
Modified: incubator/beehive/trunk/netui/test/dist-test/ant/testWebBuild.xml
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/dist-test/ant/testWebBuild.xml?rev=170865&r1=170864&r2=170865&view=diff
==============================================================================
--- incubator/beehive/trunk/netui/test/dist-test/ant/testWebBuild.xml (original)
+++ incubator/beehive/trunk/netui/test/dist-test/ant/testWebBuild.xml Wed May 18 21:30:17 2005
@@ -91,7 +91,7 @@
<echo>Deploying the myFaces to webapp at root: ${webapp.dir}</echo>
<property name="jsf.dist" value="myfaces"/>
<copy todir="${webapp.dir}/WEB-INF/lib" overwrite="true" failonerror="true">
- <fileset dir="${jsf.dir}/lib">
+ <fileset dir="${jsf.dir}">
<include name="*.jar"/>
</fileset>
</copy>
Modified: incubator/beehive/trunk/netui/test/webapps/jsf/build.xml
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/jsf/build.xml?rev=170865&r1=170864&r2=170865&view=diff
==============================================================================
--- incubator/beehive/trunk/netui/test/webapps/jsf/build.xml (original)
+++ incubator/beehive/trunk/netui/test/webapps/jsf/build.xml Wed May 18 21:30:17 2005
@@ -63,11 +63,6 @@
<include name="*.jar"/>
</fileset>
</copy>
- <copy todir="${webinf.dir}" overwrite="true" failonerror="true">
- <fileset dir="${os.JSF_HOME}/lib">
- <include name="*.tld"/>
- </fileset>
- </copy>
<property name="jsf.dist" value="jsf-ri"/>
<antcall target="build.internal"/>
@@ -85,7 +80,7 @@
<property name="webinf.dir" value="${webapp.dir}/WEB-INF"/>
<copy todir="${webinf.dir}/lib" overwrite="true" failonerror="true">
- <fileset dir="${jsf.dir}/lib">
+ <fileset dir="${myfaces.dir}">
<include name="*.jar"/>
</fileset>
</copy>
Modified: incubator/beehive/trunk/netui/test/webapps/jsf/jsfWeb/WEB-INF/web.xml.jsf-ri
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/netui/test/webapps/jsf/jsfWeb/WEB-INF/web.xml.jsf-ri?rev=170865&r1=170864&r2=170865&view=diff
==============================================================================
--- incubator/beehive/trunk/netui/test/webapps/jsf/jsfWeb/WEB-INF/web.xml.jsf-ri (original)
+++ incubator/beehive/trunk/netui/test/webapps/jsf/jsfWeb/WEB-INF/web.xml.jsf-ri Wed May 18 21:30:17 2005
@@ -182,18 +182,4 @@
<location>/error.jsp</location>
</error-page>
- <jsp-config>
- <!-- the JSF Tag Libraries -->
- <taglib>
- <taglib-uri>http://java.sun.com/jsf/html</taglib-uri>
- <taglib-location>/WEB-INF/html_basic.tld</taglib-location>
- </taglib>
-
- <taglib>
- <taglib-uri>http://java.sun.com/jsf/core</taglib-uri>
- <taglib-location>/WEB-INF/jsf_core.tld</taglib-location>
- </taglib>
-
- </jsp-config>
-
</web-app>
Modified: incubator/beehive/trunk/samples/build.xml
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/samples/build.xml?rev=170865&r1=170864&r2=170865&view=diff
==============================================================================
--- incubator/beehive/trunk/samples/build.xml (original)
+++ incubator/beehive/trunk/samples/build.xml Wed May 18 21:30:17 2005
@@ -21,6 +21,7 @@
<project name="Beehive/SVN/Samples" default="build" basedir=".">
<import file="../beehive-imports.xml"/>
+ <import file="../netui/netui-imports.xml"/>
<target name="clean" description="Clean the Beehive samples">
<echo>---------------------------------------------------------</echo>
@@ -37,7 +38,8 @@
<ant antfile="wsm-employee/WEB-INF/src/build-svn.xml" target="clean" inheritAll="false"/>
<ant antfile="wsm-samples/WEB-INF/src/build-svn.xml" target="clean" inheritAll="false"/>
- <ant antfile="netui-samples/WEB-INF/src/build-dist.xml" target="clean" inheritAll="false"/>
+ <ant antfile="netui-samples/WEB-INF/src/build.xml" target="clean" inheritAll="false"/>
+ <ant antfile="netui-jsf/WEB-INF/src/build.xml" target="clean" inheritAll="false"/>
<ant antfile="controls-spring/integration/build.xml" target="clean" inheritAll="false"/>
<ant antfile="controls-spring/web/WEB-INF/src/build-svn.xml" target="clean" inheritAll="false"/>
@@ -59,7 +61,10 @@
<ant antfile="wsm-addressbook/WEB-INF/src/build-svn.xml" target="build" inheritAll="false"/>
<ant antfile="wsm-samples/WEB-INF/src/build-svn.xml" target="build" inheritAll="false"/>
- <ant antfile="netui-samples/WEB-INF/src/build-dist.xml" target="build" inheritAll="false"/>
+ <ant antfile="netui-samples/WEB-INF/src/build.xml" target="build" inheritAll="false"/>
+ <ant antfile="netui-jsf/WEB-INF/src/build.xml" target="build-myfaces" inheritAll="false">
+ <property name="myfaces.dir" value="${myfaces.dir}"/>
+ </ant>
<ant antfile="controls-spring/integration/build.xml" target="build" inheritAll="false"/>
<ant antfile="controls-spring/web/WEB-INF/src/build-svn.xml" target="build" inheritAll="false"/>
@@ -68,4 +73,4 @@
<!-- <ant antfile="wsm-petstore-dashboard/WEB-INF/build-svn.xml" target="clean" inheritAll="false"/> -->
</target>
-</project>
\ No newline at end of file
+</project>
Modified: incubator/beehive/trunk/samples/netui-jsf/WEB-INF/src/build.properties
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/samples/netui-jsf/WEB-INF/src/build.properties?rev=170865&r1=170864&r2=170865&view=diff
==============================================================================
--- incubator/beehive/trunk/samples/netui-jsf/WEB-INF/src/build.properties (original)
+++ incubator/beehive/trunk/samples/netui-jsf/WEB-INF/src/build.properties Wed May 18 21:30:17 2005
@@ -1,5 +1,5 @@
#
-#
+# Build properties for use with the netui-jsf app.
#
beehive.home=../../../..
@@ -7,3 +7,13 @@
jsp-api.jar=${os.CATALINA_HOME}/common/lib/jsp-api.jar
context.path=netui-jsf
+
+# TODO:
+# if using MyFaces, uncomment the 'myfaces.dir' property and set it to a directory that contains
+# myfaces.jar (MyFaces v1.0.9 or later).
+#myfaces.dir=
+
+# TODO:
+# If using the JavaServer Faces Reference Implementation, uncomment the 'jsf-ri.dir' property and
+# set it to a directory that contains jsf-api.jar and jsf-impl.jar (JSF RI v1.1_01).
+#jsf-ri.dir=
Modified: incubator/beehive/trunk/samples/netui-jsf/WEB-INF/src/build.xml
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/samples/netui-jsf/WEB-INF/src/build.xml?rev=170865&r1=170864&r2=170865&view=diff
==============================================================================
--- incubator/beehive/trunk/samples/netui-jsf/WEB-INF/src/build.xml (original)
+++ incubator/beehive/trunk/samples/netui-jsf/WEB-INF/src/build.xml Wed May 18 21:30:17 2005
@@ -18,7 +18,7 @@
-->
<!--
- An Ant build file for compiling the petstoreWeb Beehive sample web application.
+ An Ant build file for compiling the netui-jsf Beehive sample web application.
-->
<project name="Beehive/Samples/NetUI-JSF-Samples" default="usage" basedir=".">
@@ -43,15 +43,37 @@
</fileset>
</path>
- <target name="deploy-beehive" description="Copy the Beehive webapp rutime into the petstoreWeb webapp">
+ <target name="deploy-beehive" description="Copy the Beehive webapp rutime into the netui-jsf webapp">
<deploy-netui webappDir="${webapp.dir}"/>
<deploy-wsm webappDir="${webapp.dir}"/>
</target>
- <target name="build" depends="deploy-beehive" description="Build the petstoreWeb webapp">
+ <target name="init">
<available property="webapp.dir.available" file="${webapp.dir}" type="dir"/>
<fail unless="webapp.dir.available" message="Can't find the webapp directory ${webapp.dir}"/>
+ </target>
+
+ <target name="init-myfaces" depends="init" description="Prepare the webapp for use with MyFaces">
+ <property name="myfaces.jar" value="${myfaces.dir}/myfaces.jar"/>
+ <available property="myfaces.jar.available" file="${myfaces.jar}" type="file"/>
+ <fail unless="myfaces.jar.available" message="Can't find the MyFaces JAR ${myfaces.jar}"/>
+ <copy file="${myfaces.jar}" todir="${webapp.dir}/WEB-INF/lib"/>
+ <copy file="${webapp.dir}/WEB-INF/web.xml.myfaces" tofile="${webapp.dir}/WEB-INF/web.xml"/>
+ </target>
+
+ <target name="init-jsf-ri" depends="init" description="Prepare the webapp for use with the JSF Reference Implementation">
+ <property name="jsf-ri-api.jar" value="${jsf-ri.dir}/jsf-api.jar"/>
+ <property name="jsf-ri-impl.jar" value="${jsf-ri.dir}/jsf-impl.jar"/>
+ <available property="jsf-ri-api.jar.available" file="${jsf-ri-api.jar}" type="file"/>
+ <available property="jsf-ri-impl.jar.available" file="${jsf-ri-impl.jar}" type="file"/>
+ <fail unless="jsf-ri-api.jar.available" message="Can't find the JSF API JAR ${jsf-ri-api.jar}"/>
+ <fail unless="jsf-ri-impl.jar.available" message="Can't find the JSF implementation JAR ${jsf-ri-impl.jar}"/>
+ <copy file="${jsf-ri-api.jar}" todir="${webapp.dir}/WEB-INF/lib"/>
+ <copy file="${jsf-ri-impl.jar}" todir="${webapp.dir}/WEB-INF/lib"/>
+ <copy file="${webapp.dir}/WEB-INF/web.xml.jsf-ri" tofile="${webapp.dir}/WEB-INF/web.xml"/>
+ </target>
+ <target name="build-internal" depends="deploy-beehive">
<!--
this directory needs to get whacked before every build so
that control interface repackagings don't cause stale
@@ -78,17 +100,27 @@
classpathref="webapp.build.classpath"/>
<!-- copy resources -->
- <echo>Copy all .properties and .xml files</echo>
+ <echo>Copy all .properties and .xml files</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>
</target>
+ <target name="build-myfaces" depends="init,init-myfaces,build-internal"
+ description="Build the netui-jsf webapp, for use with MyFaces"/>
+
+ <target name="build-jsf-ri" depends="init,init-jsf-ri,build-internal"
+ description="Build the netui-jsf webapp, for use with the JSF Reference Implementation"/>
+
<target name="clean" description="Clean the netui-jsf webapp">
<delete dir="${webapp.dir}/WEB-INF/classes"/>
+ <delete dir="${webapp.dir}/WEB-INF/lib"/>
<delete dir="${webapp.dir}/WEB-INF/${tmp.sourcegen.dir}"/>
<delete dir="${webapp.dir}/WEB-INF/.pageflow-struts-generated"/>
+
+ <!-- web.xml is copied, depending on whether MyFaces or the JSF Reference Implementation is used -->
+ <delete file="${webapp.dir}/WEB-INF/web.xml"/>
</target>
<target name="war" description="Build a compressed WAR file that can be deployed to an application container">
@@ -105,13 +137,12 @@
<target name="usage" description="Print usage information for this build file">
<echo>
-To run the webapp, several steps need to occur:
- (manual) Deploy either MyFaces or the JavaServer Faces Reference Implementation libraries to WEB-INF/lib.
- (manual) Copy either WEB-INF/web.xml.myfaces or WEB-INF/web.xml.jsf-ri to WEB-INF/web.xml, depending on
- which JSF implementation you are using.
+Welcome to the Beehive netui-jsf webapp!
+
ant deploy-beehive -- this deploys the Beehive webapp runtime
- ant build -- this builds the netui-jsf webapp
- ant war -- creates a .war archive to deploy
+ ant build-myfaces -- this builds the netui-jsf webapp against MyFaces (v1.0.9 or later)
+ ant build-jsf-ri -- this builds the netui-jsf webapp against the JSF Reference Implementation (v1.1_01)
+ ant war -- creates a .war archive to deploy; build-myfaces or build-jsf-ri must be called first
</echo>
<java fork="no" classname="org.apache.tools.ant.Main">
Modified: incubator/beehive/trunk/samples/netui-samples/WEB-INF/src/build.properties
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/samples/netui-samples/WEB-INF/src/build.properties?rev=170865&r1=170864&r2=170865&view=diff
==============================================================================
--- incubator/beehive/trunk/samples/netui-samples/WEB-INF/src/build.properties (original)
+++ incubator/beehive/trunk/samples/netui-samples/WEB-INF/src/build.properties Wed May 18 21:30:17 2005
@@ -1,9 +1,9 @@
#
-#
+# Build properties for use with the netui-samples app.
#
beehive.home=../../../..
servlet-api.jar=${os.CATALINA_HOME}/common/lib/servlet-api.jar
jsp-api.jar=${os.CATALINA_HOME}/common/lib/jsp-api.jar
-context.path=netui-samples
\ No newline at end of file
+context.path=netui-samples
Modified: incubator/beehive/trunk/samples/netui-samples/WEB-INF/src/build.xml
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/samples/netui-samples/WEB-INF/src/build.xml?rev=170865&r1=170864&r2=170865&view=diff
==============================================================================
--- incubator/beehive/trunk/samples/netui-samples/WEB-INF/src/build.xml (original)
+++ incubator/beehive/trunk/samples/netui-samples/WEB-INF/src/build.xml Wed May 18 21:30:17 2005
@@ -87,6 +87,7 @@
<target name="clean" description="Clean the netui-samples webapp">
<delete dir="${webapp.dir}/WEB-INF/classes"/>
+ <delete dir="${webapp.dir}/WEB-INF/lib"/>
<delete dir="${webapp.dir}/WEB-INF/${tmp.sourcegen.dir}"/>
<delete dir="${webapp.dir}/WEB-INF/.pageflow-struts-generated"/>
</target>