james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rdon...@apache.org
Subject svn commit: r516702 - in /james/server/trunk/build-tools: ./ api-build.xml base-build.xml build.xml deployment-build.xml function-build.xml library-build.xml module-build.xml
Date Sat, 10 Mar 2007 13:13:21 GMT
Author: rdonkin
Date: Sat Mar 10 05:13:19 2007
New Revision: 516702

URL: http://svn.apache.org/viewvc?view=rev&rev=516702
Log:
First cut at modular build files. Modules following conventions should be able to use minimal
build scripts importing their functions from scripts in these directories. These scripts include
targets which generate outline modules following this conventional layout. Not extensively
tested. Conventions are debatable but better to have a straw man coded.

Added:
    james/server/trunk/build-tools/
    james/server/trunk/build-tools/api-build.xml
    james/server/trunk/build-tools/base-build.xml
    james/server/trunk/build-tools/build.xml
    james/server/trunk/build-tools/deployment-build.xml
    james/server/trunk/build-tools/function-build.xml
    james/server/trunk/build-tools/library-build.xml
    james/server/trunk/build-tools/module-build.xml

Added: james/server/trunk/build-tools/api-build.xml
URL: http://svn.apache.org/viewvc/james/server/trunk/build-tools/api-build.xml?view=auto&rev=516702
==============================================================================
--- james/server/trunk/build-tools/api-build.xml (added)
+++ james/server/trunk/build-tools/api-build.xml Sat Mar 10 05:13:19 2007
@@ -0,0 +1,42 @@
+<?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='api-template'>
+     <description>
+Template build for API
+     </description>
+     
+     <import file='../build-tools/module-build.xml' optional='no'/>
+ 
+     <target 
+            name='set-classpath'
+            depends='check-environment, master-module-template.set-classpath'>
+            <path id='classpath.main'>
+                <path refid='classpath.base'/>   
+            </path>
+            <path id='classpath.test'>
+                <path refid='classpath.main'/>   
+                <path refid='classpath.base.test'/>   
+            </path>   
+            <path id='classpath.test.runtime'>
+                <path refid='classpath.test'/>   
+            </path>   
+     </target>     
+ </project>
\ No newline at end of file

Added: james/server/trunk/build-tools/base-build.xml
URL: http://svn.apache.org/viewvc/james/server/trunk/build-tools/base-build.xml?view=auto&rev=516702
==============================================================================
--- james/server/trunk/build-tools/base-build.xml (added)
+++ james/server/trunk/build-tools/base-build.xml Sat Mar 10 05:13:19 2007
@@ -0,0 +1,313 @@
+<?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='james-base' default='usage'>
+     <description>
+Defines common macros and properties used by builds.
+     </description>
+    
+    <property name='filename.property.local' value='.ant.properties'/>   
+    <property name='filename.property.defaults' value='default.properties'/>
+    <property name='file.property.defaults' value='../${filename.property.defaults}'/>
+    <property name='filename.property.includes' value='include.properties'/>
+    <property name='file.property.includes' value='../${filename.property.includes}'/>
  
+    
+    <!--
+    Give user a chance to override without editing this file
+    (and without typing -D each time he compiles it)
+    -->   
+    <property file='${filename.property.local}'/>      
+    <property file='../${filename.property.local}'/>
+    <property file='${user.home}/${filename.property.local}'/>
+    <property file='module.properties'/>   
+    <property file='${file.property.includes}'/>
+    <property file='${file.property.defaults}'/>
+    
+ <!--
+Macro Definitions
+ -->
+    <macrodef name='CheckEnvironment'>
+        <sequential>
+            <condition property='file.property.defaults.exists'>
+                <available file='${file.property.defaults}'/>   
+            </condition>   
+            <fail unless='file.property.defaults.exists'>Error: ${file.property.defaults}
missing
+JAMES stores default build property value in ${filename.property.defaults}. This file must
exist.</fail>   
+            <available property='version.ant.1_7_plus'
+                       classname='org.apache.tools.ant.types.ResourceCollection'/>   
+            <fail unless='version.ant.1_7_plus'>Error: Ant 1.7 or higher required
+JAMES requires Ant 1.7 or higher. Please install a more modern version of Ant.
+            </fail>   
+            <echo>Environment looks okay</echo>
+        </sequential>   
+    </macrodef>   
+       
+    <macrodef name="CleanBuildDirectories">
+        <sequential>
+            <echo>Cleaning build directories...</echo>   
+            <delete dir='${dir.build}'/>   
+            <delete dir='${dir.build.bin}'/>
+            <delete dir='${dir.build.test}'/>   
+        </sequential>   
+    </macrodef>   
+    
+    <macrodef name="Clean">
+        <sequential>
+            <CleanBuildDirectories/>   
+        </sequential>   
+    </macrodef>   
+    
+    <macrodef name="Compile">
+        <attribute name='src'/>
+        <attribute name='resources'/>   
+        <attribute name='bin'/>
+        <attribute name='classpath-refid'/>   
+        <attribute name='debug' default='${debug}'/>
+        <attribute name='optimize' default='${optimize}'/>
+        <attribute name='deprecation' default='${deprecation}'/>
+        <attribute name='jdk-source' default='${jdk.source}'/>
+        <attribute name='jdk-target' default='${jdk.target}'/>      
+        <sequential>
+            <echo>Compiling @{src}</echo>
+            <mkdir dir='@{bin}'/>
+            <mkdir dir='@{src}'/>
+            <mkdir dir='@{resources}'/>   
+            <javac 
+                destdir='@{bin}' 
+                debug='@{debug}' 
+                optimize='@{optimize}' 
+                deprecation='@{deprecation}' 
+                target='@{jdk-target}' 
+                source='@{jdk-source}'>
+                <classpath refid='@{classpath-refid}'/>
+                <src path='@{src}'/>
+                <exclude name='${constants.file}'/>
+            </javac>
+            <copy todir='@{bin}'>
+                <fileset dir='@{src}'>
+                    <include name='**/*.properties'/>
+                    <include name='**/*.xinfo'/>
+                    <include name='**/*.xml'/>
+                    <include name='**/*.mxinfo'/>
+                </fileset>
+                <fileset dir='@{resources}'>
+                    <include name='**/*'/>
+                </fileset>   
+            </copy>
+        </sequential>   
+    </macrodef>   
+    
+    <macrodef name="CompileMainSource">
+        <attribute name='classpath-refid' default='classpath.main'/>
+        <attribute name='debug' default='${debug}'/>
+        <attribute name='optimize' default='${optimize}'/>
+        <attribute name='deprecation' default='${deprecation}'/>
+        <attribute name='jdk-source' default='${jdk.source}'/>
+        <attribute name='jdk-target' default='${jdk.target}'/>   
+        <sequential>
+            <Compile 
+                src='${dir.src.java}'   
+                bin='${dir.build.bin}'
+                resources="${dir.src.resources}"   
+                classpath-refid="@{classpath-refid}"   
+                debug='@{debug}'   
+                optimize='@{optimize}'   
+                deprecation='@{deprecation}'   
+                jdk-source='@{jdk-source}' 
+                jdk-target='@{jdk-target}'/>   
+            <copy todir='${dir.build.bin}/META-INF'>
+                <fileset dir='${basedir}'>
+                    <include name='${filename.license}'/>   
+                    <include name='${filename.notice}'/>   
+                </fileset>
+            </copy>   
+        </sequential>   
+    </macrodef>   
+ 
+    <macrodef name="SetBaseClasspaths">
+        <sequential>
+            <path id='classpath.base'>  
+                <fileset dir="${lib.dir}">
+                    <include name="${avalon-framework.jar}"/>
+                    <include name="${avalon-framework-impl.jar}"/>
+                    <include name="${dns.jar}"/>
+                    <include name="${commons-collections.jar}"/>
+                    <include name="${commons-dbcp.jar}"/>
+                    <include name="${commons-pool.jar}"/>
+                    <include name="${jakarta-oro.jar}"/>
+                    <include name="${excalibur-pool-api.jar}"/>
+                    <include name="${excalibur-pool-impl.jar}"/>
+                    <include name="${excalibur-thread-api.jar}"/>
+                    <include name="${excalibur-datasource.jar}"/>
+                    <include name="${cornerstone-threads-api.jar}"/>
+                    <include name="${cornerstone-connection-api.jar}"/>
+                    <include name="${cornerstone-connection-impl.jar}"/>
+                    <include name="${cornerstone-store-api.jar}"/>
+                    <include name="${cornerstone-scheduler-api.jar}"/>
+                    <include name="${cornerstone-sockets-api.jar}"/>
+                    <include name="${cornerstone-datasources-api.jar}"/>
+                    <include name="${javax-mail.jar}"/>
+                    <include name="${javax-activation.jar}"/>
+                    <include name="${bcmail.jar}"/>
+                    <include name="${bcmail-workaround.jar}"/>
+                    <include name="${javax.management}"/>
+                    <include name="${jspf.jar}"/>
+                    <include name="${mstor.jar}"/>
+                    <include name="${commons-logging.jar}"/>
+                    <include name="${jdom.jar}"/>
+                    <include name="${xstream.jar}"/>
+                    <include name="${torque.jar}"/>
+                    <include name="${village.jar}"/>
+                    <include name="${commons-lang.jar}"/>
+                    <include name="${commons-configuration.jar}"/>
+                    <include name="${jsieve.jar}"/>
+                    <include name="${commons-digester.jar}"/>           
+                </fileset>   
+            </path>   
+            <path id='classpath.base.test'>  
+                <path refid='classpath.base'/>
+                <fileset dir="${lib.dir}">    
+                    <include name="${commons-net.jar}"/>
+                    <include name="${jmock.jar}"/>
+                </fileset>   
+            </path>   
+    
+            <path 
+               id='classpath.dependencies.api'
+               description="Convenient way to import all APIs">
+             <!-- TODO Add content when APIs are broken out -->   
+            </path>
+            <path 
+                id='classpath.dependencies.libraries'
+                description="Convenient way to import all libraries and APIs">
+                <!-- TODO Add content when libraries are broken out -->   
+                <path refid='classpath.dependencies.api'/>
+            </path> 
+            <path 
+                id='classpath.dependencies.functions'
+                description="Convenient way to import all functions, libraries and APIs">
+                <!-- TODO Add content when functions are broken out -->   
+                <path refid='classpath.dependencies.libraries'/>   
+            </path>   
+        </sequential>   
+    </macrodef>   
+ 
+    <macrodef name="CompileTests">
+        <attribute name='classpath-refid' default='classpath.test'/>
+        <attribute name='debug' default='${debug}'/>
+        <attribute name='optimize' default='${optimize}'/>
+        <attribute name='deprecation' default='${deprecation}'/>
+        <attribute name='jdk-source' default='${jdk.source}'/>
+        <attribute name='jdk-target' default='${jdk.target}'/>   
+        <sequential>
+            <Compile 
+                src='${dir.src.test}'   
+                bin='${dir.build.test}'
+                resources="${dir.src.test-resources}"   
+                classpath-refid="@{classpath-refid}"   
+                debug='@{debug}'   
+                optimize='@{optimize}'   
+                deprecation='@{deprecation}'   
+                jdk-source='@{jdk-source}' 
+                jdk-target='@{jdk-target}'/>   
+        </sequential>   
+    </macrodef>     
+    
+    <macrodef name='RunTests'>
+        <attribute name='classpath-refid' default='classpath.test.runtime'/>   
+        <attribute name='bin' default='${dir.build.test}'/>
+        <attribute name='src' default='${dir.src.test}'/>   
+        <attribute name='reports' default='${dir.build.test-reports}'/>
+        <sequential>   
+            <condition
+               property='RunTests.message' 
+               value='Running single unit test named ${test}'>
+                <isset property='test'/>   
+            </condition>   
+            <property name='RunTests.message' value='Running all unit tests in @{bin}'/>
+            <echo>${RunTests.message}</echo>
+            <delete dir='@{reports}'/>
+            <mkdir dir='@{reports}'/>
+            <mkdir dir='@{bin}'/>
+            <junit 
+                    printsummary="yes" 
+                    haltonfailure="yes"  
+                    dir='${basedir}'>
+                 <classpath refid="@{classpath-refid}"/>
+                 <classpath>
+                   <pathelement location="@{bin}"/>
+                 </classpath>
+             
+                 <formatter type="plain"/>
+             
+                 <batchtest 
+                    fork="yes" 
+                    todir="@{reports}">
+                       <fileset dir="@{src}">
+                         <include name="**/*Test.java" unless="test"/>
+                         <include name="**/${test}.java" if='test'/>
+                         <exclude name="**/AllTests.java"/>
+                         <exclude name="**/Abstract*.java"/>
+                       </fileset>
+                 </batchtest>
+             </junit>   
+        </sequential>   
+    </macrodef>   
+    
+    <macrodef name="CreateJar">
+        <attribute name='name'/>
+        <attribute name='bin'/>  
+        <attribute name='lib'/>
+        <attribute name='version' default='${version}'/>   
+        <attribute name='vendor.impl' default='${vendor.impl}'/> 
+        <attribute name='vendor.spec' default='${vendor.spec}'/>   
+        <attribute name='vendor.id' default='${vendor.id}'/>   
+        <attribute name='vendor.impl.title' default='${vendor.impl.title}'/>   
+        <sequential>
+            <mkdir dir='@{lib}'/>
+            <mkdir dir='@{bin}'/>   
+            <jar 
+                jarfile="@{lib}/james-server-@{name}-@{version}.jar" 
+                basedir="@{bin}">
+                <manifest>
+                    <attribute name='Built-By' value='${user.name}'/>
+                    <attribute name='Specification-Title' value='Apache JAMES @{name}'/>
+                    <attribute name='Specification-Version' value='@{version}'/>
+                    <attribute name='Specification-Vendor' value='@{vendor.spec}'/>
+                    <attribute name='Implementation-Title' value='@{vendor.impl.title}'/>
+                    <attribute name='Implementation-Version' value='@{version}'/>
+                    <attribute name='Implementation-Vendor' value='@{vendor.impl}'/>
+                    <attribute name="Implementation-Vendor-Id" value="@{vendor.id}"/>
  
+            </manifest>    
+            </jar>   
+        </sequential>   
+    </macrodef>
+    
+ <!--
+ Targets
+ -->   
+    <target 
+        name='usage'>
+        <echo>Execute 'ant -projecthelp' to list recommended targets</echo>
+        <echo>Execute 'ant -help' to learn how to run these targets</echo>
+    </target>
+
+    <target name='help' depends='usage'/>
+</project>

Added: james/server/trunk/build-tools/build.xml
URL: http://svn.apache.org/viewvc/james/server/trunk/build-tools/build.xml?view=auto&rev=516702
==============================================================================
--- james/server/trunk/build-tools/build.xml (added)
+++ james/server/trunk/build-tools/build.xml Sat Mar 10 05:13:19 2007
@@ -0,0 +1,178 @@
+<?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='james-tools-build' default='usage'>
+     <description>
+Build utilities and builds for tools. Generation of new modules.
+     </description>
+    
+    <import file='../build-tools/base-build.xml' optional='no'/>
+    
+<!--
+Build macros
+-->
+    <macrodef name="CheckModuleGenerationEnvironment">
+        <attribute name='module-path'/>
+        <sequential>
+            <condition property='module.path.exists'>
+                <available file='@{module-path}'/>
+            </condition>
+            <fail if='module.path.exists'>@{module-path} already exists.</fail>
+            <echo>Creating module at @{module-path}</echo>
+        </sequential>
+    </macrodef>
+
+    <macrodef name="GenerateBuildFile">
+        <attribute name='module-build-file'/>
+        <attribute name='module-type'/>
+        <attribute name='module-name'/>
+        <sequential>
+    <echoxml file='@{module-build-file}'>
+<!--
+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='@{module-name}' default='main'>
+<description>
+Builds @{module-name} module. This is an @{module-type} module.
+</description>
+<property name='name.module' value='@{module-name}'/>   
+<import file="../build-tools/@{module-type}-build.xml" optional='no'/>
+</project>
+    </echoxml>
+        </sequential>
+    </macrodef>
+    
+    <macrodef name="GenerateNotice">
+        <attribute name='notice-file'/>
+        <sequential>
+            <tstamp>
+                <format property='year.current' pattern='yyyy'/>
+            </tstamp>
+            <echo file='@{notice-file}'>
+=========================================================================
+==      NOTICE file for use with the Apache License, Version 2.0,      ==
+=========================================================================
+
+Apache JAMES 
+Copyright ${year.current} The Apache Software Foundation
+
+This product includes software developed at
+The Apache Software Foundation (http://www.apache.org/).
+            </echo>
+            <echo>
+The contents of NOTICE.txt may need appropriate editing to accurately
+reflect the contents of this module.
+            </echo>
+        </sequential>
+    </macrodef>
+    
+    <macrodef name="GenerateModule">
+        <attribute name='module-name'/>
+        <attribute name='module-type'/>
+        <attribute name='module-path' default='../@{module-name}'/>
+        <attribute name='module-build-file' default='@{module-path}/build.xml'/>
+        <sequential>
+            <CheckModuleGenerationEnvironment module-path="@{module-path}"/>
+            <mkdir dir='@{module-path}'/>
+            <mkdir dir='@{module-path}/${dir.src.java}'/>
+            <mkdir dir='@{module-path}/${dir.src.resources}'/>
+            <mkdir dir='@{module-path}/${dir.src.conf}'/>
+            <mkdir dir='@{module-path}/${dir.src.test}'/>
+            <mkdir dir='@{module-path}/${dir.src.test-resources}'/>
+            <GenerateBuildFile 
+                module-build-file='@{module-build-file}' 
+                module-type='@{module-type}'
+                module-name='@{module-name}'/>
+            <copy todir='@{module-path}'>
+                <fileset dir='..'>
+                    <include name="${filename.license}"/>
+                </fileset>
+            </copy>
+            <GenerateNotice notice-file='@{module-path}/${filename.notice}'/>
+        </sequential>
+    </macrodef>
+    
+    <macrodef name="GenerateModuleOfType">
+        <attribute name='type'/>
+        <sequential>
+            <fail unless='MODULE'>Error: Required parameter is missing.
+Usage: 
+    ant -DMODULE=&lt;modulename&gt; generate-@{type}-module
+Where
+    &lt;modulename&gt; is the name of the new build to be generated
+            </fail>
+            <condition property='module.name.end_with_type'>
+                <matches string='${MODULE}' pattern='(.*)-@{type}'/>   
+            </condition>   
+            <fail if='module.name.end_with_type'>Error: Name includes type
+MODULE name ('${MODULE}') must not end with the module type (@{type})   
+            </fail>   
+            <GenerateModule module-type='@{type}' 
+                module-name="${MODULE}-@{type}"/>
+        </sequential>
+    </macrodef>
+    
+<!--
+User Targets
+-->
+    <target 
+        name='generate-api-module'
+        description='Generates API module outline.
+ Usage: ant -DMODULE=&lt;modulename&gt; generate-api-module.'>
+        <GenerateModuleOfType type='api'/>
+    </target>
+ 
+    <target 
+        name='generate-library-module'
+        description='Generates library module outline.
+Usage: ant -DMODULE=&lt;modulename&gt; generate-library-module.'>
+        <GenerateModuleOfType type='library'/>
+    </target> 
+    
+    <target 
+        name='generate-function-module'
+    description='Generates function module outline.
+Usage: ant -DMODULE=&lt;modulename&gt; generate-function-module.'>
+        <GenerateModuleOfType type='function'/>
+    </target>    
+ 
+    <target 
+        name='generate-deployment-module'
+    description='Generates deployment module outline.
+Usage: ant -DMODULE=&lt;modulename&gt; generate-deployment-module.'>
+        <GenerateModuleOfType type='deployment'/>
+    </target>     
+</project>

Added: james/server/trunk/build-tools/deployment-build.xml
URL: http://svn.apache.org/viewvc/james/server/trunk/build-tools/deployment-build.xml?view=auto&rev=516702
==============================================================================
--- james/server/trunk/build-tools/deployment-build.xml (added)
+++ james/server/trunk/build-tools/deployment-build.xml Sat Mar 10 05:13:19 2007
@@ -0,0 +1,43 @@
+<?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='deployment-template'>
+     <description>
+Template build for deployment modules
+     </description>
+     
+     <import file='../build-tools/module-build.xml' optional='no'/>
+ 
+    <target 
+           name='set-classpath'
+           depends='check-environment, master-module-template.set-classpath'>
+           <path id='classpath.main'>
+               <path refid='classpath.base'/>
+               <path refid='classpath.dependencies.functions'/>   
+           </path>
+           <path id='classpath.test'>
+               <path refid='classpath.main'/>   
+               <path refid='classpath.base.test'/>   
+           </path>   
+           <path id='classpath.test.runtime'>
+               <path refid='classpath.test'/>   
+           </path>   
+    </target>    
+ </project>
\ No newline at end of file

Added: james/server/trunk/build-tools/function-build.xml
URL: http://svn.apache.org/viewvc/james/server/trunk/build-tools/function-build.xml?view=auto&rev=516702
==============================================================================
--- james/server/trunk/build-tools/function-build.xml (added)
+++ james/server/trunk/build-tools/function-build.xml Sat Mar 10 05:13:19 2007
@@ -0,0 +1,43 @@
+<?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='function-template'>
+     <description>
+Template build for function modules
+     </description>
+     
+     <import file='../build-tools/module-build.xml' optional='no'/>
+ 
+    <target 
+           name='set-classpath'
+           depends='check-environment, master-module-template.set-classpath'>
+           <path id='classpath.main'>
+               <path refid='classpath.base'/>
+               <path refid='classpath.dependencies.libraries'/>   
+           </path>
+           <path id='classpath.test'>
+               <path refid='classpath.main'/>   
+               <path refid='classpath.base.test'/>   
+           </path>   
+           <path id='classpath.test.runtime'>
+               <path refid='classpath.test'/>   
+           </path>   
+    </target>    
+ </project>
\ No newline at end of file

Added: james/server/trunk/build-tools/library-build.xml
URL: http://svn.apache.org/viewvc/james/server/trunk/build-tools/library-build.xml?view=auto&rev=516702
==============================================================================
--- james/server/trunk/build-tools/library-build.xml (added)
+++ james/server/trunk/build-tools/library-build.xml Sat Mar 10 05:13:19 2007
@@ -0,0 +1,43 @@
+<?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='library-template'>
+     <description>
+Template build for library modules
+     </description>
+     
+     <import file='../build-tools/module-build.xml' optional='no'/>
+ 
+    <target 
+           name='set-classpath'
+           depends='check-environment, master-module-template.set-classpath'>
+           <path id='classpath.main'>
+               <path refid='classpath.base'/>
+               <path refid='classpath.dependencies.api'/>   
+           </path>
+           <path id='classpath.test'>
+               <path refid='classpath.main'/>   
+               <path refid='classpath.base.test'/>   
+           </path>   
+           <path id='classpath.test.runtime'>
+               <path refid='classpath.test'/>   
+           </path>   
+    </target>    
+ </project>
\ No newline at end of file

Added: james/server/trunk/build-tools/module-build.xml
URL: http://svn.apache.org/viewvc/james/server/trunk/build-tools/module-build.xml?view=auto&rev=516702
==============================================================================
--- james/server/trunk/build-tools/module-build.xml (added)
+++ james/server/trunk/build-tools/module-build.xml Sat Mar 10 05:13:19 2007
@@ -0,0 +1,102 @@
+<?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='master-module-template' default='usage'>
+     <description>
+Master template for module builds.
+     </description>
+    
+     <import file='../build-tools/base-build.xml' optional='no'/>    
+    
+ <!--
+ Internal Support Targets
+ -->
+ 
+    <target name='check-environment'>
+        <fail unless='name.module'>Error: Module name must be set
+ The 'name.module' property must be specified by the module build.   
+        </fail>   
+        <CheckEnvironment/>
+    </target>   
+    
+    <target 
+        name='conditional-clean' 
+        depends='check-environment'
+        if='do.build.clean'>
+        <Clean/>   
+    </target>
+ 
+    <target 
+        name='set-classpath'
+        depends='check-environment'>
+        <SetBaseClasspaths/>   
+    </target>   
+       
+    <!--
+Main User Targets
+    -->
+
+    <target 
+        name='clean'
+        description='Cleans build residues.'
+        depends='check-environment'>
+        <property name='do.build.clean' value='true'/>
+        <antcall target='conditional-clean'/>
+    </target>
+ 
+    <target 
+        name='build'
+        description='Builds without cleaning'
+        depends='check-environment, conditional-clean, set-classpath'>
+        <echo>Building ${name.module}</echo>   
+        <CompileMainSource/>   
+    </target>   
+    
+    <target 
+        name='test'
+        description='Builds and tests without cleaning'
+        depends='build, check-environment, conditional-clean, set-classpath'>
+        <echo>Testing ${name.module}</echo>    
+        <CompileTests/>   
+        <RunTests/>   
+    </target>
+    
+    <target 
+        name='dist'
+        description='Builds and creates distribution without cleaning'
+        depends='build, check-environment, conditional-clean'>
+        <CreateJar 
+            name='${name.module}'   
+            bin='${dir.build.bin}'
+            lib='${dir.stage.james}'/>  
+    </target>   
+    
+    <target 
+        name='main'
+        description='Builds, tests and distributes without cleaning'
+        depends='build, test, dist, check-environment, conditional-clean'/>
+ 
+    <target 
+        name='full'
+        description='Cleans, builds, tests and distributes'>
+        <property name='do.build.clean' value='true'/>
+        <antcall target="main"/>   
+    </target>
+</project>



---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message