You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beehive.apache.org by cr...@apache.org on 2005/11/04 18:00:46 UTC
svn commit: r330843 - in /beehive/trunk: ./ samples/ samples/netui-jsf/
samples/netui-jsf/WEB-INF/ samples/netui-jsf/jsf/
samples/netui-jsf/resources/ samples/netui-jsf/src/
samples/netui-jsf/src/org/ samples/netui-jsf/src/shared/
samples/netui-jsf/web...
Author: crogers
Date: Fri Nov 4 09:00:04 2005
New Revision: 330843
URL: http://svn.apache.org/viewcvs?rev=330843&view=rev
Log:
Rework the netui-jsf web application to the web/ + src/ project model.
BB: self
Test: build.dist pass
Added:
beehive/trunk/samples/netui-jsf/build.properties
- copied, changed from r330600, beehive/trunk/samples/netui-jsf/WEB-INF/src/build.properties
beehive/trunk/samples/netui-jsf/build.xml
- copied, changed from r330600, beehive/trunk/samples/netui-jsf/WEB-INF/src/build.xml
beehive/trunk/samples/netui-jsf/src/
- copied from r330600, beehive/trunk/samples/netui-jsf/WEB-INF/src/
beehive/trunk/samples/netui-jsf/src/log4j.xml
- copied unchanged from r330836, beehive/trunk/samples/netui-jsf/WEB-INF/src/log4j.xml
beehive/trunk/samples/netui-jsf/src/org/
- copied from r330836, beehive/trunk/samples/netui-jsf/WEB-INF/src/org/
beehive/trunk/samples/netui-jsf/src/shared/
- copied from r330836, beehive/trunk/samples/netui-jsf/WEB-INF/src/shared/
beehive/trunk/samples/netui-jsf/web/
beehive/trunk/samples/netui-jsf/web/Controller.java
- copied unchanged from r330600, beehive/trunk/samples/netui-jsf/Controller.java
beehive/trunk/samples/netui-jsf/web/WEB-INF/
- copied from r330600, beehive/trunk/samples/netui-jsf/WEB-INF/
beehive/trunk/samples/netui-jsf/web/WEB-INF/beehive-netui-validator-rules.xml
- copied unchanged from r330836, beehive/trunk/samples/netui-jsf/WEB-INF/beehive-netui-validator-rules.xml
beehive/trunk/samples/netui-jsf/web/WEB-INF/faces-config.xml
- copied unchanged from r330836, beehive/trunk/samples/netui-jsf/WEB-INF/faces-config.xml
beehive/trunk/samples/netui-jsf/web/WEB-INF/validator-rules.xml
- copied unchanged from r330836, beehive/trunk/samples/netui-jsf/WEB-INF/validator-rules.xml
beehive/trunk/samples/netui-jsf/web/WEB-INF/web.xml.jsf-ri
- copied unchanged from r330836, beehive/trunk/samples/netui-jsf/WEB-INF/web.xml.jsf-ri
beehive/trunk/samples/netui-jsf/web/WEB-INF/web.xml.myfaces
- copied unchanged from r330836, beehive/trunk/samples/netui-jsf/WEB-INF/web.xml.myfaces
beehive/trunk/samples/netui-jsf/web/index.jsp
- copied unchanged from r330600, beehive/trunk/samples/netui-jsf/index.jsp
beehive/trunk/samples/netui-jsf/web/jsf/
- copied from r330600, beehive/trunk/samples/netui-jsf/jsf/
beehive/trunk/samples/netui-jsf/web/jsf/Controller.java
- copied unchanged from r330836, beehive/trunk/samples/netui-jsf/jsf/Controller.java
beehive/trunk/samples/netui-jsf/web/jsf/error.jsp
- copied unchanged from r330836, beehive/trunk/samples/netui-jsf/jsf/error.jsp
beehive/trunk/samples/netui-jsf/web/jsf/home.java
- copied unchanged from r330836, beehive/trunk/samples/netui-jsf/jsf/home.java
beehive/trunk/samples/netui-jsf/web/jsf/home.jsp
- copied unchanged from r330836, beehive/trunk/samples/netui-jsf/jsf/home.jsp
beehive/trunk/samples/netui-jsf/web/jsf/physiciansFlow/
- copied from r330836, beehive/trunk/samples/netui-jsf/jsf/physiciansFlow/
beehive/trunk/samples/netui-jsf/web/jsf/style.css
- copied unchanged from r330836, beehive/trunk/samples/netui-jsf/jsf/style.css
beehive/trunk/samples/netui-jsf/web/resources/
- copied from r330600, beehive/trunk/samples/netui-jsf/resources/
beehive/trunk/samples/netui-jsf/web/resources/template/
- copied from r330836, beehive/trunk/samples/netui-jsf/resources/template/
Removed:
beehive/trunk/samples/netui-jsf/Controller.java
beehive/trunk/samples/netui-jsf/WEB-INF/
beehive/trunk/samples/netui-jsf/index.jsp
beehive/trunk/samples/netui-jsf/jsf/
beehive/trunk/samples/netui-jsf/resources/
beehive/trunk/samples/netui-jsf/src/build.properties
beehive/trunk/samples/netui-jsf/src/build.xml
beehive/trunk/samples/netui-jsf/web/WEB-INF/src/
Modified:
beehive/trunk/distribution.xml
beehive/trunk/samples/build.xml
beehive/trunk/samples/netui-jsf/README.txt
beehive/trunk/samples/netui-samples/build.xml
Modified: beehive/trunk/distribution.xml
URL: http://svn.apache.org/viewcvs/beehive/trunk/distribution.xml?rev=330843&r1=330842&r2=330843&view=diff
==============================================================================
--- beehive/trunk/distribution.xml (original)
+++ beehive/trunk/distribution.xml Fri Nov 4 09:00:04 2005
@@ -98,7 +98,7 @@
</ant>
<ant dir="${samples.verify.dir}/samples/netui-samples" antfile="build.xml" target="build" inheritAll="false"/>
- <ant dir="${samples.verify.dir}/samples/netui-jsf/WEB-INF/src" antfile="build.xml" target="build-myfaces" inheritAll="false">
+ <ant dir="${samples.verify.dir}/samples/netui-jsf" antfile="build.xml" target="build-myfaces" inheritAll="false">
<property name="myfaces.dir" location="${myfaces.dir}"/>
</ant>
@@ -272,9 +272,7 @@
</copy>
<copy todir="${dist.dir}/samples/netui-jsf" failOnError="true">
- <fileset dir="samples/netui-jsf">
- <exclude name="WEB-INF/lib/*.jar"/>
- </fileset>
+ <fileset dir="samples/netui-jsf"/>
</copy>
<!-- Copy the controls blank template app distro -->
Modified: beehive/trunk/samples/build.xml
URL: http://svn.apache.org/viewcvs/beehive/trunk/samples/build.xml?rev=330843&r1=330842&r2=330843&view=diff
==============================================================================
--- beehive/trunk/samples/build.xml (original)
+++ beehive/trunk/samples/build.xml Fri Nov 4 09:00:04 2005
@@ -40,7 +40,7 @@
<ant dir="wsm-employee/WEB-INF/src" antfile="build.xml" target="clean" inheritAll="false"/>
<ant dir="netui-samples" antfile="build.xml" target="clean" inheritAll="false"/>
- <ant dir="netui-jsf/WEB-INF/src" antfile="build.xml" target="clean" inheritAll="false"/>
+ <ant dir="netui-jsf" antfile="build.xml" target="clean" inheritAll="false"/>
<ant dir="controls-spring" antfile="build.xml" target="clean" inheritAll="false"/>
@@ -75,7 +75,7 @@
<ant dir="wsm-addressbook" antfile="build.xml" target="build" inheritAll="false"/>
<ant dir="netui-samples" antfile="build.xml" target="build" inheritAll="false"/>
- <ant dir="netui-jsf/WEB-INF/src" antfile="build.xml" target="build-myfaces" inheritAll="false">
+ <ant dir="netui-jsf" antfile="build.xml" target="build-myfaces" inheritAll="false">
<property name="myfaces.dir" value="${myfaces.dir}"/>
</ant>
Modified: beehive/trunk/samples/netui-jsf/README.txt
URL: http://svn.apache.org/viewcvs/beehive/trunk/samples/netui-jsf/README.txt?rev=330843&r1=330842&r2=330843&view=diff
==============================================================================
--- beehive/trunk/samples/netui-jsf/README.txt (original)
+++ beehive/trunk/samples/netui-jsf/README.txt Fri Nov 4 09:00:04 2005
@@ -46,8 +46,9 @@
Building
========
-The NetUI/JSF sample is set up to build "in place", so classes are built
-directly to WEB-INF/classes. The build.xml ant file is found in WEB-INF/src.
+The application is set up to create an exploded web application directory in
+build/ by copying the web/ directory, building Beehive source artifacts, and
+compiling the source files in the src/ directory.
The first time you build the web application, the Beehive runtime libraries will
need to be copied into the webapp with:
@@ -81,9 +82,7 @@
If you are using Tomcat 5.0.x for you J2EE container, you can deploy using the
following *after you have built using 'build-myfaces' or 'build-jsf-ri'*:
- $> cd <BeehiveRoot>/samples/netui-jsf/WEB-INF/src
- $> ant war
- $> cd <BeehiveRoot>/samples
+ $> ant build war
$> cp netui-jsf.war $CATALINA_HOME/webapps
Check the Beehive Wiki or your application container's documentation for
Copied: beehive/trunk/samples/netui-jsf/build.properties (from r330600, beehive/trunk/samples/netui-jsf/WEB-INF/src/build.properties)
URL: http://svn.apache.org/viewcvs/beehive/trunk/samples/netui-jsf/build.properties?p2=beehive/trunk/samples/netui-jsf/build.properties&p1=beehive/trunk/samples/netui-jsf/WEB-INF/src/build.properties&r1=330600&r2=330843&rev=330843&view=diff
==============================================================================
--- beehive/trunk/samples/netui-jsf/WEB-INF/src/build.properties (original)
+++ beehive/trunk/samples/netui-jsf/build.properties Fri Nov 4 09:00:04 2005
@@ -1,7 +1,7 @@
#
# Build properties for use with the netui-jsf app.
#
-beehive.home=../../../..
+beehive.home=../../
servlet-api.jar=${os.CATALINA_HOME}/common/lib/servlet-api.jar
jsp-api.jar=${os.CATALINA_HOME}/common/lib/jsp-api.jar
Copied: beehive/trunk/samples/netui-jsf/build.xml (from r330600, beehive/trunk/samples/netui-jsf/WEB-INF/src/build.xml)
URL: http://svn.apache.org/viewcvs/beehive/trunk/samples/netui-jsf/build.xml?p2=beehive/trunk/samples/netui-jsf/build.xml&p1=beehive/trunk/samples/netui-jsf/WEB-INF/src/build.xml&r1=330600&r2=330843&rev=330843&view=diff
==============================================================================
--- beehive/trunk/samples/netui-jsf/WEB-INF/src/build.xml (original)
+++ beehive/trunk/samples/netui-jsf/build.xml Fri Nov 4 09:00:04 2005
@@ -28,102 +28,94 @@
<import file="${beehive.home}/beehive-imports.xml"/>
<import file="${beehive.home}/ant/beehive-tools.xml"/>
- <property name="webapp.dir" location="${basedir}/../.."/>
+ <property name="build.dir" location="build"/>
+ <property name="web.dir" location="web"/>
+ <property name="src.dir" location="src"/>
+ <property name="ws.dir" location="ws"/>
<property name="tmp.sourcegen.dir" value=".tmpbeansrc"/>
<!-- Define the classpath used to build the webapp -->
- <path id="webapp.build.classpath">
+ <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>
+ <pathelement location="${build.dir}/WEB-INF/classes"/>
+ <fileset dir="${build.dir}/WEB-INF/lib" includes="*.jar"/>
</path>
- <target name="deploy-beehive" description="Copy the Beehive webapp rutime into the netui-jsf webapp">
- <deploy-netui webappDir="${webapp.dir}"/>
+ <target name="init">
+ <mkdir dir="${build.dir}"/>
+ <mkdir dir="${build.dir}/WEB-INF/classes"/>
+
+ <deploy-netui webappDir="${build.dir}"/>
+
+ <copy todir="${build.dir}/" includeEmptyDirs="false">
+ <fileset dir="${web.dir}">
+ <exclude name="**/*.java"/>
+ </fileset>
+ </copy>
+
+ <copy todir="${build.dir}/WEB-INF/classes">
+ <fileset dir="${src.dir}/">
+ <include name="**/*.properties"/>
+ <include name="**/*.xml"/>
+ </fileset>
+ </copy>
</target>
- <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 name="build-internal">
+ <echo>Building Controls</echo>
+ <build-controls srcdir="${basedir}/src"
+ destdir="${build.dir}/WEB-INF/classes"
+ tempdir="${build.dir}/WEB-INF/${tmp.sourcegen.dir}"
+ classpathref="webapp.classpath"/>
+
+ <echo>Building Page Flows</echo>
+ <build-pageflows srcdir="${web.dir}"
+ destdir="${build.dir}/WEB-INF/classes"
+ tempdir="${build.dir}/WEB-INF/${tmp.sourcegen.dir}"
+ classpathref="webapp.classpath"/>
</target>
- <target name="init-myfaces" depends="init" description="Prepare the webapp for use with MyFaces">
+ <target name="init-myfaces" depends="init"
+ description="Build the netui-jsf 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"/>
+ <copy file="${myfaces.jar}" todir="${build.dir}/WEB-INF/lib"/>
+ <copy file="${web.dir}/WEB-INF/web.xml.myfaces" tofile="${build.dir}/WEB-INF/web.xml"/>
</target>
- <target name="init-jsf-ri" depends="init" description="Prepare the webapp for use with the JSF Reference Implementation">
+ <target name="init-jsf-ri" depends="init"
+ description="Build the netui-jsf 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
- files to be compiled
- -->
- <delete dir="${webapp.dir}/WEB-INF/${tmp.sourcegen.dir}" includeEmptyDirs="true"/>
-
- <mkdir dir="${webapp.dir}/WEB-INF/classes"/>
-
- <!-- compile controls -->
- <build-controls srcdir="${webapp.dir}/WEB-INF/src"
- destdir="${webapp.dir}/WEB-INF/classes"
- tempdir="${webapp.dir}/WEB-INF/${tmp.sourcegen.dir}"
- classpathref="webapp.build.classpath"/>
-
- <!-- compile JPFs -->
- <build-pageflows srcdir="${webapp.dir}"
- destdir="${webapp.dir}/WEB-INF/classes"
- tempdir="${webapp.dir}/WEB-INF/${tmp.sourcegen.dir}"
- classpathref="webapp.build.classpath"/>
-
- <!-- copy resources -->
- <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>
+ <copy file="${jsf-ri-api.jar}" todir="${build.dir}/WEB-INF/lib"/>
+ <copy file="${jsf-ri-impl.jar}" todir="${build.dir}/WEB-INF/lib"/>
+ <copy file="${web.dir}/WEB-INF/web.xml.jsf-ri" tofile="${build.dir}/WEB-INF/web.xml"/>
</target>
- <target name="build-myfaces" depends="init,init-myfaces,build-internal"
+ <target name="build-myfaces" depends="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"
+ <target name="build-jsf-ri" depends="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}"/>
-
- <!-- web.xml is copied, depending on whether MyFaces or the JSF Reference Implementation is used -->
- <delete file="${webapp.dir}/WEB-INF/web.xml"/>
+ <delete dir="${build.dir}"/>
</target>
<target name="war" description="Build a compressed WAR file that can be deployed to an application container">
- <property name="archive.dir" value="${webapp.dir}/.."/>
+ <property name="archive.dir" value="${build.dir}/.."/>
<!-- this does *not* exclude source from the archive -->
- <war destfile="${archive.dir}/${context.path}.war" webxml="${webapp.dir}/WEB-INF/web.xml">
- <fileset dir="${webapp.dir}">
+ <war destfile="${archive.dir}/${context.path}.war" webxml="${build.dir}/WEB-INF/web.xml">
+ <fileset dir="${build.dir}">
<exclude name="WEB-INF/web.xml"/>
- <exclude name="WEB-INF/src/**"/>
</fileset>
</war>
</target>
@@ -132,11 +124,10 @@
<echo>
Welcome to the Beehive netui-jsf webapp!
- ant deploy-beehive -- deploys the Beehive webapp runtime
- ant build-myfaces -- builds the netui-jsf webapp against MyFaces (v1.0.9 or later)
- ant build-jsf-ri -- 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
- ant clean -- cleans the netui-jsf webapp
+ant clean -- cleans the netui-jsf webapp
+ant build-myfaces -- builds the netui-jsf webapp against MyFaces (v1.0.9 or later)
+ant build-jsf-ri -- 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: beehive/trunk/samples/netui-samples/build.xml
URL: http://svn.apache.org/viewcvs/beehive/trunk/samples/netui-samples/build.xml?rev=330843&r1=330842&r2=330843&view=diff
==============================================================================
--- beehive/trunk/samples/netui-samples/build.xml (original)
+++ beehive/trunk/samples/netui-samples/build.xml Fri Nov 4 09:00:04 2005
@@ -95,11 +95,10 @@
<echo>
Welcome to the Beehive netui-samples webapp!
-To run the webapp, two steps need to occur:
-ant deploy-beehive -- deploys the Beehive webapp runtime
+To build the webapp, run:
+ant clean -- cleans the netui-samples webapp
ant build -- builds the netui-samples webapp
ant war -- creates a .war archive to deploy
-ant clean -- cleans the netui-samples webapp
</echo>
</target>