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/12 01:14:47 UTC

svn commit: r169717 - in /incubator/beehive/trunk: beehive-imports.xml controls/build.xml samples/controls-spring/integration/build.xml samples/controls-spring/web/WEB-INF/src/build-svn.xml samples/controls-spring/web/WEB-INF/src/build.xml user/beehive-imports.xml user/beehive-runtime.xml

Author: ekoneil
Date: Wed May 11 16:14:46 2005
New Revision: 169717

URL: http://svn.apache.org/viewcvs?rev=169717&view=rev
Log:
Distribution samples work.

- add a <deploy-controls> target to the distribution and fix both dist and SVN targets to take a "dist.dir" rather than a "webapp.dir".  The latter assumes that we're only deploying the controls JARs into the webapp.  But, this is an incorrect assumption.

- add a controls-spring build file that can work in the distribution

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



Modified:
    incubator/beehive/trunk/beehive-imports.xml
    incubator/beehive/trunk/controls/build.xml
    incubator/beehive/trunk/samples/controls-spring/integration/build.xml
    incubator/beehive/trunk/samples/controls-spring/web/WEB-INF/src/build-svn.xml
    incubator/beehive/trunk/samples/controls-spring/web/WEB-INF/src/build.xml
    incubator/beehive/trunk/user/beehive-imports.xml
    incubator/beehive/trunk/user/beehive-runtime.xml

Modified: incubator/beehive/trunk/beehive-imports.xml
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/beehive-imports.xml?rev=169717&r1=169716&r2=169717&view=diff
==============================================================================
--- incubator/beehive/trunk/beehive-imports.xml (original)
+++ incubator/beehive/trunk/beehive-imports.xml Wed May 11 16:14:46 2005
@@ -1,4 +1,5 @@
 <?xml version="1.0"?>
+
 <!--
    Copyright 2004 The Apache Software Foundation.
 
@@ -230,11 +231,11 @@
     </macrodef>
 
     <macrodef name="deploy-controls">
-        <attribute name="webappDir"/>
+        <attribute name="destDir"/>
         <sequential>
-            <echo>Deploy Controls to webapp @{webappDir}</echo>
+            <echo>Deploy Controls to directory @{destDir}</echo>
             <ant antfile="${beehive.home}/ant/beehive-runtime.xml" target="deploy.controls.webapp.runtime" inheritAll="false">
-                <property name="webapp.dir" location="@{webappDir}"/>
+                <property name="dest.dir" location="@{destDir}"/>
             </ant>
         </sequential>
     </macrodef>

Modified: incubator/beehive/trunk/controls/build.xml
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/controls/build.xml?rev=169717&r1=169716&r2=169717&view=diff
==============================================================================
--- incubator/beehive/trunk/controls/build.xml (original)
+++ incubator/beehive/trunk/controls/build.xml Wed May 11 16:14:46 2005
@@ -211,15 +211,15 @@
     <!-- ==================================================================== -->
     <!-- deploy.controls.runtime -->
     <!-- ==================================================================== -->
-    <target
-            name="deploy.controls.runtime"
+    <target name="deploy.controls.runtime"
             depends="build_all"
-            description="Deploy the controls runtime to a fully-qualified webapp directory specified with the property 'webapp.dir'">
-        <available property="webapp.dir.available" file="${webapp.dir}" type="dir"/>
-        <fail unless="webapp.dir.available" message="Can't find the webapp directory ${webapp.dir}"/>
-        <echo message="Deploy Controls to webapp rooted at: ${webapp.dir}" />
-        <!-- copy the required libraries -->
-        <copy todir="${webapp.dir}/WEB-INF/lib/" failOnError="true">
+            description="Deploy the controls runtime to a fully-qualified webapp directory specified with the property 'dest.dir'">
+        <available property="dir.available" file="${dest.dir}" type="dir"/>
+        <fail unless="dir.available" message="Can't find the destination directory ${dest.dir}"/>
+
+        <echo message="Deploy Controls JARs to ${dest.dir}"/>
+
+        <copy todir="${dest.dir}" failOnError="true">
             <fileset refid="controls.fileset"/>
             <fileset refid="commons-discovery.fileset"/>
         </copy>

Modified: incubator/beehive/trunk/samples/controls-spring/integration/build.xml
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/samples/controls-spring/integration/build.xml?rev=169717&r1=169716&r2=169717&view=diff
==============================================================================
--- incubator/beehive/trunk/samples/controls-spring/integration/build.xml (original)
+++ incubator/beehive/trunk/samples/controls-spring/integration/build.xml Wed May 11 16:14:46 2005
@@ -3,11 +3,10 @@
 <project name="spring-integration" default="usage">
 
     <property environment="os"/>
-    <property name="beehive.src" value="../../.." />
+    <property file="build.properties"/>
 
+    <property name="beehive.src" value="../../.." />
     <import file="${beehive.src}/beehive-imports.xml" />
-    <property name="servlet.runtime" value="tomcat"/>
-    <import file="${beehive.src}/ant/${servlet.runtime}-imports.xml"/>
 
     <property name="source.dir" value="${basedir}/src"/>
     <property name="build.dir" value="${basedir}/build"/>
@@ -23,15 +22,11 @@
         <pathelement location="${basedir}/../external/spring-1.1.5.jar"/>
     </path>
 
-    <!--path id="controls.dependency.path">
-        <pathelement location="${os.BEEHIVE_HOME}/lib/controls/beehive-controls.jar"/>
-    </path!-->
-
     <path id="build.classpath">
+        <pathelement location="${servlet-api.jar}"/>
         <path refid="tools.dependency.path"/>
         <path refid="controls.dependency.path"/>
         <path refid="spring.dependency.path"/>
-        <path refid="appserver.build.classpath"/>
         <pathelement path="${build.classes}"/>
     </path>
 

Modified: 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=169717&r1=169716&r2=169717&view=diff
==============================================================================
--- incubator/beehive/trunk/samples/controls-spring/web/WEB-INF/src/build-svn.xml (original)
+++ incubator/beehive/trunk/samples/controls-spring/web/WEB-INF/src/build-svn.xml Wed May 11 16:14:46 2005
@@ -24,12 +24,29 @@
 
   <property name="context.path" value="springControls"/>
   
+  <!-- =========================================== -->
+  <!-- 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-controls webappDir="${basedir}"/>
+    <deploy-controls destDir="${basedir}"/>
+
     <copy todir="${basedir}/WEB-INF/lib/" overwrite="true">
         <fileset dir="${basedir}/../integration/build/lib" includes="**" />
         <fileset dir="${basedir}/../external" includes="**" />

Modified: incubator/beehive/trunk/samples/controls-spring/web/WEB-INF/src/build.xml
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/samples/controls-spring/web/WEB-INF/src/build.xml?rev=169717&r1=169716&r2=169717&view=diff
==============================================================================
--- incubator/beehive/trunk/samples/controls-spring/web/WEB-INF/src/build.xml (original)
+++ incubator/beehive/trunk/samples/controls-spring/web/WEB-INF/src/build.xml Wed May 11 16:14:46 2005
@@ -21,45 +21,57 @@
 <project name="Beehive Spring-Controls webapp sample" default="build" basedir="../..">
 
   <import file="../../../../../beehive-imports.xml" />
+  <import file="../../../../../ant/beehive-tools.xml" />
 
   <property name="context.path" value="springControls"/>
 
-  <!-- =========================================== -->
-  <!-- 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>
+  <property name="webapp.dir" location="${basedir}"/>
   
   <!-- ========================================= -->
   <!-- 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="**" />
+    <mkdir dir="${webapp.dir}/WEB-INF/lib"/>
+
+    <property name="webinf.lib" location="${webapp.dir}/WEB-INF/lib"/>
+    <deploy-controls destDir="${webinf.lib}"/>
+
+    <copy todir="${webapp.dir}/WEB-INF/lib" overwrite="true">
+        <fileset dir="${webapp.dir}/../integration/build/lib" includes="**" />
+        <fileset dir="${webapp.dir}/../external" includes="**" />
     </copy>
-    <build-webapp webappDir="${basedir}"/>
+    
+    <path id="webapp.classpath">
+        <fileset dir="${webapp.dir}/WEB-INF/lib"/>
+    </path>
+
+    <build-controls srcdir="${webapp.dir}/WEB-INF/src"
+                    destdir="${webapp.dir}/WEB-INF/classes"
+                    tempdir="${webapp.dir}/WEB-INF/.tmpbeansrc"
+                    classpathRef="webapp.classpath"/>
   </target>
   
   <!-- ========================================= -->
   <!-- clean - clean the webapp                  -->
   <!-- ========================================= -->
-
   <target name="clean" description="Clean the webapp">
-    <clean-webapp webappDir="${basedir}"/>
-    <delete dir="WEB-INF" includes="lib/**,classes/**" />
+    <delete>
+        <fileset dir="${webapp.dir}">
+            <include name="WEB-INF/lib/*.jar"/>
+            <include name="WEB-INF/classes"/>
+            <include name="WEB-INF/.tmpbeansrc"/>
+        </fileset>
+    </delete>
   </target>
+
+    <target name="war" description="Build a compressed WAR file that can be deployed to an application container">
+        <property name="archive.dir" location="${basedir}/.."/>
+
+        <war destfile="${archive.dir}/${context.path}.war" webxml="${webapp.dir}/WEB-INF/web.xml">
+            <fileset dir="${webapp.dir}">
+                <exclude name="WEB-INF/web.xml"/>
+            </fileset>
+        </war>
+    </target>
   
 </project>

Modified: incubator/beehive/trunk/user/beehive-imports.xml
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/user/beehive-imports.xml?rev=169717&r1=169716&r2=169717&view=diff
==============================================================================
--- incubator/beehive/trunk/user/beehive-imports.xml (original)
+++ incubator/beehive/trunk/user/beehive-imports.xml Wed May 11 16:14:46 2005
@@ -64,6 +64,16 @@
         </sequential>
     </macrodef>
 
+    <macrodef name="deploy-controls">
+        <attribute name="destDir"/>
+        <sequential>
+            <echo>Deploy Controls runtime to destination directory @{destDir}</echo>
+            <ant antfile="${this.dir}/ant/beehive-runtime.xml" target="deploy.beehive.controls.runtime" inheritAll="false">
+                <property name="dest.dir" location="@{destDir}"/>
+            </ant>
+        </sequential>
+    </macrodef>
+
     <target name="usage" description="Print the usage for this build.xml">
         <java fork="no" classname="org.apache.tools.ant.Main">
             <arg line="-f ${ant.file} -projecthelp"/>

Modified: incubator/beehive/trunk/user/beehive-runtime.xml
URL: http://svn.apache.org/viewcvs/incubator/beehive/trunk/user/beehive-runtime.xml?rev=169717&r1=169716&r2=169717&view=diff
==============================================================================
--- incubator/beehive/trunk/user/beehive-runtime.xml (original)
+++ incubator/beehive/trunk/user/beehive-runtime.xml Wed May 11 16:14:46 2005
@@ -1,4 +1,5 @@
 <?xml version="1.0"?>
+
 <!--
    Copyright 2004 The Apache Software Foundation.
 
@@ -16,8 +17,7 @@
   
    $Header:$
  -->
-
-<project name="Beehive/Webapp Deploy" default="usage" basedir=".">
+<project name="Beehive/RuntimeDeploy" default="usage" basedir=".">
 
     <target name="deploy.beehive.webapp.runtime" description="Deploy the Beehive webapp runtime given a webapp root as -Dwebapp.dir">
         <available property="webapp.dir.available" file="${webapp.dir}" type="dir"/>
@@ -63,6 +63,22 @@
             </fileset>
             <fileset dir="../lib/wsm/">
                 <include name="*.jar"/>
+            </fileset>
+        </copy>
+    </target>
+
+    <target name="deploy.beehive.controls.runtime" description="Deploy the Beehive Controls runtime given a destination directory as -Ddest.dir">
+        <available property="dest.dir.available" file="${dest.dir}" type="dir"/>
+        <fail unless="dest.dir.available" message="Can't find the JAR destination directory ${dest.dir}"/>
+
+        <echo>Deploy Controls runtime to destination directory ${dest.dir}</echo>
+
+        <copy todir="${dest.dir}">
+            <fileset dir="../lib/common">
+                <include name="commons-discovery-0.2.jar"/>
+            </fileset>
+            <fileset dir="../lib/controls">
+                <include name="beehive-controls.jar"/>
             </fileset>
         </copy>
     </target>