You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@labs.apache.org by th...@apache.org on 2008/10/07 00:59:49 UTC

svn commit: r702300 - in /labs/droids/branch/LABS-144: build.xml targets/common-testing.xml targets/common.xml targets/ivy-build.xml targets/properties.xml tools/ivy/ivy-build.xml

Author: thorsten
Date: Mon Oct  6 15:59:48 2008
New Revision: 702300

URL: http://svn.apache.org/viewvc?rev=702300&view=rev
Log:
LABS-189 
splitting build.xml apart to different smaller files

Added:
    labs/droids/branch/LABS-144/targets/common.xml   (with props)
    labs/droids/branch/LABS-144/targets/ivy-build.xml
      - copied unchanged from r701889, labs/droids/branch/LABS-144/tools/ivy/ivy-build.xml
    labs/droids/branch/LABS-144/targets/properties.xml   (with props)
Removed:
    labs/droids/branch/LABS-144/tools/ivy/ivy-build.xml
Modified:
    labs/droids/branch/LABS-144/build.xml
    labs/droids/branch/LABS-144/targets/common-testing.xml

Modified: labs/droids/branch/LABS-144/build.xml
URL: http://svn.apache.org/viewvc/labs/droids/branch/LABS-144/build.xml?rev=702300&r1=702299&r2=702300&view=diff
==============================================================================
--- labs/droids/branch/LABS-144/build.xml (original)
+++ labs/droids/branch/LABS-144/build.xml Mon Oct  6 15:59:48 2008
@@ -15,23 +15,17 @@
  See the License for the specific language governing permissions and
  limitations under the License.
 -->
-<project name="Droids" default="droids.compile">
-  <property environment="env"/>
-  <property name="droids.home" location="${env.DROIDS_HOME}"/>
-  <!-- Load all the default properties, and any the user wants    -->
-  <!-- to contribute (without having to type -D or edit this file -->
-  <property file="${droids.home}/build.properties" />
-  <property file="${droids.home}/default.properties" />
- 
+<project xmlns:ivy="antlib:org.apache.ivy.ant" name="Droids" default="droids.compile">
+  <!-- common build -->
+  <import file="targets/common.xml"/>
+  <!-- Plugin support -->
+  <import file="targets/components.xml"/>
   <!-- Ivy dependency manager -->
-  <import file="${ivy.repository.dir}/ivy-build.xml"/>
-  
+  <import file="targets/ivy-build.xml"/>
   <!-- Junit testing -->
   <import file="targets/common-testing.xml"/>
-  
-  <!-- Plugin support -->
-  <import file="targets/components.xml"/>
-  
+  <!-- properties build -->
+  <import file="targets/properties.xml"/>
   <!-- the normal classpath -->
   <path id="droids.classpath">
     <pathelement location="${build.classes}"/>
@@ -44,15 +38,7 @@
     </fileset>
   </path>
 
-  <!-- the unit test classpath -->
   <dirname property="plugins.classpath.dir" file="${build.plugins}"/>
-  <path id="droids.test.classpath">
-    <pathelement location="${test.build.classes}" />
-    <pathelement location="${conf.dir}"/>
-    <pathelement location="${test.src.dir.core}"/>
-    <pathelement location="${plugins.classpath.dir}"/>
-    <path refid="droids.classpath"/>
-  </path>
   
   
   <!-- ====================================================== -->
@@ -64,51 +50,10 @@
     <mkdir dir="${build.classesExample}"/>
     <mkdir dir="${droids.handler.save.dir}"/>
   </target>
-<!-- will generate the properties file which we need to substitute all of our 
-    variables (@var@) -->
-  <target name="droids.properties">
-    <!-- If possible, include the svnversion -->
-     <exec dir="." executable="${svnversion.exe}" outputproperty="build.current.revision"
-       failifexecutionfails="false">
-      <arg line="${droids.home}"/>
-       <redirector>
-           <outputfilterchain>
-             <tokenfilter>
-                 <replaceregex pattern="^([0-9]*):.*" replace="\1" flags="g"/>
-             </tokenfilter>
-          </outputfilterchain>
-        </redirector>
-     </exec>
-    <echoproperties destfile="${build.dir}/droids.properties"/>
-  </target>
+  
   <!-- ====================================================== -->
   <!-- Compile the Java files                                 -->
   <!-- ====================================================== -->
-  
-  <!-- Macro for compilation -->
-  <macrodef name="droids-javac">
-    <attribute name="srcdir" />
-    <attribute name="destdir" />
-    <attribute name="classpathref" />
-    <element name="nested" optional="true" implicit="true" />
-    <sequential>
-      <mkdir dir="@{destdir}" />
-      <javac 
-     encoding="${build.encoding}" 
-     srcdir="@{srcdir}"
-     includes="org/apache/**/*.java"
-     destdir="@{destdir}"
-     debug="${javac.debug}"
-     optimize="${javac.optimize}"
-     target="${javac.version}"
-     source="${javac.version}"
-     deprecation="${javac.deprecation}">
-      <classpath refid="@{classpathref}"/>
-    </javac>
-    </sequential>
-  </macrodef>
-
-  
   <target name="droids.compile" 
     depends="droids.compile-core,droids.compile-dynamics,droids.compile-plugins,droids.compile-robots,droids.compile-example" 
     description="-> Will compile/deploy the droids core"/>
@@ -158,80 +103,6 @@
   <!-- ====================================================== -->
   <!-- Jar the Java files                                 -->
   <!-- ====================================================== -->
-  <!-- Creates a Manifest file for Jars -->
-  <macrodef name="make-manifest">
-    <attribute name="class-dir" default="${build.classes}" />
-    <element name="nested" optional="true" implicit="true" />
-    <sequential>
-     <mkdir dir="@{class-dir}/META-INF/" />
-     <manifest mode="replace" file="@{class-dir}/META-INF/MANIFEST.MF">
-        <!--
-        http://java.sun.com/j2se/1.5.0/docs/guide/jar/jar.html#JAR%20Manifest
-        http://java.sun.com/j2se/1.5.0/docs/guide/versioning/spec/versioning2.html
-        http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Package.html
-        http://java.sun.com/j2se/1.5.0/docs/api/java/util/jar/package-summary.html
-        http://java.sun.com/developer/Books/javaprogramming/JAR/basics/manifest.html
-        -->
-        <!-- Don't set 'Manifest-Version' it identifies the version of the
-             manifest file format, and should always be 1.0 (the default)
-
-             Don't set 'Created-by' attribute, its purpose is 
-             to identify the version of java used to build the jar,
-             which ant will do by default.
-
-             Ant will happily override these with bogus strings if you
-             tell it to, so don't.
-
-             NOTE: we don't use section info because all of our manifest data
-             applies to the entire jar/war ... no package specific info.
-        -->
-       <attribute name="Comment" 
-                   value="Support classes for Apache Droids"/>
-        <attribute name="Extension-Name" 
-                   value="org.apache.droids"/>
-        <attribute name="Specification-Title" 
-                   value="Apache Droids Robot Framework"/>
-        <!-- spec version must match "digit+{.digit+}*" -->
-        <!--<attribute name="Specification-Version" 
-                   value="${specversion}"/>-->
-        <attribute name="Specification-Vendor" 
-                   value="The Apache Software Foundation"/>
-        <attribute name="Implementation-Title" 
-                   value="org.apache.droids"/>
-        <!-- impl version can be any string -->
-        <attribute name="Implementation-Version" 
-                   value="${final.name}"/>
-        <attribute name="Implementation-Vendor" 
-                   value="The Apache Software Foundation"/>
-
-        <attribute name="X-Compile-Source-JDK" 
-                   value="${javac.version}"/>
-        <attribute name="X-Compile-Target-JDK" 
-                   value="${javac.version}"/>
-     </manifest>
-    </sequential>
-  </macrodef>
-  <!-- Macro for building Jars -->
-  <macrodef name="droids-jar">
-    <attribute name="destfile" />
-    <attribute name="srcdir" default="${build.classes}" />
-    <attribute name="includes" default="org/apache/**" />
-    <attribute name="excludes" default="" />
-    <attribute name="manifest" default="@{srcdir}/META-INF/MANIFEST.MF" />
-    <element name="nested" optional="true" implicit="true" />
-    <sequential>
-      <make-manifest class-dir="@{srcdir}"/>
-      <jar destfile="@{destfile}"
-           basedir="@{srcdir}"
-           includes="@{includes}"
-           excludes="@{excludes}"
-           filesetmanifest="skip"
-           manifest="@{manifest}">
-        <metainf dir="${droids.home}" includes="LICENSE.txt"/>
-        <nested />
-      </jar>
-    </sequential>
-  </macrodef>
   <!-- Creates the droids jars. -->
   <target name="droids.jar" depends="droids.core.jar,droids.dynamics.jar,droids.plugins.jar,droids.robots.jar,droids.example.jar" description="-> Make droids.jar">
     <copy todir="${lib.dir}">
@@ -255,33 +126,7 @@
   </target>
   <target name="droids.javadoc" depends="droids.compile-core"
     description="-> Documentation javadocs">
-    <mkdir dir="${build.javadoc}"/>
-    <javadoc destdir="${build.javadoc}"
-      author="true" version="true" use="true" windowtitle="${Name} ${version} API"
-      doctitle="${Name} ${version} API"
-      bottom="Copyright &amp;copy; ${year} The Apache Software Foundation">
-      <arg value="${javadoc.proxy.host}"/>
-      <arg value="${javadoc.proxy.port}"/>
-      
-      <packageset dir="${src.dir.core}"/>
-      <link href="${javadoc.link.java}"/>
-      
-      <classpath refid="droids.classpath"/>
-      <group title="Core" packages="org.apache.droids.*"/>
-      <doclet pathref="droids.classpath" name="org.umlgraph.doclet.UmlGraphDoc">
-                              <param name="-inferrel"/>
-                              <param name="-inferdep"/>
-                              <param name="-hide" value="java.*"/>
-                              <param name="-collpackages" value="java.util.*"/>
-                              <param name="-qualify"/>
-                              <param name="-postfixpackage"/>
-                              <param name="-nodefontsize" value="9"/>
-                              <param name="-nodefontpackagesize" value="7"/>
-                              <param name="-link" value="http://java.sun.com/j2se/1.5.0/docs/guide/javadoc/doclet/spec"/>
-                              <param name="-link" value="http://java.sun.com/j2se/1.5/docs/api"/>
-                      </doclet>
-
-    </javadoc>
+    <droids-jdoc/>
   </target>
   
   <!-- Retro to 1.4 - if you want to use droids in your 1.4 based project

Modified: labs/droids/branch/LABS-144/targets/common-testing.xml
URL: http://svn.apache.org/viewvc/labs/droids/branch/LABS-144/targets/common-testing.xml?rev=702300&r1=702299&r2=702300&view=diff
==============================================================================
--- labs/droids/branch/LABS-144/targets/common-testing.xml (original)
+++ labs/droids/branch/LABS-144/targets/common-testing.xml Mon Oct  6 15:59:48 2008
@@ -18,6 +18,15 @@
       </javac>
     </sequential>
   </macrodef>
+  <!-- the unit test classpath -->
+  
+  <path id="droids.test.classpath">
+    <pathelement location="${test.build.classes}" />
+    <pathelement location="${conf.dir}"/>
+    <pathelement location="${test.src.dir.core}"/>
+    <pathelement location="${plugins.classpath.dir}"/>
+    <path refid="droids.classpath"/>
+  </path>
   <property name="junit.output.dir" location="${test.build.dir}"/>
   <property name="junit.reports" location="${junit.output.dir}/reports"/>
   <property name="junit.includes" value="**/Test*.java,**/*Test.java"/>

Added: labs/droids/branch/LABS-144/targets/common.xml
URL: http://svn.apache.org/viewvc/labs/droids/branch/LABS-144/targets/common.xml?rev=702300&view=auto
==============================================================================
--- labs/droids/branch/LABS-144/targets/common.xml (added)
+++ labs/droids/branch/LABS-144/targets/common.xml Mon Oct  6 15:59:48 2008
@@ -0,0 +1,153 @@
+<!--
+   Licensed to the Apache Software Foundation (ASF) under one
+   or more contributor license agreements.  See the NOTICE file
+   distributed with this work for additional information
+   regarding copyright ownership.  The ASF licenses this file
+   to you 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.    
+-->
+<project name="common" >
+  <property environment="env"/>
+    <property name="droids.home" location="${env.DROIDS_HOME}"/>
+    <fail>
+      You need to set DROIDS_HOME in your environment! 
+      
+      Please consult docs/install.html#env of your droids installation.
+     <condition>
+       <not>
+         <isset property="droids.home"/>
+       </not>
+     </condition>
+   </fail>
+  <!-- Load all the default properties, and any the user wants    -->
+  <!-- to contribute (without having to type -D or edit this file -->
+  <property file="${droids.home}/build.properties" />
+  <property file="${droids.home}/default.properties" />
+  <!-- Macro for compilation -->
+  <macrodef name="droids-javac">
+    <attribute name="srcdir"/>
+    <attribute name="destdir"/>
+    <attribute name="classpathref"/>
+    <element name="nested" optional="true" implicit="true"/>
+    <sequential>
+      <mkdir dir="@{destdir}"/>
+      <javac encoding="${build.encoding}" srcdir="@{srcdir}"
+        includes="org/apache/**/*.java" destdir="@{destdir}"
+        debug="${javac.debug}" optimize="${javac.optimize}"
+        target="${javac.version}" source="${javac.version}"
+        deprecation="${javac.deprecation}">
+        <classpath refid="@{classpathref}"/>
+      </javac>
+    </sequential>
+  </macrodef>
+  <!-- Creates a Manifest file for Jars -->
+  <macrodef name="make-manifest">
+    <attribute name="class-dir" default="${build.classes}"/>
+    <element name="nested" optional="true" implicit="true"/>
+    <sequential>
+      <mkdir dir="@{class-dir}/META-INF/"/>
+      <manifest mode="replace" file="@{class-dir}/META-INF/MANIFEST.MF">
+        <!--
+        http://java.sun.com/j2se/1.5.0/docs/guide/jar/jar.html#JAR%20Manifest
+        http://java.sun.com/j2se/1.5.0/docs/guide/versioning/spec/versioning2.html
+        http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Package.html
+        http://java.sun.com/j2se/1.5.0/docs/api/java/util/jar/package-summary.html
+        http://java.sun.com/developer/Books/javaprogramming/JAR/basics/manifest.html
+        -->
+        <!-- Don't set 'Manifest-Version' it identifies the version of the
+        manifest file format, and should always be 1.0 (the default)
+        
+        Don't set 'Created-by' attribute, its purpose is 
+        to identify the version of java used to build the jar,
+        which ant will do by default.
+        
+        Ant will happily override these with bogus strings if you
+        tell it to, so don't.
+        
+        NOTE: we don't use section info because all of our manifest data
+        applies to the entire jar/war ... no package specific info.
+        -->
+        <attribute name="Comment" value="Support classes for Apache Droids"/>
+        <attribute name="Extension-Name" value="org.apache.droids"/>
+        <attribute name="Specification-Title"
+          value="Apache Droids Robot Framework"/>
+        <!-- spec version must match "digit+{.digit+}*" -->
+        <!--<attribute name="Specification-Version" 
+        value="${specversion}"/>-->
+        <attribute name="Specification-Vendor"
+          value="The Apache Software Foundation"/>
+        <attribute name="Implementation-Title" value="org.apache.droids"/>
+        <!-- impl version can be any string -->
+        <attribute name="Implementation-Version" value="${final.name}"/>
+        <attribute name="Implementation-Vendor"
+          value="The Apache Software Foundation"/>
+        
+        <attribute name="X-Compile-Source-JDK" value="${javac.version}"/>
+        <attribute name="X-Compile-Target-JDK" value="${javac.version}"/>
+      </manifest>
+    </sequential>
+  </macrodef>
+  <!-- Macro for building Jars -->
+  <macrodef name="droids-jar">
+    <attribute name="destfile"/>
+    <attribute name="srcdir" default="${build.classes}"/>
+    <attribute name="includes" default="org/apache/**"/>
+    <attribute name="excludes" default=""/>
+    <attribute name="manifest" default="@{srcdir}/META-INF/MANIFEST.MF"/>
+    <element name="nested" optional="true" implicit="true"/>
+    <sequential>
+      <make-manifest class-dir="@{srcdir}"/>
+      <jar destfile="@{destfile}" basedir="@{srcdir}" includes="@{includes}"
+        excludes="@{excludes}" filesetmanifest="skip" manifest="@{manifest}">
+        <metainf dir="${droids.home}" includes="LICENSE.txt"/>
+        <nested/>
+      </jar>
+    </sequential>
+  </macrodef>
+  <!-- Macro for generating java docs -->
+  <macrodef name="droids-jdoc" >
+    <attribute name="destfile" default="${build.javadoc}"/>
+    <attribute name="srcdir" default="${src.dir.core}"/>
+    <attribute name="classpathref" default="droids.classpath"/>
+    <element name="nested" optional="true" implicit="true"/>
+    <sequential>
+      <mkdir dir="@{destfile}"/>
+      <javadoc destdir="@{destfile}" author="true" version="true" use="true"
+        windowtitle="${final.name} API" doctitle="${final.name} API"
+        bottom="Copyright &amp;copy; ${year} The Apache Software Foundation">
+        <arg value="${javadoc.proxy.host}"/>
+        <arg value="${javadoc.proxy.port}"/>
+        
+        <packageset dir="@{srcdir}"/>
+        <link href="${javadoc.link.java}"/>
+        
+        <classpath refid="@{classpathref}"/>
+        <group title="Core" packages="org.apache.droids.*"/>
+        <doclet pathref="droids.classpath" name="org.umlgraph.doclet.UmlGraphDoc">
+          <param name="-inferrel"/>
+          <param name="-inferdep"/>
+          <param name="-hide" value="java.*"/>
+          <param name="-collpackages" value="java.util.*"/>
+          <param name="-qualify"/>
+          <param name="-postfixpackage"/>
+          <param name="-nodefontsize" value="9"/>
+          <param name="-nodefontpackagesize" value="7"/>
+          <param name="-link"
+            value="http://java.sun.com/j2se/1.5.0/docs/guide/javadoc/doclet/spec"/>
+          <param name="-link" value="http://java.sun.com/j2se/1.5/docs/api"/>
+        </doclet>
+        
+      </javadoc>
+    </sequential>
+  </macrodef>
+</project>
\ No newline at end of file

Propchange: labs/droids/branch/LABS-144/targets/common.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Added: labs/droids/branch/LABS-144/targets/properties.xml
URL: http://svn.apache.org/viewvc/labs/droids/branch/LABS-144/targets/properties.xml?rev=702300&view=auto
==============================================================================
--- labs/droids/branch/LABS-144/targets/properties.xml (added)
+++ labs/droids/branch/LABS-144/targets/properties.xml Mon Oct  6 15:59:48 2008
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<!--
+ Licensed to the Apache Software Foundation (ASF) under one or more
+ contributor license agreements.  See the NOTICE file distributed with
+ this work for additional information regarding copyright ownership.
+ The ASF licenses this file to You 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.
+-->
+<project name="droids.properties" >
+  <!-- will generate the properties file which we need to substitute all of our 
+    variables (@var@) -->
+  <target name="droids.properties">
+    <!-- If possible, include the svnversion -->
+     <exec dir="." executable="${svnversion.exe}" outputproperty="build.current.revision"
+       failifexecutionfails="false">
+      <arg line="${droids.home}"/>
+       <redirector>
+           <outputfilterchain>
+             <tokenfilter>
+                 <replaceregex pattern="^([0-9]*):.*" replace="\1" flags="g"/>
+             </tokenfilter>
+          </outputfilterchain>
+        </redirector>
+     </exec>
+    <echoproperties destfile="${build.dir}/droids.properties"/>
+  </target>
+</project>
\ No newline at end of file

Propchange: labs/droids/branch/LABS-144/targets/properties.xml
------------------------------------------------------------------------------
    svn:eol-style = native



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@labs.apache.org
For additional commands, e-mail: commits-help@labs.apache.org