Author: ekoneil
Date: Mon Feb 21 20:56:04 2005
New Revision: 154789

URL: http://svn.apache.org/viewcvs?view=rev&rev=154789
Log:
Add a "war" target to the build-dist.xml file in the distribution.  This makes 
it easier to produce an app that can be dropped into an application container.

BB: self
Test: in petstoreWeb: "ant deploy-beehive build war" and drop petstoreWeb.war 
onto Tomcat


Modified:
    incubator/beehive/trunk/distribution.xml
    incubator/beehive/trunk/samples/petstoreWeb/WEB-INF/src/build-dist.xml

Modified: incubator/beehive/trunk/distribution.xml
URL: 
http://svn.apache.org/viewcvs/incubator/beehive/trunk/distribution.xml?view=diff&r1=154788&r2=154789
==============================================================================
--- incubator/beehive/trunk/distribution.xml (original)
+++ incubator/beehive/trunk/distribution.xml Mon Feb 21 20:56:04 2005
@@ -109,12 +109,11 @@
        <ant dir="controlhaus/webservice/trunk" target="jar" inheritAll="false">
            <property name="beehive.home" value="${dist.dir}"/>
        </ant>
-         
 
        <copy 
file="controlhaus/webservice/trunk/servicecontrol/build/jars/webservice-control.jar"
            todir="${dist.dir}/lib/controls"/>        
  
-     </target>
+    </target>
 
     <!-- EJB Control svn targets -->
     <target name="ejb.svn.update" if="ejb.control.exists">

Modified: incubator/beehive/trunk/samples/petstoreWeb/WEB-INF/src/build-dist.xml
URL: 
http://svn.apache.org/viewcvs/incubator/beehive/trunk/samples/petstoreWeb/WEB-INF/src/build-dist.xml?view=diff&r1=154788&r2=154789
==============================================================================
--- incubator/beehive/trunk/samples/petstoreWeb/WEB-INF/src/build-dist.xml 
(original)
+++ incubator/beehive/trunk/samples/petstoreWeb/WEB-INF/src/build-dist.xml Mon 
Feb 21 20:56:04 2005
@@ -18,12 +18,15 @@
  -->
 
 <!--
-    A build file that needs to be imported by all sub-projects.             
+  An Ant build file for compiling the petstoreWeb Beehive sample web 
application.
 -->
-<project name="Beehive/Samples/PetstoreWeb" default="build" basedir="../..">
+<project name="Beehive/Samples/PetstoreWeb" default="usage" basedir="../..">
 
     <import file="../../../../beehive-imports.xml"/>
 
+    <property name="contextPath" value="petstoreWeb"/>
+    <property name="archive.dir" value="${basedir}/.."/>
+
     <target name="build" description="Build the petstoreWeb webapp">
         <build-webapp webappDir="${basedir}"/>
     </target>
@@ -32,12 +35,19 @@
         <clean-webapp webappDir="${basedir}"/>
     </target>
 
+    <target name="war" description="Build a compressed WAR file that can be 
deployed to an application container">
+        <!-- note, this does *not* exclude source from the archive -->
+        <war destfile="${archive.dir}/${contextPath}.war" 
webxml="${basedir}/WEB-INF/web.xml">
+            <fileset dir="${basedir}"/>
+        </war>
+    </target>
+
     <target name="deploy-beehive" description="Copy the Beehive webapp rutime 
into the petstoreWeb webapp">
         <deploy-netui webappDir="${basedir}"/>
         <deploy-wsm webappDir="${basedir}"/>
     </target>
 
-    <target name="usage">
+    <target name="usage" description="Print usage information for this build 
file">
         <echo>
 Welcome to the Beehive petstoreWeb sample webapp!  
 
@@ -46,7 +56,7 @@
 - build the webapp
 
 Once the webapp is built, it's ready to deploy onto your application container.
-        <echo>
+        </echo>
 
         <target name="usage" description="Print the usage for this build.xml">
             <java fork="no" classname="org.apache.tools.ant.Main">


Reply via email to