BuildDesignerCore.xml from BIRT at Krugle
Show BuildDesignerCore.xml syntax highlighted
<?xml version="1.0"?>
<!--
*************************************************************************
* Copyright (c) 2004, 2005 Actuate Corporation.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Actuate Corporation - initial API and implementation
*
*************************************************************************
*
* BuildDesignerCore.xml
*
* Created on 03/16/2005
* Build script for project org.eclipse.birt.report.designer.core
*
*
* The following are public targets callable by external users.
*
* "Clean" - Clean all objects created by this script. Individual project build script can not call this target;
* "Jar" - Compile source code and generate jar for this project.
* The compile dependency on other projects should be defined explicitly.
* eclipse.home should be passed in when Individual project build script call this target;
* the property of "failonerror" should be set true(default) when compiling source code
* "UnitTest" - Run unit tests. This task must be called after calling Jar task,
* so it needn't depend on Jar explicitly
* "Export" - Export the project, for instance, jar files are copied to a designated folder.
* this task must be called after calling Jar task, so it needn't depend on Jar explicitly
* "JavaDoc" - generate java documents
*
* Usage:
* ant [any one or more of the public targets]
* -Declipse.home=<your eclipse home>
*
* Default target is "Jar".
*
* This script may also additional targets. These targets are private to this build script only.
*
*
* Notes:
* 1. classpath need to be set for junit.jar
* 2. This file now requires Ant 1.6
*
* Change History:
*
* 1. 03/16/2005: initial version
* 2. 03/16/2006: single jar version
*
-->
<project name="BIRT Designer Core Project" default="Jar" basedir=".">
<description>BIRT Core Project.</description>
<!-- set global properties for this build -->
<!-- Public properties, used by public targets, top level build script
will pass on the value at runtime. Properties will have there default
value.
eclipse.home
utest.report.dir
javadoc.dir
plugin.version
-->
<property name="javadoc.dir" location="docs/api" />
<property name="eclipse.home" location="." />
<!--properties -->
<property name="dir.src" location="src" />
<property name="dir.bin" location="temp.folder" />
<property name="module.name" value="org.eclipse.birt.report.designer.core" />
<property name="core.dir" value="../org.eclipse.birt.core" />
<property name="model.dir" value="../org.eclipse.birt.report.model" />
<property name="arch" value="x86" />
<!-- set platform related properties-->
<condition property="ws" value="win32">
<os family="windows" />
</condition>
<condition property="ws" value="gtk">
<not>
<os family="windows" />
</not>
</condition>
<condition property="os" value="win32">
<os family="windows" />
</condition>
<condition property="os" value="linux">
<not>
<os family="windows" />
</not>
</condition>
<target name="checkBuildScript">
<available file="build.xml" property="buildScript.available" />
</target>
<!-- Compile source code and generate jar for this project.
Input parameters:
eclipse.home
-->
<target name="Jar" depends="build,clearJars">
<java classpath="${eclipse.home}/startup.jar" classname="org.eclipse.core.launcher.Main" fork="true" dir="." failonerror="true">
<arg line="-application org.eclipse.ant.core.antRunner -file build.xml build.update.jar" />
<jvmarg line="-Declipse.home=${eclipse.home} -Dclean=true -Dos=${os} -Dws=${ws} -Darch=${arch} -DjavacSource=1.4 -DjavacTarget=1.4" />
</java>
</target>
<!-- Export the project, for instance, jar files are copied to a designated folder
the dependency on Jar should implement in top level script by call sequence
Parameters:
- ${export.dir} target directory to put the plugin binaries
- ${plugin.version} the version of plugin exported
-->
<target name="Export" description="Export">
<copy todir="${export.dir}">
<fileset dir="." includes="${module.name}*.jar" />
</copy>
</target>
<!-- No unit tests, dummy target -->
<target name="UnitTest" />
<!-- Clean all objects created by this script -->
<target name="Clean" description="clean up">
<antcall target="cleanByScript" />
<antcall target="exceptionalClean" />
</target>
<!-- Clean all objects by the script generated -->
<target name="cleanByScript" description="clean up by script generated" depends="checkBuildScript" if="buildScript.available">
<ant target="clean" />
</target>
<!-- Clean all objects manually when the script generated is lost-->
<target name="exceptionalClean" depends="checkBuildScript,clearJars" unless="buildScript.available">
<delete dir="${dir.bin}" />
</target>
<!-- Generate the JavaDoc.
Parameters:
- ${javadoc.dir} target directory to put the java document
-->
<target name="Javadoc">
<mkdir dir="${javadoc.dir}" />
<javadoc destdir="${javadoc.dir}" author="true" version="true" use="true" windowtitle="Birt Designer Core API" source="1.4" packagenames="org.eclipse.birt.*">
<packageset dir="${dir.src}" defaultexcludes="yes" />
<bottom><![CDATA[<i>Copyright © 2006 Actuate Corp. All rights reserved. </i>]]></bottom>
<classpath refid="class.path" />
</javadoc>
</target>
<target name="doGenerateBuildScript">
<eclipse.buildScript elements="plugin@${module.name}" workingDirectory="${eclipse.home}" />
</target>
<target name="generateBuildScript">
<echo>Executing target generateBuildScript, eclipse.home=${eclipse.home}</echo>
<java classpath="${eclipse.home}/startup.jar" classname="org.eclipse.core.launcher.Main" fork="true" dir="." failonerror="true">
<arg line="-application org.eclipse.ant.core.antRunner -file BuildDesignerCore.xml doGenerateBuildScript -Declipse.home=${eclipse.home} -Dclean=true" />
</java>
<delete dir="workspace" />
</target>
<target name="buildDependents">
<ant dir="${core.dir}" antfile="BuildCore.xml" target="Jar" inheritAll="false">
<property name="eclipse.home" value="${eclipse.home}" />
</ant>
<ant dir="${model.dir}" antfile="BuildModel.xml" target="Jar" inheritAll="false">
<property name="eclipse.home" value="${eclipse.home}" />
</ant>
</target>
<!-- Class Path -->
<path id="class.path">
<pathelement path="${build.dir}" />
<fileset dir="${core.dir}">
<include name="*.jar" />
</fileset>
<fileset dir="${core.dir}/lib">
<include name="*.jar" />
</fileset>
<fileset dir="${model.dir}">
<include name="*.jar" />
</fileset>
<fileset dir="${model.dir}/lib">
<include name="*.jar" />
</fileset>
</path>
<target name="build" depends="buildDependents,generateBuildScript">
<ant inheritAll="false">
<property name="javacFailOnError" value="true" />
<property name="javacSource" value="1.4" />
<property name="javacTarget" value="1.4" />
<property name="os" value="${os}" />
<property name="ws" value="${ws}" />
<property name="arch" value="${arch}" />
</ant>
</target>
<target name="clearJars">
<delete>
<fileset dir=".">
<include name="${module.name}*.jar" />
</fileset>
</delete>
</target>
</project>
See more files for this project here