Skip to content
Snippets Groups Projects
Commit 98bded32 authored by AS's avatar AS
Browse files

Modified tree to include build tools for ant.

The build generates an XML schema from the RNG input.
parent f99cc5cb
No related branches found
No related tags found
No related merge requests found
Showing
with 1051 additions and 0 deletions
<?xml version="1.0" encoding="UTF-8" ?>
<project name="anttasks" default="build">
<!-- ant-contribs -->
<taskdef resource="net/sf/antcontrib/antlib.xml">
<classpath>
<pathelement location="${path.libs}/ant/ant-contrib-1.0b3.jar"/>
</classpath>
</taskdef>
<!-- BND tool -->
<taskdef resource="aQute/bnd/ant/taskdef.properties">
<classpath>
<pathelement location="${path.libs}/ant/bnd-0.0.378.jar"/>
</classpath>
</taskdef>
<!-- Set the log level -->
<taskdef name="setloglevel"
classname="de.berkom.ehome.tools.ant.setloglevel.SetLogLevel"
classpath="${path.libs}/ant/antSetLogLevel.jar"/>
<!-- Ant Thinlet Dialog -->
<taskdef name="dialog"
classname="de.berkom.ehome.tools.ant.dialog.Dialog"
classpath="${path.libs}/ant/antDialog.jar"/>
<!-- SVN Library -->
<taskdef resource="org/tigris/subversion/svnant/svnantlib.xml">
<classpath>
<pathelement location="${path.libs}/ant/svnant.jar"/>
<pathelement location="${path.libs}/ant/svnClientAdapter.jar"/>
<pathelement location="${path.libs}/ant/svnjavahl.jar"/>
</classpath>
</taskdef>
</project>
<?xml version="1.0" encoding="UTF-8" ?>
<project name="imported" default="build">
<!-- TODOs
* genjar integration
* if no manifest is available include a defalt one from etc?
-->
<property name="path.libs" location="${basedir}/../../libs" />
<!-- Load various tasks -->
<import file="anttasks.xml" />
<!-- Unset the _mainbuild property -->
<var name="_mainbuild" unset="true" />
<!-- Load the properties -->
<import file="properties.xml" />
<!-- Load all the actual tasks -->
<import file="tasks/all.xml" />
<import file="tasks/allforced.xml" />
<import file="tasks/build.xml" />
<import file="tasks/buildjar.xml" />
<import file="tasks/clean.xml" />
<import file="tasks/collect.xml" />
<import file="tasks/compile.xml" />
<import file="tasks/compilenative.xml" />
<import file="tasks/doc.xml" />
<import file="tasks/eclipse.xml" />
<import file="tasks/_addPrivateLibs.xml" />
<import file="tasks/_buildNative.xml" />
<import file="tasks/_checkDependentProjects.xml" />
<import file="tasks/_cleanDependentProjects.xml" />
<import file="tasks/_getBuildNumber.xml" />
<import file="tasks/_handleProjectProperties.xml" />
<import file="tasks/_includeExternalResourcesInJar.xml" />
<!-- <import file="tasks/_importManifest.xml" /> -->
<import file="tasks/_prepare.xml" />
<import file="tasks/_preparebuild.xml" />
<import file="tasks/_setClassPath.xml" />
</project>
# Default Properties for the Ant make system
#
#
# Default libraries.
# Update accordingly if another library becomes the system's default library
#
default.lib.cdc.foundation.1.1=cdc/foundation/1.1/classes.zip
default.lib.osgi.core.2.0=osgi/framework/2.0/osgi.jar
default.lib.osgi.cmpn.2.0=osgi/framework/2.0/osgi.jar
default.lib.osgi.core.3.0=osgi/framework/3.0/osgi.jar
default.lib.osgi.cmpn.3.0=osgi/framework/3.0/osgi.jar
default.lib.osgi.core.4.0=osgi/core/4.0/osgi.core.jar
default.lib.osgi.core.4.1=osgi/core/4.1/osgi.core.jar
default.lib.osgi.core.4.2=osgi/core/4.2/osgi.core.jar
default.lib.osgi.core=osgi/core/4.2/osgi.core.jar
default.lib.osgi.cmpn.4.0=osgi/cmpn/4.0/osgi.compendium.jar
default.lib.osgi.cmpn.4.1=osgi/cmpn/4.1/osgi.cmpn.jar
default.lib.osgi.cmpn.4.2=osgi/cmpn/4.2/osgi.cmpn.jar
default.lib.osgi.cmpn=osgi/cmpn/4.2/osgi.cmpn.jar
default.lib.osgi.dmt.1.0=osgi/info/1.0/dmt.jar
default.lib.osgi.dmt.2.0=osgi/info/2.0/org.osgi.impl.service.dmt.jar
default.lib.osgi.dmt=osgi/info/2.0/org.osgi.impl.service.dmt.jar
default.lib.mail.1.4.prosyst=javax/mail/1.4-prosyst/mail.jar
default.lib.mail=javax/mail/1.4-prosyst/mail.jar
default.lib.activation.1.1.prosyst=javax/activation/1.1-prosyst/activation.jar
default.lib.activation=javax/activation/1.1-prosyst/activation.jar
default.lib.j2ee.1.3.1=javax/j2ee/1.3.1/j2ee.jar
default.lib.j2ee=javax/j2ee/1.3.1/j2ee.jar
# - Servlet APIs ---------------------------------------------------------------
#
# With the addition of the SIP-Servlet API, and it's dependency on newer
# version of the Servlet API, I thought names matching the Sun package
# structure would be clearer. Kept the old definition as well.
default.lib.servlet.2.3.1=javax/servlet/2.3.1/servlet.jar
default.lib.servlet=javax/servlet/2.3.1/servlet.jar
default.lib.javax.servlet.2.3.1=javax/servlet/2.3.1/servlet.jar
default.lib.javax.servlet.2.4=javax/servlet/2.4/servlet.jar
default.lib.javax.servlet.2.5=javax/servlet/2.5/servlet.jar
default.lib.javax.servlet.3.0.1=javax/servlet/3.0.1/servlet.jar
default.lib.javax.servlet=javax/servlet/2.3.1/servlet.jar
default.lib.javax.sip.servlet.1.1=javax/servlet/sip/1.1/sip-servlet.jar
default.lib.javax.sip.servlet=javax/servlet/sip/1.1/sip-servlet.jar
# ------------------------------------------------------------------------------
default.lib.log4j=apache/log4j/1.2.4/log4j-1.2.4.jar
default.lib.jgraph=jgraph/5.12.0.4/jgraph.jar
default.lib.thinlet.20031012=thinlet/20031012/thinlet.jar
default.lib.thinlet.20050328=thinlet/20050328/thinlet.jar
default.lib.thinlet.20070222=thinlet/20070222/thinlet.jar
default.lib.thinlet=thinlet/20070222/thinlet.jar
default.lib.id3tag=id3tag/id3t.jar
default.lib.xmlrpc=prosyst/xmlrpc/xmlrpc.jar
# - CDC/Foundation Extensions -------------------------------------------------
default.lib.cdc.foundationx.j9jsse=cdc/foundationx/j9jsse/2.4/j9jsse.jar
# -----------------------------------------------------------------------------
# Note: We should not require dependencies on the ProSyst HTTPS Handler!
default.lib.httpshdlr=prosyst/httpshdlr.jar
default.lib.ksoap2=ksoap2/ksoap2-j2se-full-2.1.0.jar
default.lib.kxml=ksoap2/kxml2-2.3.0.jar
# -----------------------------------------------------------------------------
default.lib.xmlrpc=xmlrpc/xmlrpc-1.1.1.jar
# -----------------------------------------------------------------------------
#
# Default version number
# (I'm wondering whether anybody will set this in his build properties)
#
version=1.0.0
#
# The default Manifest file.
# This might change if we adopt the bnd tool
#
manifest=etc/Manifest.mf
#
# Add a build number to the resulting jar file.
# The file "build.number" in the root directory of each project contains the latest build number.
# Default: The value "none" means that no build number is appended.
#
buildnumber=none
#
# Set the loglevel.
# Possible loglevel: debug,verbose,info (the ant default), warning, error
# Default is warning, which is rather quiet.
#
loglevel=warning
#
# Enable lint (all recommend warnings)
# Possible values: true, false
# Default: false
#
uselint=false
<?xml version="1.0" encoding="UTF-8" ?>
<project name="properties" default="build">
<!-- Set the default project name to the name of the directory -->
<propertyregex override="yes"
property="projectname"
input="${basedir}"
regexp=".*[/\\]([^/\\]*)"
select="\1" />
<!-- A couple of constants -->
<property name="path.base" location="${basedir}/../.." />
<property name="path.libs" location="${path.base}/libs" />
<property name="path.etc" location="${path.base}/etc" />
<property name="path.genbase" location="${path.base}/gen" />
<property name="path.gen" location="${path.genbase}/projects/${projectname}" />
<property name="path.gen.classes" location="${path.gen}/classes" />
<property name="path.gen.etc" location="${path.gen}/etc" />
<property name="path.gen.docbase" location="${path.genbase}/docs" />
<property name="path.gen.documentation" location="${path.gen.docbase}/${projectname}" />
<property name="path.gen.collection" location="${path.genbase}/collection" />
<property name="path.gen.domain" location="${path.genbase}/domains" />
<property name="path.src" location="${basedir}/src" />
<property name="path.resources" location="${basedir}/resources" />
<property name="path.native" location="${basedir}/native" />
<property name="path.gen.native" location="${path.gen}/native" />
<property name="path.gen.classpathfile" location="${path.gen.etc}/_classpath" />
<property name="path.gen.includecmdfile" location="${path.gen.etc}/_jarinclude.xml" />
<property name="path.gen.importmanifestcmdfile" location="${path.gen.etc}/_manifestimport.xml" />
<property name="path.etc.localfile" location="${path.base}/etc/local.xml" />
<property name="path.eclipse.classpathfile" location="${basedir}/.classpath" />
<property name="path.eclipse.projectfile" location="${basedir}/.project" />
<property name="path.eclipse.settingsdir" location="${basedir}/.settings" />
<property name="path.eclipse.settingsfile" location="${path.eclipse.settingsdir}/org.eclipse.jdt.core.prefs" />
<!-- The following tasks only need to be executed when this file is not included from the main build file -->
<if><not>
<isset property="_mainbuild" />
</not>
<then>
<!-- Unset the java.target and java.source properties -->
<var name="java.target" unset="true" />
<var name="java.source" unset="true" />
<!-- Load project specific properties from local properties file -->
<loadproperties srcFile="properties" />
<!-- Load project specific properties from local properties file -->
<loadproperties srcFile="../../etc/default.properties" />
<!-- Set the start loglevel -->
<setloglevel level="${loglevel}" />
</then>
</if>
<!-- Define the path to additional Java jar files for the scriptdef and similar tasks -->
<path id="antscripting">
<fileset dir="${path.libs}/ant/scripting" includes="*.jar" />
</path>
<!-- set the default Java source and target formats to the local versions -->
<if><not>
<isset property="java.source" />
</not>
<then>
<var name="java.source" value="${ant.java.version}" />
</then>
</if>
<if><not>
<isset property="java.target" />
</not>
<then>
<var name="java.target" value="${ant.java.version}" />
</then>
</if>
<!-- load local properties, if the file exists -->
<available property="available.local" file="${path.etc.localfile}"/>
<if><isset property="available.local" />
<then>
<import file="${path.etc.localfile}" />
</then>
</if>
</project>
<?xml version="1.0" encoding="UTF-8" ?>
<project name="_addPrivateLibs" default="build">
<!-- INTERNAL: _addPrivateLibs
Check, whether there are privare jars that should be added to the classpath.
Those must be located under resouces/libs or libs in the project directory.
Note that jars under resources/libs will be included in the resulting jar.
-->
<target name="_addPrivateLibs">
<!-- look for jar files in the projects resources libs directory -->
<path id="idPrivatelibs">
<fileset dir="resources/libs">
<include name="*.jar" />
</fileset>
</path>
<trycatch>
<try>
<!-- try to access the private jars. If those don't exist, the following code is *not* executed -->
<var name="tmp" value="${toString:idPrivatelibs}" />
<!-- add them to the classpath file -->
<for list="${tmp}" delimiter=":" param="jfile">
<sequential>
<propertyregex override="yes"
property="tmp"
input="@{jfile}"
regexp=".*[/\\]([^/\\]*)"
select="\1" />
<echo file="${path.gen.classpathfile}" append="true">projects/${projectname}/resources/libs/${tmp}${line.separator}</echo>
</sequential>
</for>
</try>
<catch>
<!-- if no lib available then do nothing -->
</catch>
</trycatch>
<path id="idPrivateExternallibs">
<fileset dir="libs">
<include name="*.jar" />
</fileset>
</path>
<trycatch>
<try>
<!-- try to access the private jars. If those don't exist, the following code is *not* executed -->
<var name="tmp" value="${toString:idPrivateExternallibs}" />
<!-- add them to the classpath file -->
<for list="${tmp}" delimiter=":" param="jfile">
<sequential>
<propertyregex override="yes"
property="tmp"
input="@{jfile}"
regexp=".*[/\\]([^/\\]*)"
select="\1" />
<echo file="${path.gen.classpathfile}" append="true">projects/${projectname}/libs/${tmp}${line.separator}</echo>
</sequential>
</for>
</try>
<catch>
<!-- if no lib available then do nothing -->
</catch>
</trycatch>
</target>
</project>
<?xml version="1.0" encoding="UTF-8" ?>
<project name="_buildNative" default="build">
<!-- INTERNAL: _buildNative
Build all native code
-->
<target name="_buildNative">
<!-- is there a directory for native code? -->
<available property="available.native" file="${path.native}" type="dir"/>
<if><isset property="available.native" />
<then>
<!-- check whether ${prog.make} is set -->
<if> <isset property="prog.make" />
<then>
<!-- it is set, so go all the directories unter "native" and execute the Makefile -->
<path id="idNativeDirs">
<dirset dir="${path.native}">
<include name="*" />
</dirset>
</path>
<!-- iterate over all directories and call the makefile -->
<var name="tmp" value="${toString:idNativeDirs}" />
<for list="${tmp}" delimiter=":" param="ndir">
<sequential>
<available property="available.native.makefile" file="@{ndir}/Makefile" />
<if><isset property="available.native.makefile" />
<then>
<echo>@{ndir}/Makefile</echo>
<!-- <exec executable="/usr/bin/make"
failonerror="false"
failifexecutionfails="false"
resultproperty="myStatus"
errorproperty="/tmp/error.out"
outputproperty="/tmp/foo.out"
error="/tmp/error.txt"
output="/tmp/output.txt"/>
-->
</then>
<else>
<echo>No "Makefile" found. Please check the check (note the upper-case M).</echo>
</else>
</if>
<echo>@{ndir}</echo>
</sequential>
</for>
</then>
<else>
<echo>Property "prog.make" not set. Native Builds are ignored.</echo>
</else>
</if>
</then>
</if>
</target>
</project>
<?xml version="1.0" encoding="UTF-8" ?>
<project name="_checkDependentProjects" default="build">
<!-- INTERNAL: _checkDependentProjects
Check whether there are dependencies to other projects and build them if necessary.
-->
<target name="_checkDependentProjects">
<if><and>
<isset property="dependency.projects" />
<length string="${dependency.projects}" trim="true" when="greater" length="0" />
</and>
<then>
<!-- go through all dependent projects -->
<for list="${dependency.projects}" param="pname">
<sequential>
<available property="available.dir.@{pname}" file="../@{pname}" />
<available property="available.gen.@{pname}" file="../../gen/projects/@{pname}" />
<!-- does the project exist at all? -->
<if><isset property="available.dir.@{pname}" />
<then>
<!-- look for jar files in the according project's gen directory -->
<path id="x">
<fileset dir="../../gen/projects/@{pname}">
<include name="*.jar" />
</fileset>
</path>
<trycatch>
<try>
<echo>Checking dependent project "@{pname}"</echo>
<var name="tmp" value="${toString:x}" />
<if><isset property="dependency.projects.forcebuild" />
<then>
<echo>Building dependent project "@{pname}" (forced)</echo>
<if><isset property="global.build" /> <!-- inheriting global.build property, if set -->
<then>
<ant dir="../@{pname}" inheritall="false" antfile="../@{pname}/build.xml" target="all">
<property name="global.build" value="true" />
</ant>
</then>
<else>
<ant dir="../@{pname}" inheritall="false" antfile="../@{pname}/build.xml" target="all" />
</else>
</if>
</then>
</if>
</try>
<catch>
<!-- if no jar file available, build the project -->
<echo>Building dependent project "@{pname}"</echo>
<if><isset property="global.build" /> <!-- inheriting global.build property, if set -->
<then>
<ant dir="../@{pname}" inheritall="false" antfile="../@{pname}/build.xml" >
<property name="global.build" value="true" />
</ant>
</then>
<else>
<ant dir="../@{pname}" inheritall="false" antfile="../@{pname}/build.xml" />
</else>
</if>
</catch>
</trycatch>
<!-- and try again -->
<trycatch>
<try>
<var name="tmp" value="${toString:x}" />
<echo>Dependent project "@{pname}": ok</echo>
<for list="${tmp}" delimiter=":" param="jfile">
<sequential>
<!--echo file="${path.gen.classpathfile}" append="true">@{jfile}${line.separator}</echo-->
<propertyregex override="yes"
property="tmp"
input="@{jfile}"
regexp=".*[/\\]([^/\\]*)"
select="\1" />
<echo file="${path.gen.classpathfile}" append="true">gen/projects/@{pname}/${tmp}${line.separator}</echo>
</sequential>
</for>
</try>
<catch>
<fail>.${line.separator}${line.separator}Can't resolve dependency to project "@{pname}". Aborting.${line.separator}Perhaps that project was not build (check the property 'gobal.build.ignore').</fail>
</catch>
</trycatch>
</then>
</if>
</sequential>
</for>
</then>
</if>
</target>
</project>
<?xml version="1.0" encoding="UTF-8" ?>
<project name="_cleanDependentProjects" default="build">
<!-- INTERNAL: _cleanDependentProjects
Check whether there are dependencies to other projects and clean them.
-->
<target name="_cleanDependentProjects">
<if><and>
<isset property="dependency.projects" />
<length string="${dependency.projects}" trim="true" when="greater" length="0" />
</and>
<then>
<!-- go through all dependent projects -->
<for list="${dependency.projects}" param="pname">
<sequential>
<available property="available.dir.@{pname}" file="../@{pname}" />
<!-- does the project exist at all? -->
<if><isset property="available.dir.@{pname}" />
<then>
<echo>Cleaning dependent project "@{pname}"</echo>
<var name="tmp" value="${toString:x}" />
<if><isset property="global.build" /> <!-- inheriting global.build property, if set -->
<then>
<ant dir="../@{pname}" inheritall="false" antfile="../@{pname}/build.xml" target="clean">
<property name="global.build" value="true" />
</ant>
</then>
<else>
<ant dir="../@{pname}" inheritall="false" antfile="../@{pname}/build.xml" target="clean" />
</else>
</if>
</then>
</if>
</sequential>
</for>
</then>
</if>
</target>
</project>
<?xml version="1.0" encoding="UTF-8" ?>
<project name="_getBuildNumber" default="build">
<!-- INTERNAL: _getBuildNumber
Add the build number to the jar file name, if necessary.
-->
<target name="_getBuildNumber">
<if><and>
<isset property="buildnumber" />
<not>
<equals arg1="${buildnumber}" arg2="none" />
</not>
</and>
<then>
<buildnumber />
<propertyregex property="tmp"
override="true"
input="${file.jar}"
regexp="(.*).jar"
select="\1" />
<var name="file.jar" value="${tmp}-${build.number}.jar" />
</then>
</if>
</target>
</project>
<?xml version="1.0" encoding="UTF-8" ?>
<project name="_handleProjectProperties" default="build">
<!-- INTERNAL: _handleProjectProperties
Calculate and the project properties
-->
<target name="_handleProjectProperties">
<!-- go through all properties that start with "dependency.lib." -->
<propertyselector property="libs.list"
override="yes"
delimiter=","
match="^dependency\.lib\.(.*)"
select="\1"
casesensitive="false" />
<if><isset property="libs.list" />
<then>
<for list="${libs.list}" param="lib.id">
<sequential>
<propertycopy override="yes" name="lib.name" from="dependency.lib.@{lib.id}" />
<!-- echo message="@{lib.id}" / -->
<!-- check whether the value is empty. In this case the globally configured value is assigned to the property so that it is not blank anymore -->
<if><length string="${lib.name}" trim="true" when="equal" length="0" />
<then>
<var name="dependency.lib.@{lib.id}" value="${default.lib.@{lib.id}}" />
</then>
</if>
<echo file="${path.gen.classpathfile}" append="true">libs/${dependency.lib.@{lib.id}}${line.separator}</echo>
</sequential>
</for>
</then>
<!--
<else>
<echo file="${path.gen.classpathfile}" append="true"></echo>
</else>
-->
</if>
<!-- build the name for the jar file -->
<var name="tmp" value="${projectname}" />
<if><isset property="jarbase" />
<then>
<var name="tmp" value="${jarbase}" />
</then>
</if>
<!-- append verson number if it is not empty -->
<if><isset property="version" />
<then>
<if><and>
<length string="${version}" trim="true" when="greater" length="0" />
<not>
<equals arg1="${version}" arg2="none" trim="true" />
</not>
</and>
<then>
<var name="tmp" value="${tmp}-${version}" />
</then>
</if>
</then>
</if>
<var name="file.jar" value="${path.gen}/${tmp}.jar" />
</target>
</project>
<?xml version="1.0" encoding="UTF-8" ?>
<project name="_importManifest" default="build">
<!-- BAUSTELLE -->
<!-- INTERNAL: _importManifest
Import the Manifest from another jar (in lib or from another project).
-->
<target name="_importManifest">
<!-- Build an external build file to add the content to the jar file -->
<echo file="${path.gen.importmanifestcmdfile}" append="true">&lt;project name="runimportmanifest" default="_runimportmanifest">${line.separator}</echo>
<echo file="${path.gen.importmanifestcmdfile}" append="true">&lt;target name="_runimportmanifest">${line.separator}</echo>
<propertyselector property="manifestlib"
override="yes"
delimiter=","
match="^importmanifest\.lib\.(.*)"
select="\1"
casesensitive="false" />
<if><isset property="manifestlib" />
<then>
<echo file="${path.gen.importmanifestcmdfile}" append="true">&lt;zip destfile="${file.jar}" update="true">${line.separator}</echo>
<propertycopy name="fs.src" from="default.lib.${manifestlib}" override="yes" />
<var name="fs.src" value="${path.libs}/${fs.src}" />
<echo file="${path.gen.importmanifestcmdfile}" append="true">&lt;zipfileset src="${fs.src}" includes="META-INF/MANIFEST.MF" />${line.separator}</echo>
<echo file="${path.gen.importmanifestcmdfile}" append="true">&lt;/zip>${line.separator}</echo>
</then>
</if>
<echo file="${path.gen.importmanifestcmdfile}" append="true">&lt;/target>${line.separator}</echo>
<echo file="${path.gen.importmanifestcmdfile}" append="true">&lt;/project>${line.separator}</echo>
<!-- run the generates build file -->
<ant antfile="${path.gen.importmanifestcmdfile}" target="_runimportmanifest" inheritAll="true" />
</target>
</project>
<?xml version="1.0" encoding="UTF-8" ?>
<project name="_includeExternalResourcesInJar" default="build">
<!-- INTERNAL: _includeExternalResourcesInJar
Check, whether there should resources from other jar files be included.
Generate an external build file and execute it in order to add the files.
-->
<target name="_includeExternalResourcesInJar">
<!-- go through all properties that start with "include." -->
<propertyselector property="include.list"
override="yes"
delimiter=","
match="^include\.(.*)"
select="\1"
casesensitive="false" />
<if><isset property="include.list" />
<then>
<!-- Build an external build file to add the content to the jar file -->
<echo file="${path.gen.includecmdfile}" append="true">&lt;project name="runzipinclude" default="_runzipinclude">${line.separator}</echo>
<echo file="${path.gen.includecmdfile}" append="true">&lt;target name="_runzipinclude">${line.separator}</echo>
<echo file="${path.gen.includecmdfile}" append="true">&lt;jar destfile="${file.jar}" update="true">${line.separator}</echo>
<for list="${include.list}" param="include.id">
<sequential>
<propertycopy override="yes" name="include.value" from="include.@{include.id}" />
<var name="include.iszipfileset" value="true" />
<!-- check whether the include is from a lib or generated project file -->
<if><matches string="include.@{include.id}" pattern="^include\.lib.\.*" />
<then> <!-- lib -->
<propertyregex property="include.libname"
override="yes"
input="include.@{include.id}"
regexp="^include\.(.*)"
select="\1"
casesensitive="false" />
<propertycopy name="fs.src" from="default.${include.libname}" override="yes" />
<var name="fs.src" value="${path.libs}/${fs.src}" />
</then>
<else>
<!-- check whether the include is from a gen/resources directory -->
<if><matches string="include.@{include.id}" pattern="^include\.gen\.resources" />
<then>
<var name="fs.src" value="${path.gen}" />
<var name="include.iszipfileset" value="false" />
</then>
<else>
<!-- include from a project -->
<propertyregex property="include.libname"
override="yes"
input="include.@{include.id}"
regexp="^include\.project\.(.*)"
select="\1"
casesensitive="false" />
<path id="x">
<fileset dir="../../gen/projects/${include.libname}">
<include name="*.jar" />
</fileset>
</path>
<var name="fs.src" value="${toString:x}" />
</else>
</if>
</else>
</if>
<if><length string="${include.value}" trim="true" when="equal" length="0" />
<then>
<var name="fs.includes" value="**/*" />
</then>
<else>
<var name="fs.includes" value="${include.value}" />
</else>
</if>
<if><equals arg1="${include.iszipfileset}" arg2="true"/>
<then>
<echo file="${path.gen.includecmdfile}" append="true">&lt;zipfileset src="${fs.src}" includes="${fs.includes}" />${line.separator}</echo>
</then>
<else>
<echo file="${path.gen.includecmdfile}" append="true">&lt;fileset dir="${fs.src}" includes="${fs.includes}" />${line.separator}</echo>
</else>
</if>
</sequential>
</for>
<echo file="${path.gen.includecmdfile}" append="true">&lt;/jar>${line.separator}</echo>
<echo file="${path.gen.includecmdfile}" append="true">&lt;/target>${line.separator}</echo>
<echo file="${path.gen.includecmdfile}" append="true">&lt;/project>${line.separator}</echo>
<!-- run the generates build file -->
<ant antfile="${path.gen.includecmdfile}" target="_runzipinclude" inheritAll="true" />
</then>
</if>
</target>
</project>
<?xml version="1.0" encoding="UTF-8" ?>
<project name="_prepare" default="build">
<!-- TASK: _prepare
Set properties, generate the classpath etc
-->
<target name="_prepare">
<!-- initialize the build.time property -->
<tstamp />
<tstamp>
<format property="build.time" pattern="dd.MM.yyyy HH:mm:ss" />
</tstamp>
<!-- Retrieve the subversion property -->
<trycatch>
<try>
<svn>
<status path="${basedir}" revisionProperty="svn.revision" />
</svn>
</try>
<catch>
<property name="svn.revision" value="svn.revision.undefined" />
<echo>Cannot determine SVN revision. SVN not found?</echo>
</catch>
</trycatch>
<mkdir dir="${path.genbase}" />
<mkdir dir="${path.gen}" />
<mkdir dir="${path.gen.classes}" />
<mkdir dir="${path.gen.documentation}" />
<mkdir dir="${path.gen.etc}" />
<mkdir dir="${path.gen.docbase}" />
<mkdir dir="${path.gen.documentation}" />
<mkdir dir="${path.gen.collection}" />
<mkdir dir="${path.gen.domain}" />
<!-- remove old help files -->
<delete file="${path.gen.classpathfile}"/>
<delete file="${path.gen.includecmdfile}"/>
<delete file="${path.gen.importmanifestcmdfile}"/>
<runtarget target="_handleProjectProperties" />
<!-- make the directory for the domain -->
<if>
<isset property="omain" />
<then>
<mkdir dir="${path.gen.domain}/${omain}" />
</then>
</if>
</target>
</project>
<?xml version="1.0" encoding="UTF-8" ?>
<project name="_preparebuild" default="build">
<!-- INTERNAL: _preparebuild
Does preparations that are only necessary in case of a build
-->
<target name="_preparebuild">
<runtarget target="_checkDependentProjects" />
<runtarget target="_addPrivateLibs" />
</target>
</project>
<?xml version="1.0" encoding="UTF-8" ?>
<project name="_setClassPath" default="build">
<!-- INTERNAL: _setClassPath
Set the internal classpath for building the project by reading from the classpathfile, or empty.
-->
<target name="_setClassPath">
<!-- set the classpath from the file, only when the _classpathfile exists. Otherwise define an empty path element -->
<available property="available.classpathfile" file="${path.gen.classpathfile}" />
<if><isset property="available.classpathfile" />
<then>
<path id="id.libraries">
<!--fileset dir="${path.base}" includesfile="${path.gen.classpathfile}" excludes="**/*"/ -->
<fileset dir="${path.base}" includesfile="${path.gen.classpathfile}" />
</path>
</then>
<else>
<path id="id.libraries">
</path>
</else>
</if>
</target>
</project>
<?xml version="1.0" encoding="UTF-8" ?>
<project name="all" default="build">
<!-- TASK: all
Clean up, build and collect
-->
<target name="all">
<runtarget target="clean" />
<runtarget target="build" />
<runtarget target="collect" />
</target>
</project>
<?xml version="1.0" encoding="UTF-8" ?>
<project name="allforced" default="build">
<!-- TASK: allforced
Clean up, build and collect.
Includes a forced update to all dependent projects
-->
<target name="allforced">
<var name="dependency.projects.forcebuild" value="" />
<runtarget target="all" />
</target>
</project>
<?xml version="1.0" encoding="UTF-8" ?>
<project name="build" default="build">
<!-- TASK: build
Main target
-->
<target name="build">
<echo>----</echo>
<echo>Building project "${projectname}"</echo>
<!-- don't run the build if it is a global build and the project property "global.build.ignore" is set -->
<if><not>
<and>
<isset property="global.build" />
<isset property="global.build.ignore" />
</and>
</not>
<then>
<runtarget target="compile" />
<runtarget target="buildjar" />
</then>
<else>
<echo>+--------------------------------------------------------------------------------+</echo>
<echo>| PROJECT IS NOT BUILD. Global build, but "global.build.ignore" property is set. |</echo>
<echo>+--------------------------------------------------------------------------------+</echo>
</else>
</if>
</target>
</project>
<?xml version="1.0" encoding="UTF-8" ?>
<project name="buildjar" default="build">
<!-- TASK: buildjar
Build the jar file
-->
<target name="buildjar" depends="_getBuildNumber">
<!-- Build the base jar file -->
<if><not>
<equals arg1="${manifest}" arg2="none" trim="true" />
</not>
<then>
<jar destfile="${file.jar}" manifest="${manifest}" whenmanifestonly="create">
<fileset dir="${path.gen.classes}">
<include name="**/*.class" />
</fileset>
<manifest>
<!-- Who is building this jar? -->
<attribute name="Built-By" value="${user.name}"/>
<attribute name="Build-Time" value="${build.time}"/>
<attribute name="SVN-Revision" value="${svn.revision}"/>
</manifest>
</jar>
</then>
<else>
<jar destfile="${file.jar}" whenmanifestonly="create">
<fileset dir="${path.gen.classes}">
<include name="**/*.class" />
</fileset>
<manifest>
<!-- Who is building this jar? -->
<attribute name="Built-By" value="${user.name}"/>
<attribute name="Build-Time" value="${build.time}"/>
<attribute name="SVN-Revision" value="${svn.revision}"/>
</manifest>
</jar>
</else>
</if>
<!-- Add resources, if necessary -->
<available property="available.resources" file="resources" />
<if><isset property="available.resources" />
<then>
<jar destfile="${file.jar}" update="true">
<fileset dir="${path.resources}">
<include name="**/*" />
</fileset>
</jar>
</then>
</if>
<!-- Include external resources in the jar file -->
<runtarget target="_includeExternalResourcesInJar" />
<!-- Include external manifest in the jar file -->
<!-- <runtarget target="_importManifest" /> -->
</target>
</project>
<?xml version="1.0" encoding="UTF-8" ?>
<project name="clean" default="build">
<!-- TASK: Clean
Removes all generated files from the "gen" directory for a project
-->
<target name="clean" depends="_cleanDependentProjects">
<echo>Cleaning project "${projectname}"</echo>
<delete dir="${path.gen}"/>
<delete dir="${path.gen.documentation}"/>
<!-- remove the directory for the domain -->
<if>
<isset property="omain" />
<then>
<delete dir="${path.gen.domain}/${omain}" />
</then>
</if>
</target>
</project>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment