1 Star 0 Fork 0

牧师/kettle

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
build.xml 40.69 KB
一键复制 编辑 原始数据 按行查看 历史
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011
<project name="Kettle" default="default" basedir=".">
<description>
Kettle build file
</description>
<tstamp prefix="start"/>
<tstamp>
<format property="compile.timestamp" pattern="yyyy-MM-dd HH.mm.ss" />
</tstamp>
<!-- Look for user-override properties file first -->
<property file="override.properties"/>
<!-- set global properties for this build -->
<property file="build.properties"/>
<target name="init" description="create timestamp and directories">
<echo>Init...</echo>
<tstamp/>
<mkdir dir="${build}"/>
<mkdir dir="${classes}"/>
<mkdir dir="${classes}/META-INF"/>
<mkdir dir="${classes-ui}"/>
<mkdir dir="${classes-ui}/ui"/>
<mkdir dir="${classes-core}"/>
<mkdir dir="${classes-db}"/>
<mkdir dir="${testClasses}"/>
<mkdir dir="${lib}"/>
<mkdir dir="${distrib}"/>
<mkdir dir="${macdistrib}"/>
<mkdir dir="${docs}"/>
<mkdir dir="${api}"/>
<mkdir dir="${webstart}"/>
<mkdir dir="${junit}"/>
<!-- used by the nightly build. we can build zips directly to this location -->
<mkdir dir="${dist.dir}"/>
<exec executable="get-revision.sh"
os="Linux,OSX"
outputproperty="svn-revision"
failonerror="false"
timeout="20000"
failifexecutionfails="false"
resolveexecutable="true"
spawn="false"
/>
<condition property="revision" value="${svn-revision}" else="1">
<length string="${svn-revision}" length="7" when="less"/>
</condition>
<echo message="Revision set to r${revision}"/>
</target>
<!--
==========================
Compile the code
==========================
-->
<target name="compile-core" depends="init" description="compile the core source code " >
<echo>Compiling Kettle CORE...</echo>
<javac fork="true"
destdir="${classes-core}"
target="5"
source="5"
deprecation="true"
debug="${debug}"
optimize="${optimize}"
memorymaximumsize="256m"
includeantruntime="false">
<src path="${src-core}"/>
<classpath id="cp-kettle-core">
<fileset dir="${libext}" includes="*.jar *.zip"/>
<fileset dir="${libext}/" includes="**/*.jar *.zip"/>
</classpath>
</javac>
</target>
<target name="compile-db" depends="compile-core" description="compile the db source code " >
<echo>Compiling Kettle DB...</echo>
<javac fork="true"
destdir="${classes-db}"
target="5"
source="5"
deprecation="true"
debug="${debug}"
optimize="${optimize}"
memorymaximumsize="256m"
includeantruntime="false">
<src path="${src-db}"/>
<classpath id="cp-kettle-db">
<pathelement path="${classes-core}"/>
<pathelement path="${classes-db}"/>
<fileset dir="${libext}" includes="*.jar *.zip"/>
<fileset dir="${libext}/" includes="**/*.jar *.zip"/>
</classpath>
</javac>
</target>
<target name="compile" depends="compile-db" description="compile the source " >
<echo>Compiling Kettle...</echo>
<javac fork="true"
destdir="${classes}"
target="5"
source="5"
deprecation="true"
debug="${debug}"
optimize="${optimize}"
memorymaximumsize="256m"
includeantruntime="false">
<src path="${src}"/>
<classpath id="cp-kettle">
<pathelement path="${classes-core}"/>
<pathelement path="${classes-db}"/>
<fileset dir="${libext}" includes="*.jar *.zip"/>
<fileset dir="${libext}/" includes="**/*.jar *.zip"/>
</classpath>
</javac>
</target>
<target name="compile-ui" depends="compile-db, compile" description="compile the UI source " >
<echo>Compiling Kettle UI...</echo>
<javac
destdir="${classes-ui}"
target="5"
source="5"
deprecation="true"
debug="${debug}"
optimize="${optimize}"
excludes="be/ibridge/kettle/schema/**/* be/ibridge/kettle/menu/**/*"
memorymaximumsize="256M"
fork="true"
includeantruntime="false"
>
<src path="${src-ui}"/>
<classpath id="cp-kettle-ui">
<fileset dir="${lib}" includes="kettle-core.jar"/>
<fileset dir="${lib}" includes="kettle-db.jar"/>
<fileset dir="${lib}" includes="kettle-engine.jar"/>
<fileset dir="${libext}" includes="*.jar *.zip"/>
<fileset dir="${libext}/" includes="**/*.jar *.zip"/>
<fileset dir="${libswt}" includes="*.jar *.zip"/>
<fileset dir="${libswt}/win32/" includes="*.jar *.zip"/>
</classpath>
</javac>
<copy todir="${classes-ui}">
<fileset dir="${src-ui}" includes="**/*.png **/*.xml **/*.xul **/*txt **/*properties"/>
</copy>
<!-- embedd the UI definition files in the jar so that webstart will work -->
<copy todir="${classes-ui}/ui">
<fileset dir="${ui}" includes="**/*.png **/*.xml **/*.xul **/*.properties"/>
</copy>
</target>
<!--
==========================
Compile the test code
==========================
-->
<target name="compileTests" depends="compile" description="compile the tests" >
<echo>Compiling Kettle tests...</echo>
<javac fork="true"
srcdir="${test}"
destdir="${testClasses}"
target="5"
source="5"
deprecation="true"
debug="true"
includeantruntime="false"
>
<classpath id="cp-kettle-test">
<fileset dir="${lib}" includes="**/*.jar"/>
<fileset dir="${testlibext}" includes="*.jar"/>
<fileset dir="${libext}" includes="**/*.jar"/>
<fileset dir="${libswt}" includes="common.jar"/>
</classpath>
</javac>
</target>
<!--
==========================
Copy additional files
==========================
-->
<target name="copy-core" depends="compile-core" description="copy images etc from the src-core to the classes-core directory" >
<echo>Copying core images etc to classes directory...</echo>
<copy todir="${classes-core}">
<fileset dir="${src-core}" includes="**/*.xml **/*.xsl **/*properties"/>
</copy>
</target>
<target name="copy-db" depends="compile-db" description="copy images etc from the src-db to the classes-db directory" >
<echo>Copying db images etc to classes-db directory...</echo>
<copy todir="${classes-db}">
<fileset dir="${src-db}" includes="**/*.xml **/*properties"/>
</copy>
</target>
<target name="copy" depends="compile" description="copy images etc to the classes directory" >
<echo>Copying images etc to classes directory...</echo>
<copy todir="${classes}">
<fileset dir="${src}" includes="**/*.xml **/*.xsl **/*properties"/>
</copy>
<copy todir="${classes}">
<fileset file="${version.file}"/>
</copy>
<copy todir="${classes}/META-INF">
<fileset file="${src}/kettle-partition-plugins.xml"/>
</copy>
</target>
<!--
==========================
javadoc of the source
==========================
-->
<target name="javadoc" depends="compile" description="compile the javadoc api" >
<echo>Compiling the Kettle core API javadocs...</echo>
<javadoc
destdir="${api-core}"
access="public"
source="1.5"
use="true"
notree="false"
nonavbar="false"
noindex="false"
splitindex="true"
author="true"
version="true"
maxmemory="256M"
nodeprecatedlist="false"
nodeprecated="false"
packagenames ="org.pentaho.di.*"
sourcepath="${src-core}"
doctitle="Kettle core API documentation">
<link href="http://java.sun.com/j2se/1.5.0/docs/api/"/>
<classpath refid="cp-kettle"/>
</javadoc>
<javadoc
destdir="${api}"
access="public"
source="1.5"
use="true"
notree="false"
nonavbar="false"
noindex="false"
splitindex="true"
author="true"
version="true"
maxmemory="256M"
nodeprecatedlist="false"
nodeprecated="false"
packagenames ="org.pentaho.di.*"
sourcepath="${src}"
doctitle="Kettle API documentation">
<link href="http://java.sun.com/j2se/1.5.0/docs/api/"/>
<classpath refid="cp-kettle"/>
</javadoc>
</target>
<target name="javadoc_zip" depends="javadoc" description="generate a zip file containing the Kettle javadoc">
<echo>Generating the Kettle javadoc zip file ...</echo>
<jar jarfile="${dist.dir}/${product.name}-${product.release.type}-javadoc-${release.version}${release.status.token}.zip"
basedir="${docs}"
includes="api/**/* api-core/**/*"
excludes="**/Thumbs.db"
/>
</target>
<!--
==========================
Kettle library
==========================
-->
<target name="kettle-core" depends="compile-core, copy-core" description="generate the kettle core library kettle-core.jar">
<echo>Generating the Kettle core library kettle-core.jar ...</echo>
<jar jarfile="${lib}/kettle-core.jar"
basedir="${classes-core}"
includes="**/* ${version.file.path}"
excludes="**/Thumbs.db **/*.jar **/*.swp"
>
<manifest>
<attribute name="Implementation-Title" value="${impl.title.engine}" />
<attribute name="Implementation-Version" value="${impl.version}" />
<attribute name="Specification-Version" value="${revision}" />
<attribute name="Implementation-Vendor" value="${impl.vendor}" />
<attribute name="Implementation-ProductID" value="${impl.productID}" />
<attribute name="Compile-Timestamp" value="${compile.timestamp}" />
<attribute name="Compile-User" value="${user.name}" />
</manifest>
</jar>
</target>
<target name="kettle-db" depends="compile-db, copy-db" description="generate the kettle db library kettle-db.jar">
<echo>Generating the Kettle DB library kettle-db.jar ...</echo>
<jar jarfile="${lib}/kettle-db.jar"
basedir="${classes-db}"
includes="**/* ${version.file.path}"
excludes="**/Thumbs.db **/*.jar **/*.swp"
>
<manifest>
<attribute name="Implementation-Title" value="${impl.title.engine}" />
<attribute name="Implementation-Version" value="${impl.version}" />
<attribute name="Specification-Version" value="${revision}" />
<attribute name="Implementation-Vendor" value="${impl.vendor}" />
<attribute name="Implementation-ProductID" value="${impl.productID}" />
<attribute name="Compile-Timestamp" value="${compile.timestamp}" />
<attribute name="Compile-User" value="${user.name}" />
</manifest>
</jar>
</target>
<target name="kettle" depends="compile, copy" description="generate the kettle library kettle-engine.jar">
<echo>Generating the Kettle library kettle-engine.jar ...</echo>
<jar jarfile="${lib}/kettle-engine.jar"
basedir="${classes}"
includes="**/* ${version.file.path}"
excludes="**/Thumbs.db **/*.jar **/derbyOld/* **/derbyNew/* org/pentaho/di/run/**/*.ktr org/pentaho/di/run/**/*.txt org/pentaho/di/run/**/*.xls org/pentaho/di/run/**/*.swp org/pentaho/di/ui/**/*"
>
<manifest>
<attribute name="Implementation-Title" value="${impl.title.engine}" />
<attribute name="Implementation-Version" value="${impl.version}" />
<attribute name="Specification-Version" value="${revision}" />
<attribute name="Implementation-Vendor" value="${impl.vendor}" />
<attribute name="Implementation-ProductID" value="${impl.productID}" />
<attribute name="Compile-Timestamp" value="${compile.timestamp}" />
<attribute name="Compile-User" value="${user.name}" />
</manifest>
</jar>
</target>
<target name="kettle-ui" depends="compile-ui" description="generate the kettle library kettle-ui-swt.jar">
<echo>Generating the Kettle library kettle-ui-swt.jar ...</echo>
<jar jarfile="${lib}/kettle-ui-swt.jar"
basedir="${classes-ui}"
includes="**/* ${version.file.path}"
excludes="**/Thumbs.db **/kettle.jar">
<manifest>
<attribute name="Implementation-Title" value="${impl.title.ui}" />
<attribute name="Implementation-Version" value="${impl.version}" />
<attribute name="Specification-Version" value="${revision}" />
<attribute name="Implementation-Vendor" value="${impl.vendor}" />
<attribute name="Implementation-ProductID" value="${impl.productID}" />
<attribute name="Compile-Timestamp" value="${compile.timestamp}" />
<attribute name="Compile-User" value="${user.name}" />
</manifest>
</jar>
</target>
<target name="kettle-test" depends="compileTests" description="generate the kettle library kettle-test.jar">
<echo>Generating the Kettle library kettle-test.jar ...</echo>
<jar jarfile="${lib}/kettle-test.jar"
basedir="${testClasses}"
includes="**/* ${version.file.path}"
excludes="**/Thumbs.db **/*.jar **/*.swp">
<manifest>
<attribute name="Implementation-Title" value="${impl.title.ui}" />
<attribute name="Implementation-Version" value="${impl.version}" />
<attribute name="Specification-Version" value="${revision}" />
<attribute name="Implementation-Vendor" value="${impl.vendor}" />
<attribute name="Implementation-ProductID" value="${impl.productID}" />
<attribute name="Compile-Timestamp" value="${compile.timestamp}" />
<attribute name="Compile-User" value="${user.name}" />
</manifest>
</jar>
</target>
<!--
==========================
Distribution jar package
==========================
-->
<target name="distrib" depends="kettle-core, kettle-db, kettle, kettle-ui, kettle-test" description="copy jar file to distribution directory" >
<echo>Construct the distribution package...</echo>
<!-- root directory -->
<mkdir dir="${distrib}"/>
<copy todir="${distrib}">
<fileset dir="${bin}" includes="**/*" excludes="**/.vpn .project .classpath"/>
</copy>
<!-- base lib -->
<mkdir dir="${distrib}/lib"/>
<copy todir="${distrib}/lib" file="${lib}/kettle-core.jar"/>
<copy todir="${distrib}/lib" file="${lib}/kettle-db.jar"/>
<copy todir="${distrib}/lib" file="${lib}/kettle-engine.jar"/>
<copy todir="${distrib}/lib" file="${lib}/kettle-ui-swt.jar"/>
<copy todir="${distrib}/lib" file="${lib}/kettle-test.jar"/>
<!-- external libs (jdbc etc) -->
<mkdir dir="${distrib}/libext"/>
<copy todir="${distrib}/libext">
<fileset dir="${libext}" includes="**/*.jar **/*.zip **/*.properties" excludes="**/.vpn"/>
</copy>
<!-- swt libs (jdbc etc) -->
<mkdir dir="${distrib}/libswt"/>
<copy todir="${distrib}/libswt">
<fileset dir="${libswt}" includes="**/*" excludes="**/.vpn **/sapjco*.dll"/>
</copy>
<!-- plugins -->
<mkdir dir="${distrib}/plugins"/>
<copy todir="${distrib}/plugins">
<fileset dir="${plugins}" includes="**/*" excludes="**/.vpn **/sapjco.jar **/VTVLInput **/VTVLInput/*"/>
</copy>
<!-- ui -->
<mkdir dir="${distrib}/ui"/>
<copy todir="${distrib}/ui">
<fileset dir="${ui}" includes="**/*" excludes="**/.vpn"/>
</copy>
<!-- documentation -->
<mkdir dir="${distrib}/docs"/>
<copy todir="${distrib}/docs">
<fileset dir="${docs}"
includes="**/*.pdf **/*.htm **/*.html **/*.png **/*.PNG **/*.swf **/cn_ZN.zip **/*.css **/*.gif **/*.jpg"
excludes="**/*.dot **/*.doc **/*.sxw **/*.odt **/*.vpn **/*feature list*" />
</copy>
<!-- pwd -->
<mkdir dir="${distrib}/pwd"/>
<copy todir="${distrib}/pwd">
<fileset dir="${pwd}"
includes="**/*.pwd **/*.xml"
excludes="**/*.vpn" />
</copy>
<!-- launcher -->
<mkdir dir="${distrib}/launcher"/>
<copy todir="${distrib}/launcher">
<fileset dir="launcher"
includes="**/*.*"
excludes="**/*.vpn" />
</copy>
<!-- simple-jndi -->
<mkdir dir="${distrib}/simple-jndi"/>
<copy todir="${distrib}/simple-jndi">
<fileset dir="${simple-jndi}"
includes="**/*.properties"
excludes="**/*.vpn" />
</copy>
<!-- samples -->
<mkdir dir="${distrib}/samples"/>
<mkdir dir="${distrib}/samples/transformations"/>
<mkdir dir="${distrib}/samples/jobs"/>
<mkdir dir="${distrib}/samples/transformations/output"/>
<mkdir dir="${distrib}/samples/jobs/output"/>
<copy todir="${distrib}/samples">
<fileset dir="${samples}"
includes="**/*.*"
excludes="**/.svn"/>
</copy>
<!-- make JavaApplicationStub executable for OSX -->
<chmod file="${distrib}/Data Integration 32-bit.app/Contents/MacOS/JavaApplicationStub" perm="ugo+rx"/>
<chmod file="${distrib}/Data Integration 64-bit.app/Contents/MacOS/JavaApplicationStub" perm="ugo+rx"/>
</target>
<!--
==========================
zipfile
==========================
-->
<target name="zip" depends="distrib" description="generate the ${impl.productID}-${version}-r${revision}.zip file">
<echo>Generating the Kettle distribution package ${impl.productID}-${version}-r${revision}.zip ...</echo>
<jar jarfile="${dist.dir}/${impl.productID}-${version}-r${revision}.zip"
basedir="${distrib}"
includes="**/*"
excludes="docs/api/** docs/api-core/** **/Thumbs.db"
/>
</target>
<!--
==========================
targz file
==========================
-->
<target name="targz" depends="distrib" description="generate the ${impl.productID}-${version}-r${revision}.tar.gz file">
<echo>Generating the Kettle distribution package ${impl.productID}-${version}-r${revision}.tar.gz ...</echo>
<tar destfile="${dist.dir}/${impl.productID}-${version}-r${revision}.tar.gz" longfile="gnu" compression="gzip">
<tarfileset dir="${distrib}" mode="755" excludes="docs/api/** docs/api-core/** **/Thumbs.db">
<include name="**/*.sh" />
<include name="**/JavaApplicationStub" />
</tarfileset>
<tarfileset dir="${distrib}" excludes="docs/api/** docs/api-core/** **/Thumbs.db">
<exclude name="**/*.sh" />
<exclude name="**/JavaApplicationStub" />
</tarfileset>
</tar>
</target>
<!--
==========================
Source zipfile
==========================
-->
<target name="sourcezip" depends="init" description="generate the Kettle-src-${version}-${release.build.number}-r${revision}.zip file">
<echo>Generating the Kettle source packge zip file (${impl.productID}-src-${version}-r${revision}.zip) ...</echo>
<jar jarfile="${dist.dir}/${impl.productID}-src-${version}-r${revision}.zip"
basedir="."
includes="**/*"
excludes="*.zip ${classes}/**/* ${distrib}/**/* homepage/**/* Licenses/**/* ${lib}/**/* ${webstart}/**/* docs/api/** docs/api-core/**"
/>
</target>
<!--
==========================
Webstart part...
==========================
-->
<target name="copy2webstart" depends="init, kettle, kettle-ui" description="Copy resources to webstart">
<echo>Copying resources to webstart...</echo>
<copy todir="${webstart}/libext">
<fileset dir="${libext}" includes="**/*.jar" excludes="mail.jar web/activation.jar"/>
</copy>
<copy todir="${webstart}/libswt">
<fileset dir="${libswt}" includes="**/*.jar" excludes="commands.jar common.jar jface.jar runtime.jar"/>
</copy>
<copy todir="${webstart}/">
<fileset dir="${bin}" includes="**/*.xml"/>
</copy>
<copy todir="${webstart}/lib">
<fileset dir="${lib}" includes="**/*.jar"/>
</copy>
<copy todir="${webstart}/ui">
<fileset dir="${ui}" includes="**/*" excludes="**/.vpn"/>
</copy>
<copy todir="${webstart}/plugins">
<fileset dir="${plugins}" includes="**/*"/>
</copy>
<copy todir="${webstart}">
<fileset dir="${src}/org/pentaho/di/images/" includes="kettle_logo.png"/>
</copy>
<jar destfile="${webstart}/libswt/win32/libs.jar">
<fileset dir="${libswt}/win32" includes="**/*.dll"/>
<fileset dir="${libswt}/win32" includes="**/*.manifest"/>
</jar>
<jar destfile="${webstart}/libswt/linux/libs.jar">
<fileset dir="${libswt}/linux" includes="**/*.so"/>
</jar>
<jar destfile="${webstart}/libswt/solaris/libs.jar">
<fileset dir="${libswt}/solaris" includes="**/*.so"/>
</jar>
<jar destfile="${webstart}/libswt/aix/libs.jar">
<fileset dir="${libswt}/aix" includes="**/*.a"/>
</jar>
<jar destfile="${webstart}/libswt/osx/libs.jar">
<fileset dir="${libswt}/osx" includes="**/*.jnilib"/>
<fileset dir="${libswt}/osx" includes="**/java_swt"/>
</jar>
</target>
<!---
src
src-ui
lib/
libswt/win32
libswt/linux
libswt/*.jar
libext/log4j-1.2.8.jar
libext/spring
libext/commons/commons-vfs*
libext/commons/commons-logging*
ui
Translator.bat
translator.sh
-->
<target name="i18n" depends="kettle-ui" description="generate the Kettle-i18n-${version}-r${revision}.zip file">
<echo>Generating the Kettle i18n distribution package Kettle-i18n-${version}-r${revision}.zip ...</echo>
<jar jarfile="${dist.dir}/Kettle-i18n-${version}-r${revision}.zip"
basedir="."
includes="src/**/*.java src/**/*.properties src-ui/**/*.java src-ui/**/*.properties lib/*.jar libswt/win32/*.jar libswt/linux/x86/*.jar libswt/*.jar libext/log4j-1.2.8.jar libext/spring/spring-core.jar libext/commons/commons-vfs*.jar libext/commons/commons-logging*.jar ui/*.xul Translator.bat translator.sh translator.xml"
excludes="**/Thumbs.db **/.svn"
/>
</target>
<target name="keystore" depends="copy2webstart" description="Create the keystore...">
<echo>Create the keystore...</echo>
<exec executable="keytool">
<arg line="-genkey -keyalg RSA -alias kettle -keystore &quot;${keystore}&quot; -storepass &quot;${keystorePassword}&quot; -keypass &quot;${keystorePassword}&quot; -dname &quot;CN=Matt Casters, OU=Pentaho Corporation, O=Pentaho Data Integration, L=Orlando, S=FL, C=US&quot;"/>
</exec>
</target>
<target name="sign-jars" depends="keystore" description="Sign all used jars">
<echo>Signing JARS...</echo>
<signjar keystore="${keystore}" alias="kettle" storepass="${keystorePassword}">
<fileset dir="${webstart}" includes="**/*.jar"/>
</signjar>
<!-- for jars that are already signed by other parties, copy the originals back over -->
<echo>Copying third-party signed jars</echo>
<copy todir="${webstart}/libext">
<fileset dir="${libext}" includes="mail.jar web/activation.jar"/>
</copy>
<copy todir="${webstart}/libswt">
<fileset dir="${libswt}" includes="commands.jar common.jar jface.jar runtime.jar"/>
</copy>
</target>
<target name="webstart" depends="sign-jars" description="Package WAR">
<echo>Create the webstart WAR file...</echo>
<war destfile="${webstart}/${impl.productID}-${version}.war" webxml="${web}/web.xml" compress="true">
<fileset dir="${web}">
<include name="**/*.html"/>
<include name="**/*.jnlp"/>
<exclude name="**/*.xml"/>
</fileset>
<fileset dir="${webstart}">
<include name="**/*.jar"/>
<include name="**/*.properties"/>
<include name="**/repositories.xml"/>
<include name="**/*.xul"/>
<include name="images/*"/>
<include name="kettle_logo.png"/>
<exclude name="${keystore}"/>
<exclude name="kettle.war"/>
</fileset>
</war>
</target>
<!--
===========================================
tests : junit core tests
============================================
-->
<target name="tests-core" depends="compileTests" description="Execute the core tests">
<junit printsummary="no" fork="yes" forkmode="perTest" jvm="java" maxmemory="512M" showoutput="yes">
<classpath>
<fileset dir="${lib}" includes="kettle-core.jar"/>
<fileset dir="${lib}" includes="kettle-db.jar"/>
<fileset dir="${lib}" includes="kettle-engine.jar"/>
<fileset dir="test/libext/" includes="kettle.jar"/>
<pathelement path="${testClasses}"/>
<fileset dir="${libext}" includes="*.jar *.zip"/>
<fileset dir="${libext}/" includes="**/*.jar *.zip"/>
<fileset dir="${libswt}" includes="*.jar *.zip"/>
<fileset dir="${libswt}/win32/" includes="*.jar *.zip"/>
</classpath>
<formatter type="xml"/>
<test todir="${junit}" name="org.pentaho.di.compatibility.ValueBigNumberTest" haltonerror="false" />
<test todir="${junit}" name="org.pentaho.di.compatibility.ValueBooleanTest" haltonerror="false" />
<test todir="${junit}" name="org.pentaho.di.compatibility.ValueDateTest" haltonerror="false" />
<test todir="${junit}" name="org.pentaho.di.compatibility.ValueIntegerTest" haltonerror="false" />
<test todir="${junit}" name="org.pentaho.di.compatibility.ValueNumberTest" haltonerror="false" />
<test todir="${junit}" name="org.pentaho.di.compatibility.ValueStringTest" haltonerror="false" />
<test todir="${junit}" name="org.pentaho.di.compatibility.ValueTest" haltonerror="false" />
<test todir="${junit}" name="org.pentaho.di.core.database.DatabaseTest" haltonerror="false" />
<test todir="${junit}" name="org.pentaho.di.core.database.SelectCountTests" haltonerror="false" />
<test todir="${junit}" name="org.pentaho.di.core.database.SQLStatementParserTest" haltonerror="false" />
<test todir="${junit}" name="org.pentaho.di.core.database.ReleaseSavePointTest" haltonerror="false" />
<test todir="${junit}" name="org.pentaho.di.core.encryption.EncrTest" haltonerror="false" />
<test todir="${junit}" name="org.pentaho.di.core.row.RowDataUtilTest" haltonerror="false" />
<test todir="${junit}" name="org.pentaho.di.core.row.RowTest" haltonerror="false" />
<test todir="${junit}" name="org.pentaho.di.core.row.ValueDataUtilTest" haltonerror="false" />
<test todir="${junit}" name="org.pentaho.di.core.row.ValueMetaTest" haltonerror="false" />
<test todir="${junit}" name="org.pentaho.di.core.util.StringUtilTest" haltonerror="false" />
<test todir="${junit}" name="org.pentaho.di.core.ConstTest" haltonerror="false" />
<test todir="${junit}" name="org.pentaho.di.core.CountersTest" haltonerror="false" />
<test todir="${junit}" name="org.pentaho.di.core.CounterTest" haltonerror="false" />
<test todir="${junit}" name="org.pentaho.di.core.RowSetTest" haltonerror="false" />
</junit>
</target>
<!--
===========================================
tests : junit kitchen tests
============================================
-->
<target name="tests-kitchen" depends="compileTests" description="Execute the kitchen tests">
<junit printsummary="no" fork="yes" forkmode="perTest" jvm="java" maxmemory="512M" showoutput="yes">
<classpath>
<fileset dir="${lib}" includes="kettle-core.jar" />
<fileset dir="${lib}" includes="kettle-db.jar" />
<fileset dir="${lib}" includes="kettle-engine.jar" />
<fileset dir="test/libext/" includes="kettle.jar" />
<pathelement path="${testClasses}" />
<fileset dir="${libext}" includes="*.jar *.zip" />
<fileset dir="${libext}/" includes="**/*.jar *.zip" />
<fileset dir="${libswt}" includes="*.jar *.zip" />
<fileset dir="${libswt}/win32/" includes="*.jar *.zip" />
</classpath>
<formatter type="xml" />
<test todir="${junit}" name="org.pentaho.di.kitchen.KitchenTest" haltonerror="false" />
</junit>
</target>
<!--
===========================================
tests : junit resource tests
============================================
-->
<target name="tests-resource" depends="compileTests" description="Execute the resource tests">
<junit printsummary="no" fork="yes" forkmode="perTest" jvm="java" maxmemory="512M" showoutput="yes">
<classpath>
<fileset dir="${lib}" includes="kettle-core.jar"/>
<fileset dir="${lib}" includes="kettle-db.jar"/>
<fileset dir="${lib}" includes="kettle-engine.jar"/>
<fileset dir="test/libext/" includes="kettle.jar"/>
<pathelement path="${testClasses}"/>
<fileset dir="${libext}" includes="*.jar *.zip"/>
<fileset dir="${libext}/" includes="**/*.jar *.zip"/>
<fileset dir="${libswt}" includes="*.jar *.zip"/>
<fileset dir="${libswt}/win32/" includes="*.jar *.zip"/>
</classpath>
<formatter type="xml"/>
<test todir="${junit}" name="org.pentaho.di.resource.ResourceExportTest" haltonerror="false" />
<test todir="${junit}" name="org.pentaho.di.resource.ResourceDependencyTest" haltonerror="false" />
</junit>
</target>
<!--
===========================================
tests : junit transformation tests
============================================
-->
<target name="tests-trans" depends="compileTests" description="Execute the transformation tests">
<junit printsummary="no" fork="yes" forkmode="perTest" jvm="java" maxmemory="512M" showoutput="yes">
<classpath>
<fileset dir="${lib}" includes="kettle-core.jar"/>
<fileset dir="${lib}" includes="kettle-db.jar"/>
<fileset dir="${lib}" includes="kettle-engine.jar"/>
<fileset dir="test/libext/" includes="kettle.jar"/>
<pathelement path="${testClasses}"/>
<fileset dir="${libext}" includes="*.jar *.zip"/>
<fileset dir="${libext}/" includes="**/*.jar *.zip"/>
<fileset dir="${libswt}" includes="*.jar *.zip"/>
<fileset dir="${libswt}/win32/" includes="*.jar *.zip"/>
</classpath>
<formatter type="xml"/>
<test todir="${junit}" name="org.pentaho.di.trans.HopTest" haltonerror="false" />
<test todir="${junit}" name="org.pentaho.di.trans.RowProducerTest" haltonerror="false" />
<test todir="${junit}" name="org.pentaho.di.trans.steps.addsequence.AddSequenceTest" haltonerror="false" />
<test todir="${junit}" name="org.pentaho.di.trans.steps.append.AppendTest" haltonerror="false" />
<test todir="${junit}" name="org.pentaho.di.trans.steps.blockingstep.BlockingStepTest" haltonerror="false" />
<test todir="${junit}" name="org.pentaho.di.trans.steps.checksum.CheckSumTest" haltonerror="false" />
<test todir="${junit}" name="org.pentaho.di.trans.steps.combinationlookup.CombinationLookupTest" haltonerror="false" />
<test todir="${junit}" name="org.pentaho.di.trans.steps.constant.ConstantTest" haltonerror="false" />
<test todir="${junit}" name="org.pentaho.di.trans.steps.csvinput.CsvInput1Test" haltonerror="false" />
<test todir="${junit}" name="org.pentaho.di.trans.steps.csvinput.CsvInput2Test" haltonerror="false" />
<test todir="${junit}" name="org.pentaho.di.trans.steps.databaselookup.DatabaseLookupTest" haltonerror="false" />
<test todir="${junit}" name="org.pentaho.di.trans.steps.detectlastrow.DetectLastRowStepTest" haltonerror="false" />
<test todir="${junit}" name="org.pentaho.di.trans.steps.excelinput.JxlWorkBookTest" haltonerror="false" />
<test todir="${junit}" name="org.pentaho.di.trans.steps.excelinput.OdsWorkBookTest" haltonerror="false" />
<test todir="${junit}" name="org.pentaho.di.trans.steps.excelinput.PoiWorkBookTest" haltonerror="false" />
<test todir="${junit}" name="org.pentaho.di.trans.steps.getxmldata.GetXMLDataTest" haltonerror="false" />
<test todir="${junit}" name="org.pentaho.di.trans.steps.injector.InjectorTest" haltonerror="false" />
<test todir="${junit}" name="org.pentaho.di.trans.steps.insertupdate.InsertUpdateTest" haltonerror="false" />
<test todir="${junit}" name="org.pentaho.di.trans.steps.mapping.RunMapping" haltonerror="false" />
<test todir="${junit}" name="org.pentaho.di.trans.steps.mapping.MappingTest" haltonerror="false" />
<test todir="${junit}" name="org.pentaho.di.trans.steps.metainject.MetaInjectTest" haltonerror="false" />
<test todir="${junit}" name="org.pentaho.di.trans.steps.nullif.NullIfTest" haltonerror="false" />
<test todir="${junit}" name="org.pentaho.di.trans.steps.numberrange.NumberRangeRuleTest" haltonerror="false" />
<test todir="${junit}" name="org.pentaho.di.trans.steps.numberrange.NumberRangeSetTest" haltonerror="false" />
<test todir="${junit}" name="org.pentaho.di.trans.steps.regexeval.RegexEvalTest" haltonerror="false" />
<test todir="${junit}" name="org.pentaho.di.trans.steps.rowgenerator.RowGeneratorTest" haltonerror="false" />
<test todir="${junit}" name="org.pentaho.di.trans.steps.scriptvalues_mod.JavaScriptSpecialTest" haltonerror="false" />
<test todir="${junit}" name="org.pentaho.di.trans.steps.scriptvalues_mod.JavaScriptStringTest" haltonerror="false" />
<test todir="${junit}" name="org.pentaho.di.trans.steps.sort.SortRowsTest" haltonerror="false" />
<test todir="${junit}" name="org.pentaho.di.trans.steps.tableoutput.TableOutputTest" haltonerror="false" />
<test todir="${junit}" name="org.pentaho.di.trans.steps.tableinput.TableInputTest" haltonerror="false" />
<test todir="${junit}" name="org.pentaho.di.trans.steps.textfileinput.TextFileInputTests" haltonerror="false" />
<test todir="${junit}" name="org.pentaho.di.trans.steps.unique.UniqueRowsTest" haltonerror="false" />
<test todir="${junit}" name="org.pentaho.di.trans.steps.update.UpdateTest" haltonerror="false" />
<test todir="${junit}" name="org.pentaho.di.trans.steps.valuemapper.ValueMapperTest" haltonerror="false" />
</junit>
</target>
<!--
===========================================
tests : junit black box tests
============================================
-->
<target name="tests-blackbox" depends="compileTests" description="Execute the black box transformation tests">
<junit printsummary="no" fork="yes" forkmode="perTest" jvm="java" maxmemory="512M" showoutput="yes">
<classpath>
<fileset dir="${lib}" includes="kettle-core.jar"/>
<fileset dir="${lib}" includes="kettle-db.jar"/>
<fileset dir="${lib}" includes="kettle-engine.jar"/>
<!-- fileset dir="test/libext/" includes="junit.jar"/ -->
<pathelement path="${testClasses}"/>
<fileset dir="${libext}" includes="*.jar *.zip"/>
<fileset dir="${libext}/" includes="**/*.jar *.zip"/>
<fileset dir="${libswt}" includes="*.jar *.zip"/>
<fileset dir="${libswt}/win32/" includes="*.jar *.zip"/>
</classpath>
<formatter type="xml"/>
<test todir="${junit}" name="org.pentaho.di.blackbox.BlackBoxTests" haltonerror="false" />
</junit>
</target>
<!--
===========================================
tests : junit run tests
============================================
-->
<target name="tests-run" depends="compileTests" description="Execute the transformation run tests">
<junit printsummary="no" fork="yes" forkmode="perTest" jvm="java" maxmemory="512M" showoutput="yes">
<classpath>
<fileset dir="${lib}" includes="kettle-core.jar"/>
<fileset dir="${lib}" includes="kettle-db.jar"/>
<fileset dir="${lib}" includes="kettle-engine.jar"/>
<fileset dir="${lib}" includes="kettle-ui-swt.jar"/>
<fileset dir="test/libext/" includes="jetty-servlet-tester-*.jar"/>
<pathelement path="${testClasses}"/>
<fileset dir="${libext}" includes="*.jar *.zip"/>
<fileset dir="${libext}/" includes="**/*.jar *.zip"/>
<fileset dir="${libswt}" includes="*.jar *.zip"/>
<fileset dir="${libswt}/win32/" includes="*.jar *.zip"/>
</classpath>
<formatter type="xml"/>
<test todir="${junit}" name="org.pentaho.di.cluster.MasterSlaveTest" haltonerror="false" />
<test todir="${junit}" name="org.pentaho.di.cluster.PartitioningTest" haltonerror="false" />
<test todir="${junit}" name="org.pentaho.di.www.CarteTest" haltonerror="false" />
</junit>
</target>
<!--
==========================
Default target: all
==========================
-->
<target name="default" depends="distrib" description="default = build distribution package"/>
<!--
==========================
C L E A N
==========================
-->
<target name="cleandirs" description="clean up generated files">
<delete dir="${classes}"/>
<delete dir="${classes-ui}"/>
<delete dir="${classes-core}"/>
<delete dir="${classes-db}"/>
<delete dir="${testClasses}"/>
<delete dir="${lib}"/>
<delete dir="${junit}"/>
<delete dir="${distrib}"/>
<delete dir="${api}"/>
<delete dir="${webstart}"/>
<delete dir="libvars"/>
<delete dir="test/derbyOld"/>
<delete dir="test/derbyNew"/>
<delete>
<fileset dir=".">
<include name="*.zip"/>
</fileset>
</delete>
<delete dir="${macdistrib}"/>
</target>
<target name="clean" depends="cleandirs"/>
<target name="coverage" depends="clean, compileTests" > <!-- , tests-core, tests-resource, tests-trans, tests-run -->
<ant antfile="build_coverage.xml" dir="." target="coverage" />
</target>
<target name="nightly" depends="clean, zip, sourcezip, javadoc_zip, compileTests" > <!-- , tests-core, tests-resource, tests-trans, tests-run -->
<ant antfile="build_coverage.xml" dir="." target="zip-reports" />
</target>
<!--
BEFORE USING : Please download JarBundler version 1.9 and unzip it in tools/libant/
http://informagen.com/JarBundler/
-->
<target name="macapplication" depends="distrib" description="Build OS X executable">
<delete dir="${macdistrib}/${ant.project.name}.app"/>
<delete>
<fileset dir="${macdistrib}">
<include name="*.dmg"/>
</fileset>
</delete>
<taskdef name="jarbundler"
classpath="${jarbundler.jar}"
classname="net.sourceforge.jarbundler.JarBundler"/>
<jarbundler dir="${macdistrib}"
name="${ant.project.name}"
mainclass="org.pentaho.di.ui.spoon.Spoon"
icon="${ui}/images/spoon32.icns"
version="${version}"
verbose="true"
VMOptions="${macappmaxmem} ${macappextravmoptions}"
shortname="Spoon"
arguments=""
workingdirectory="$APP_PACKAGE/Contents/Resources/Java"
jvmversion="1.5+">
<javaproperty name="java.library.path" value="$APP_PACKAGE/Contents/Resources/Java"/>
<jarfileset dir="${distrib}">
<include name="${lib}/*.jar"/>
<include name="${libext}/*.jar"/>
<include name="${libext}/**/*.jar"/>
<include name="${libswt}/*.jar"/>
<include name="${libswt}/osx/*.jar"/>
<include name="${libswt}/osx/java_swt"/>
<include name="${samples}/**/*"/>
<include name="${docs}/**/*"/>
<include name="README_OSX.txt"/>
<include name="*.sh"/>
<include name="simple-jndi/**/*"/>
<include name="pwd/**/*"/>
<include name="plugins/**/*"/>
<include name="${ui}/*"/>
<include name="${ui}/**/*"/>
</jarfileset>
</jarbundler>
<!-- patch Info.plist with StartOnMainThread property need to make sure that the token is in the right place-->
<replace file="${macdistrib}/${ant.project.name}.app/Contents/Info.plist" token="&lt;key&gt;ClassPath" value="&lt;key&gt;StartOnMainThread&lt;/key&gt;&lt;true/&gt; &lt;key&gt;ClassPath" />
<!-- Create a .dmg file containing the app and docs -->
<echo>Creating .dmg package...</echo>
<exec executable="/usr/bin/hdiutil" os="Mac OS X">
<arg value="create"/>
<arg value="-srcfolder"/>
<arg value="${macdistrib}"/>
<arg value="-volname"/>
<arg value="${ant.project.name} ${version}"/>
<arg value="-ov"/>
<arg value="${macdistrib}/${impl.productID}-${version}.dmg"/>
</exec>
</target>
</project>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/LvYanGGIT/kettle.git
git@gitee.com:LvYanGGIT/kettle.git
LvYanGGIT
kettle
kettle
master

搜索帮助