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/05/11 19:12:58 UTC

svn commit: r169659 - in /incubator/beehive/trunk: distribution.xml samples/build.xml samples/controls-spring/web/WEB-INF/lib/ samples/controls-spring/web/WEB-INF/src/build-svn.xml samples/netui-samples/WEB-INF/src/build-dist.xml samples/netui-samples/WEB-INF/src/build.xml

Author: ekoneil
Date: Wed May 11 10:12:57 2005
New Revision: 169659

URL: http://svn.apache.org/viewcvs?rev=169659&view=rev
Log:
Various fixes to the distribution samples.

Add controls-spring to the list of samples that can be built before assembling a distribution.

BB: self
DRT: Beehive pass / build.dist pass


Added:
    incubator/beehive/trunk/samples/controls-spring/web/WEB-INF/src/build-svn.xml   (with props)
Removed:
    incubator/beehive/trunk/samples/controls-spring/web/WEB-INF/lib/
Modified:
    incubator/beehive/trunk/distribution.xml
    incubator/beehive/trunk/samples/build.xml
    incubator/beehive/trunk/samples/netui-samples/WEB-INF/src/build-dist.xml
    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=169659&r1=169658&r2=169659&view=diff
==============================================================================
--- incubator/beehive/trunk/distribution.xml (original)
+++ incubator/beehive/trunk/distribution.xml Wed May 11 10:12:57 2005
@@ -399,7 +399,7 @@
      	-->
         
         <!-- copy README.txt -->      	    
-        <copy todir="${dist.dir}/samples" failOnError="true">
+        <copy tofile="${dist.dir}/samples/README.txt" failOnError="true">
             <fileset file="user/samples-README.txt"/>
         </copy>
     </target>

Modified: incubator/beehive/trunk/samples/build.xml
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/samples/build.xml?rev=169659&r1=169658&r2=169659&view=diff
==============================================================================
--- incubator/beehive/trunk/samples/build.xml (original)
+++ incubator/beehive/trunk/samples/build.xml Wed May 11 10:12:57 2005
@@ -24,23 +24,26 @@
 
     <target name="clean" description="Clean the Beehive samples">
         <ant dir="petstoreWeb" target="scrub" inheritAll="false"/>
-        <ant dir="netui-samples/WEB-INF/src" target="clean" inheritAll="false"/>
+
+        <ant dir="netui-samples" antfile="WEB-INF/src/build-dist.xml" target="clean" inheritAll="false"/>
+
         <ant dir="controls-blank" target="clean" inheritAll="false"/>
         <ant dir="wsm-addressbook-enhanced/WEB-INF" antfile="build-svn.xml" target="clean" inheritAll="false"/>
         <ant dir="wsm-addressbook/WEB-INF" target="clean" inheritAll="false"/>
         <ant dir="wsm-blank/WEB-INF" target="clean" inheritAll="false"/>
         <ant dir="wsm-employee/WEB-INF" target="clean" inheritAll="false"/>
         <ant dir="wsm-samples/WEB-INF" target="clean" inheritAll="false"/>
-
+        <ant dir="controls-spring/integration" antfile="build.xml" target="clean" inheritAll="false"/>
+        <ant dir="controls-spring/web/" antfile="WEB-INF/src/build-svn.xml" target="clean" inheritAll="false"/>
         <!-- <ant dir="wsm-petstore-dashboard/WEB-INF" target="clean" inheritAll="false"/> -->
-        <!-- <ant dir="controls-spring/WEB-INF/src" target="clean" inheritAll="false"/> -->
     </target>
 
     <target name="build" description="Build the Beehive samples">
         <ant dir="petstoreWeb" target="deploy-beehive" inheritAll="false"/>
         <ant dir="petstoreWeb" target="build" inheritAll="false"/>
 
-        <ant dir="netui-samples/WEB-INF/src" target="build" inheritAll="false"/>
+        <ant dir="netui-samples" antfile="WEB-INF/src/build-dist.xml" target="build" inheritAll="false"/>
+
         <ant dir="controls-blank" target="build" inheritAll="false"/>
         <ant dir="wsm-addressbook-enhanced/WEB-INF" antfile="build-svn.xml" target="build" inheritAll="false"/>
         <ant dir="wsm-addressbook/WEB-INF" antfile="build-svn.xml" target="build" inheritAll="false"/>
@@ -48,9 +51,9 @@
 
         <ant dir="wsm-samples/WEB-INF" antfile="build-svn.xml" target="build" inheritAll="false"/>
 
+        <ant dir="controls-spring/integration" antfile="build.xml" target="build" inheritAll="false"/>
+        <ant dir="controls-spring/web/" antfile="WEB-INF/src/build-svn.xml" target="build" inheritAll="false"/>
         <!-- <ant dir="wsm-employee/WEB-INF" antfile="build-svn.xml" target="build" inheritAll="false"/> -->
-        <!-- <ant dir="wsm-petstore-dashboard/WEB-INF" target="build" inheritAll="false"/> -->
-        <!-- <ant dir="controls-spring/WEB-INF/src" target="build" inheritAll="false"/> -->
     </target>
 
 </project>

Added: incubator/beehive/trunk/samples/controls-spring/web/WEB-INF/src/build-svn.xml
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/samples/controls-spring/web/WEB-INF/src/build-svn.xml?rev=169659&view=auto
==============================================================================
--- incubator/beehive/trunk/samples/controls-spring/web/WEB-INF/src/build-svn.xml (added)
+++ incubator/beehive/trunk/samples/controls-spring/web/WEB-INF/src/build-svn.xml Wed May 11 10:12:57 2005
@@ -0,0 +1,53 @@
+<?xml version="1.0" ?>
+
+<!--
+   Copyright 2004 The Apache Software Foundation 
+ 
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+  
+      http://www.apache.org/licenses/LICENSE-2.0
+  
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
+ 
+   $Header:$
+ -->
+
+<project name="Beehive Spring-Controls webapp sample" default="build" basedir="../..">
+
+  <import file="../../../../../beehive-imports.xml" />
+
+  <property name="context.path" value="springControls"/>
+  
+  <!-- ========================================= -->
+  <!-- build - build the webapp                  -->
+  <!-- ========================================= -->
+
+  <target name="build" description="Build the webapp">
+    <deploy-controls webappDir="${basedir}"/>
+    <copy todir="${basedir}/WEB-INF/lib/" overwrite="true">
+        <fileset dir="${basedir}/../integration/build/lib" includes="**" />
+        <fileset dir="${basedir}/../external" includes="**" />
+    </copy>
+    <build-webapp webappDir="${basedir}"/>
+  </target>
+  
+  <!-- ========================================= -->
+  <!-- clean - clean the webapp                  -->
+  <!-- ========================================= -->
+  <target name="clean" description="Clean the webapp">
+    <clean-webapp webappDir="${basedir}"/>
+    <delete>
+        <fileset dir="${basedir}/WEB-INF">
+            <include name="lib/**"/>
+            <include name="classes/**"/>
+        </fileset>
+    </delete>
+  </target>
+  
+</project>

Propchange: incubator/beehive/trunk/samples/controls-spring/web/WEB-INF/src/build-svn.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: incubator/beehive/trunk/samples/netui-samples/WEB-INF/src/build-dist.xml
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/samples/netui-samples/WEB-INF/src/build-dist.xml?rev=169659&r1=169658&r2=169659&view=diff
==============================================================================
--- incubator/beehive/trunk/samples/netui-samples/WEB-INF/src/build-dist.xml (original)
+++ incubator/beehive/trunk/samples/netui-samples/WEB-INF/src/build-dist.xml Wed May 11 10:12:57 2005
@@ -20,12 +20,10 @@
 <!--
   An Ant build file for compiling the petstoreWeb Beehive sample web application.
 -->
-<project name="Beehive/Samples/PetstoreWeb" default="usage" basedir="../..">
+<project name="Beehive/Samples/NetUI-Samples" default="usage" basedir="../..">
 
     <property environment="os"/>
-    <property file="${basedir}/WEB-INF/src/build.properties"/>
-
-    <import file="${beehive.home}/beehive-imports.xml"/>
+    <import file="../../../../beehive-imports.xml"/>
     <import file="${beehive.home}/ant/beehive-tools.xml"/>
 
     <property name="webapp.dir" location="${basedir}"/>
@@ -35,8 +33,7 @@
 
     <!-- Define the classpath used to build the webapp -->
     <path id="webapp.build.classpath">
-        <pathelement location="${servlet-api.jar}"/>
-        <pathelement location="${jsp-api.jar}"/>
+        <path refid="servlet.dependency.path"/>
         <pathelement location="${webapp.dir}/WEB-INF/classes"/>
         <fileset dir="${webapp.dir}/WEB-INF/lib">
             <include name="*.jar"/>
@@ -85,10 +82,11 @@
         </copy>
     </target>
 
-    <target name="clean" description="Clean the petstoreWeb">
-        <delete dir="${webapp.dir}/WEB-INF/classes" includeEmptyDirs="true"/>
-        <delete dir="${webapp.dir}/WEB-INF/${tmp.sourcegen.dir}" includeEmptyDirs="true"/>
-        <delete dir="${webapp.dir}/WEB-INF/${tmp.jpfgen.dir}" includeEmptyDirs="true"/>
+    <target name="clean" description="Clean the netui-samples webapp">
+        <clean-webapp webappDir="${webapp.dir}"/>
+        <delete>
+            <fileset dir="${webapp.dir}/WEB-INF/lib" includes="*.jar"/>
+        </delete>
     </target>
 
     <target name="war" description="Build a compressed WAR file that can be deployed to an application container">
@@ -105,13 +103,12 @@
 
     <target name="usage" description="Print usage information for this build file">
         <echo>
-Welcome to the Beehive petstoreWeb sample webapp!  
+Welcome to the Beehive netui-samples webapp!  
 
 To run the webapp, two steps need to occur:
-- copy the Beehive runtime to the webapp
-- build the webapp
-
-Once the webapp is built, it's ready to deploy onto your application container.
+ant deploy-beehive -- this deploys the Beehive webapp runtime
+ant build          -- this builds the netui-samples webapp
+ant war            -- creates a .war archive to deploy
         </echo>
 
         <java fork="no" classname="org.apache.tools.ant.Main">

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=169659&r1=169658&r2=169659&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 11 10:12:57 2005
@@ -1,62 +1,120 @@
-<?xml version="1.0" ?>
-
+<?xml version="1.0"?>
 <!--
-   Copyright 2004 The Apache Software Foundation 
- 
+   Copyright 2004 The Apache Software Foundation.
+
    Licensed under the Apache License, Version 2.0 (the "License");
    you may not use this file except in compliance with the License.
    You may obtain a copy of the License at
-  
-      http://www.apache.org/licenses/LICENSE-2.0
-  
+   
+       http://www.apache.org/licenses/LICENSE-2.0
+   
    Unless required by applicable law or agreed to in writing, software
    distributed under the License is distributed on an "AS IS" BASIS,
    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    See the License for the specific language governing permissions and
    limitations under the License.
- 
+  
    $Header:$
  -->
 
-<project name="Beehive/Samples/NetUI-Samples" default="build" basedir="../..">
-
-  <import file="../../../../beehive-imports.xml" />
-
-  <property name="context.path" value="petstoreWeb"/>
-
-  <!-- =========================================== -->
-  <!-- deploy targets - move the app to the server -->
-  <!-- =========================================== -->
-  
-  <target name="deploy" description="Deploy the webapp to a running server">
-    <deploy-webapp webappDir="${basedir}" contextPath="${context.path}"/>
-  </target>
-
-  <target name="undeploy" description="Undeploy the webapp from a running server">
-    <undeploy-webapp contextPath="${context.path}"/>
-  </target>
-
-  <target name="redeploy" description="Redeploy the webapp on a running server">
-    <redeploy-webapp contextPath="${context.path}"/>
-  </target>
-  
-  <!-- ========================================= -->
-  <!-- build - build the webapp                  -->
-  <!-- ========================================= -->
-
-  <target name="build" description="Build the webapp">
-    <deploy-netui webappDir="${basedir}"/>
-    <deploy-wsm webappDir="${basedir}"/>
-    <build-webapp webappDir="${basedir}"/>
-  </target>
+<!--
+  An Ant build file for compiling the petstoreWeb Beehive sample web application.
+-->
+<project name="Beehive/Samples/NetUI-Samples" default="usage" basedir=".">
+
+    <property environment="os"/>
+    <property file="build.properties"/>
+    <import file="${beehive.home}/beehive-imports.xml"/>
+    <import file="${beehive.home}/ant/beehive-tools.xml"/>
+
+    <property name="webapp.dir" location="${basedir}/../.."/>
+
+    <property name="tmp.sourcegen.dir" value=".tmpbeansrc"/>
+    <property name="tmp.jpfgen.dir" value=".pageflow-struts-generated"/>
+
+    <!-- Define the classpath used to build the webapp -->
+    <path id="webapp.build.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>    
+
+    <target name="deploy-beehive" description="Copy the Beehive webapp rutime into the petstoreWeb webapp">
+        <deploy-netui webappDir="${webapp.dir}"/>
+        <deploy-wsm webappDir="${webapp.dir}"/>
+    </target>
+
+    <target name="build" depends="deploy-beehive" description="Build the petstoreWeb webapp">
+        <available property="webapp.dir.available" file="${webapp.dir}" type="dir"/>
+        <fail unless="webapp.dir.available" message="Can't find the webapp directory ${webapp.dir}"/>
+
+        <!-- 
+            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 XSDs -->
+        <build-schemas srcdir="${webapp.dir}/WEB-INF/schemas" destdir="${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}" 
+                         weboutputdir="${webapp.dir}" 
+                         classoutputdir="${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>
+    </target>
+
+    <target name="clean" description="Clean the netui-samples webapp">
+        <delete dir="${webapp.dir}/WEB-INF/classes" includeEmptyDirs="true"/>
+        <delete dir="${webapp.dir}/WEB-INF/${tmp.sourcegen.dir}" includeEmptyDirs="true"/>
+        <delete dir="${webapp.dir}/WEB-INF/${tmp.jpfgen.dir}" includeEmptyDirs="true" failOnError="false"/>
+    </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}/.."/>
+
+        <!-- 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}">
+                <exclude name="WEB-INF/web.xml"/>
+                <exclude name="WEB-INF/src/**"/>
+            </fileset>
+        </war>
+    </target>
+
+    <target name="usage" description="Print usage information for this build file">
+        <echo>
+Welcome to the Beehive netui-samples webapp!  
+
+To run the webapp, two steps need to occur:
+ant deploy-beehive -- this deploys the Beehive webapp runtime
+ant build          -- this builds the netui-samples webapp
+ant war            -- creates a .war archive to deploy
+        </echo>
+
+        <java fork="no" classname="org.apache.tools.ant.Main">
+            <arg line="-f ${ant.file} -projecthelp"/>
+        </java>
+    </target>
 
-  
-  <!-- ========================================= -->
-  <!-- clean - clean the webapp                  -->
-  <!-- ========================================= -->
-
-  <target name="clean" description="Clean the webapp">
-    <clean-webapp webappDir="${basedir}"/>
-  </target>
-  
 </project>