BuildChartDeviceSwt.xml from BIRT at Krugle
Show BuildChartDeviceSwt.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
*
*************************************************************************
*
* Build.xml
*
* Created on 03/15/2005
* Build script for project org.eclipse.birt.chart.device.extension
*
*
* 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.
*
* "utest" - Run unit tests
*
* Notes:
* 1. classpath need to be set for junit.jar
* 2. This file now requires Ant 1.6
*
* Change History:
*
* 1. 03/15/2005: initial version
*
-->
<project name="BIRT Chart Engine Project" default="build" basedir=".">
<description>BIRT Chart Device Swt 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
-->
<!-- ===== Default value for public properties ============= -->
<property file="META-INF/MANIFEST.MF" />
<property name="utest.report.dir" location="utestreports" />
<property name="javadoc.dir" location="docs/api" />
<property name="export.dir" location="export" />
<property name="dir.src" value="src" />
<property name="dir.bin" value="bin" />
<property name="dir.lib" value="lib" />
<property name="core.dir" location="../org.eclipse.birt.core"/>
<property name="chart.engine.dir" location="../org.eclipse.birt.chart.engine"/>
<property name="module.name" value="org.eclipse.birt.chart.device.swt"/>
<property name="jar.name" value="${module.name}_${Bundle-Version}.jar" />
<!-- set platform related properties-->
<condition property="basews" value="win32">
<os family="windows"/>
</condition>
<condition property="basews" value="gtk">
<not>
<os family="windows"/>
</not>
</condition>
<!-- set eclipse related properties -->
<property name="emf.common.dir" value="org.eclipse.emf.common" />
<property name="emf.ecore.dir" value="org.eclipse.emf.ecore" />
<property name="swt.dir" value="org.eclipse.swt" />
<path id="class.path">
<pathelement path="${dir.bin}"/>
<fileset dir="${eclipse.home}/plugins">
<include name="org.eclipse.core.runtime_*/runtime.jar"/>
<include name="org.eclipse.core.runtime*.jar"/>
<include name="org.eclipse.osgi_*/*.jar"/>
<include name="org.eclipse.osgi*.jar"/>
<include name="${emf.common.dir}_*/runtime/common.jar"/>
<include name="${emf.ecore.dir}_*/runtime/ecore.jar"/>
<include name="org.eclipse.emf.common_*.jar"/>
<include name="org.eclipse.emf.ecore_*.jar"/>
<include name="${swt.dir}.${basews}_*/ws/${basews}/swt.jar"/>
<include name="org.eclipse.swt*.jar"/>
<include name="com.ibm.icu_*.jar"/>
</fileset>
<fileset dir="../org.apache.commons.codec">
<include name="**/*.jar"/>
</fileset>
<fileset file="${core.dir}/*.jar" />
<fileset file="${chart.engine.dir}/org.eclipse.birt.chart.engine_*.jar"/>
</path>
<!-- Compile source code and generate jar for this project.
Input parameters:
eclipse.home
-->
<target name="Jar" depends="compileSource" description="create project jar">
<jar destfile="${jar.name}" manifest="./META-INF/MANIFEST.MF">
<fileset dir="${dir.bin}">
<include name="**/*.class" />
<include name="**/*.txt" />
<include name="**/*.xml" />
<include name="**/*.def" />
<include name="**/*.properties" />
</fileset>
<fileset dir="." includes="about.html,plugin.xml,.options,schema/**,lib/**"/>
</jar>
</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">
<copy todir="${export.dir}">
<fileset dir="." includes="${jar.name}"/>
</copy>
</target>
<!-- public task UnitTest will not explicitly depend on complie, Top level script should call compile before calling UnitTest
Run Unit test.
Parameters:
- ${utest.report.dir} target directory to put the unit test report
-->
<target name="UnitTest" depends="compileTest" description="run all the unit tests" />
<!-- Compile Test code -->
<target name="compileTest" />
<!-- Clean all objects created by this script -->
<target name="Clean" description="clean up">
<!-- Delete the binary directory trees -->
<delete dir="${dir.bin}"/>
<delete file="${jar.name}"/>
</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 Chart Device Swt Project"
source="1.4"
packagenames="${module.name}.*">
<packageset dir="${dir.src}" defaultexcludes="yes" />
<bottom><![CDATA[<i>Copyright © 2004 Actuate Corp. All rights reserved. </i>]]></bottom>
<classpath refid="class.path" />
</javadoc>
</target>
<!-- Compile Source Files -->
<target name="compileSource" depends="buildDependency">
<mkdir dir="${dir.bin}"/>
<!-- copy any resource file we needed into the dir.bin directory-->
<copy todir="${dir.bin}">
<fileset dir="${dir.src}">
<include name="**/*.txt"/>
<include name="**/*.xml"/>
<include name="**/*.properties"/>
</fileset>
</copy>
<!-- Compile the java code from ${dir.src} into ${dir.bin} -->
<javac srcdir="${dir.src}"
destdir="${dir.bin}"
encoding="utf-8"
source="1.4"
debug="true">
<classpath refid="class.path"/>
</javac>
</target>
<!-- Build the dependent projects -->
<target name="buildDependency">
<echo message="start call Jar task in ${chart.engine.dir}"/>
<ant dir="${chart.engine.dir}" antfile="BuildChartEngine.xml" target="Jar" inheritAll="false" inheritRefs="false" >
<property name="eclipse.home" value="${eclipse.home}" />
</ant>
<echo message="end call Jar task in ${chart.engine.dir}"/>
</target>
<target name="build" depends="Jar" description="package engine and model file" />
</project>
See more files for this project here