<commit_before><project name="Kettle" default="default" basedir=".">

	  <description>
	      Kettle build file
	    </description>

	  <tstamp prefix="start"/>

	  <!-- system properties to use -->
	  <property name="cr" value="${line.separator}"/> 
	  <property name="version" value="3.0.0-M1"/>      
		
	  <!-- set global properties for this build -->
	
	  <property name="src"        			location="src"/> 
	  <property name="test"        			location="test"/> 
	  <property name="classes"        		location="classes"/> 
	  <property name="testClasses"        	location="testClasses"/> 
	  <property name="bin"    				location="bin"/>
	  <property name="build"      			location="build"/>
	  <property name="lib"        			location="lib"/>
	  <property name="plugins"        		location="plugins"/>
	  <property name="ui"        			location="ui"/>
	  <property name="homepage"        		location="homepage"/>
	  <property name="samples"        		location="samples"/>
	  <property name="libext"     	        location="libext"/>
	  <property name="testlibext"     		location="${test}/libext"/>
	  <property name="libswt"     			location="libswt"/>
	  <property name="distrib"				location="distrib"/>
	  <property name="docs"					location="docs"/>
	  <property name="api"					location="${docs}/api/"/>
	  <property name="tips"					location="${docs}/tips/"/>
	  <property name="web"					location="web"/>
	  <property name="pwd"					location="pwd"/>
	  <property name="extra"        		location="extra"/>
	  <property name="webstart"				location="webstart"/>
	  <property name="keystore"				location="keystore"/>
	  <property name="keystorePassword"		location="<PASSWORD>"/>
	  <property name="junit"				location="junit"/>

	  <property name="sourcezipfile"        location="Kettle-src-${version}.zip"/>
	  <property name="dist.dir"				value="."/>
		  
	  <target name="init" description="create timestamp and directories">
    	<echo>Init...</echo>
	  	
	    <tstamp/>
	    <mkdir dir="${build}"/>
	    <mkdir dir="${classes}"/>
	  	<mkdir dir="${testClasses}"/>
	    <mkdir dir="${lib}"/>
		<mkdir dir="${distrib}"/>
		<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}"/>
	  </target>

	  <!--
	       ==========================
	            Compile the code
	       ==========================
	  -->

	  <target name="compile" depends="init" description="compile the source " >
	  	<echo>Compiling Kettle...</echo>
	    <javac srcdir="${src}" 
	    	   destdir="${classes}"
	    	   target="5"
	    	   source="5"
	           deprecation="true"
	    	   debug="true"
	    	   excludes="be/ibridge/kettle/schema/**/* be/ibridge/kettle/menu/**/*"
	    	   memorymaximumsize="256M"
	    	   fork="true"
	    	>

	    	<classpath id="cp-kettle">
				<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>
	  </target>
	  
		  <!--
		       ===================================
		          Increase the revision number
		       ===================================
		  -->
	  	
		<target name="revision" depends="compile" description="compile the source " >
	 	  <echo>Bumping revision...</echo>
	  	  <java classname="org.pentaho.di.version.UpdateBuildVersion"
		  	    classpath="${classes}"
	  	  	  />
		 <!-- <concat><filelist dir="." files="build_version.txt"/></concat> -->
	    </target>
	
		<!--
		       ==========================
		          Compile the test code
		       ==========================
		  -->

		  <target name="compileTests" depends="kettle" description="compile the tests" >
		  	<echo>Compiling Kettle tests...</echo>
		    <javac srcdir="${test}" 
		    	   destdir="${testClasses}"
		    	   target="5"
		    	   source="5"
		           deprecation="true"
		    	>

		    	<classpath id="cp-kettle-test">
		    		<fileset dir="${lib}" 	  		includes="kettle3.jar"/>
		    		<fileset dir="${testlibext}" 	includes="*.jar"/>
			  	</classpath>
		    </javac>
		  </target>
	
	  <!--
	       ==========================
	          Copy additional files
	       ==========================
	  -->

	  <target name="copy" depends="compile" description="copy images etc to classes directory" >
	  	<echo>Copying images etc to classes directory...</echo>
	    <copy todir="${classes}">
	    	<fileset dir="${src}" includes="**/*.png **/*.xml **/*properties"/>
	  	    </copy>
	    <copy todir="${classes}">
	    	<fileset file="build_version.txt"/>
	  	    </copy>
	  	
	  </target>
	
	
	  <!--
	       ==========================
	         javadoc of the source
	       ==========================
	  -->

	  <target name="javadoc" depends="compile" description="compile the javadoc api" >
	  	<echo>Compiling the Kettle API javadocs...</echo>
        <javadoc 
        	destdir="${api}" 
        	access="public" 
        	source="1.4" 
        	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.4.2/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="Kettle-javadoc-${version}.zip" 
	    	 basedir="${api}" 
	    	 includes="**/*"
	  	     excludes="**/Thumbs.db"
	  		/>
	  </target>

	
	  <!--
	       ==========================
	             Kettle library
	       ==========================
	  -->
		
	  <target name="kettle" depends="compile, revision, copy" description="generate the kettle library kettle3.jar">
	  	<echo>Generating the Kettle library kettle3.jar ...</echo>
	  	<jar jarfile="${lib}/kettle3.jar" 
	    	 basedir="${classes}" 
	    	 includes="**/* ../build_version.txt"
	  	     excludes="**/Thumbs.db **/kettle.jar"
	  		/>
	  	

	  </target>	
	
	<!--
	       ==========================
	        Distribution jar package
	       ==========================
	  -->
	  <target name="distrib" depends="kettle" 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}/kettle3.jar"/>

  	        <!-- external libs (jdbc etc) -->
	  		<mkdir dir="${distrib}/libext"/>
	  		<copy todir="${distrib}/libext">
	  			<fileset dir="${libext}" includes="*.jar *.zip" excludes="**/.vpn"/>
	  			</copy>
	  		<mkdir dir="${distrib}/libext/JDBC"/>
	  		<copy todir="${distrib}/libext/JDBC">
	  			<fileset dir="${libext}/JDBC" includes="*.jar *.zip" excludes="**/.vpn"/>
	  			</copy>
	  		<mkdir dir="${distrib}/libext/commons"/>
	  		<copy todir="${distrib}/libext/commons">
	  			<fileset dir="${libext}/commons" includes="*.jar *.zip" excludes="**/.vpn"/>
	  			</copy>
	  		<mkdir dir="${distrib}/libext/webservices"/>
	  		<copy todir="${distrib}/libext/webservices">
	  			<fileset dir="${libext}/webservices" includes="*.jar *.zip" excludes="**/.vpn"/>
	  			</copy>
	  		<mkdir dir="${distrib}/libext/web"/>
	  		<copy todir="${distrib}/libext/web">
	  			<fileset dir="${libext}/web" includes="*.jar *.zip" excludes="**/.vpn"/>
	  			</copy>
	  		<mkdir dir="${distrib}/libext/pentaho"/>
	  		<copy todir="${distrib}/libext/pentaho">
	  			<fileset dir="${libext}/pentaho" includes="*.jar *.zip" 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"
	  			         excludes="**/*.dot **/*.doc **/*.sxw **/*.odt **/*.vpn **/*feature list*" />
	  			</copy>

	        <!-- pwd -->
	  		<mkdir dir="${distrib}/pwd"/>
	  		<copy todir="${distrib}/pwd">
	  			<fileset dir="${pwd}" 
	  				     includes="**/*.pwd"
	  			         excludes="**/*.vpn" />
	  			</copy>

	        <!-- simple-jndi -->
	  		<mkdir dir="${distrib}/simple-jndi"/>
	  		<copy todir="${distrib}/simple-jndi">
	  			<fileset dir="${pwd}" 
	  				     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>

	        <!-- extra stuff -->
	  		<mkdir dir="${distrib}/extra"/>
	  		<copy todir="${distrib}/extra">
	  			<fileset dir="${extra}" includes="**/*"/>
	  			</copy>

	  </target>

	  <!--
	       ==========================
	             zipfile
	       ==========================
	  -->
		
	  <target name="zip" depends="distrib" description="generate the Kettle-${version}.zip file">
	  	<echo>Generating the Kettle distribution package Kettle-${version}.zip ...</echo>
	  	<jar jarfile="${dist.dir}/Kettle-${version}.zip" 
	    	 basedir="${distrib}" 
	    	 includes="**/*"
	  	     excludes="**/Thumbs.db"
	  		/>
	  </target>

	  <!--
	       ==========================
	             Source zipfile
	       ==========================
	  -->
		
	  <target name="sourcezip" depends="" description="generate the Kettle-src-${version}.zip file">
	  	<echo>Generating the Kettle source packge zip file (Kettle-src-${version}.zip) ...</echo>
	  	<jar jarfile="${dist.dir}/Kettle-src-${version}.zip" 
	  		 basedir="."
	    	 includes="**/*"
	  	     excludes="*.zip ${classes}/**/* ${distrib}/**/* homepage/**/* Licenses/**/* ${lib}/**/* ${webstart}/**/*"
	  		/>
	  </target>

	<!--
	       ==========================
	            Webstart part...
	       ==========================
	  -->

	
	<target name="copy2webstart" depends="init, kettle" description="Copy resources to webstart">
    	<echo>Copying resources to webstart...</echo>

		<copy todir="${webstart}/libext">
			<fileset dir="${libext}" includes="**/*.jar"/>
			</copy>

		<copy todir="${webstart}/libswt">
			<fileset dir="${libswt}" includes="**/*.jar"/>
		</copy>

		<copy todir="${webstart}/">
			<fileset dir="${bin}" includes="**/*.xml"/>
		</copy>

		<copy todir="${webstart}/lib">
			<fileset dir="${lib}" includes="**/*.jar"/>
		</copy>
	
		<copy todir="${webstart}/plugins">
			<fileset dir="${plugins}" includes="**/*"/>
		</copy>

		<copy todir="${webstart}">
			<fileset dir="${src}/be/ibridge/kettle/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>

		<jar destfile="${webstart}/libswt/hpux/libs.jar">
			<fileset dir="${libswt}/hpux" includes="**/*.sl"/>
		</jar>

	</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=<NAME>, 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>
    </target> 

    <target name="webstart" depends="sign-jars" description="Package WAR">
    	<echo>Create the webstart WAR file...</echo>

        <war destfile="${webstart}/kettle.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="**/repositories.xml"/>
  			  <include name="kettle_logo.png"/>
              <exclude name="${keystore}"/>
              <exclude name="kettle.war"/>
	    	</fileset>
        	
        </war>
	</target>

	<!--
	       ===========================================
	          runtests : junit performance tests
	       ============================================
	  -->

	<target name="runtests" depends="compileTests" description="Execute the run performance tests">
		
		<junit printsummary="no" fork="yes" forkmode="perTest" jvm="java" maxmemory="512M" showoutput="yes">
	    	<classpath>
				<fileset dir="${lib}" includes="kettle3.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.run.tableoutput.RunTableOutput" haltonerror="false" />
			<test todir="${junit}" name="org.pentaho.di.run.abort.RunAbort" haltonerror="false" />
			<test todir="${junit}" name="org.pentaho.di.run.addsequence.RunAddSequence4To10" haltonerror="false" />
			<test todir="${junit}" name="org.pentaho.di.run.addsequence.RunAddSequence4To05" haltonerror="false" />
			<test todir="${junit}" name="org.pentaho.di.run.addsequence.RunAddSequence4To00" haltonerror="false" />
			<test todir="${junit}" name="org.pentaho.di.run.addsequence.RunAddSequence2To10" haltonerror="false" />
			<test todir="${junit}" name="org.pentaho.di.run.addsequence.RunAddSequence2To05" haltonerror="false" />
			<test todir="${junit}" name="org.pentaho.di.run.addsequence.RunAddSequence2To00" haltonerror="false" />
			<test todir="${junit}" name="org.pentaho.di.run.addsequence.RunAddSequence1To10" haltonerror="false" />
			<test todir="${junit}" name="org.pentaho.di.run.addsequence.RunAddSequence1To05" haltonerror="false" />
			<test todir="${junit}" name="org.pentaho.di.run.addsequence.RunAddSequence1To00" haltonerror="false" />
			<test todir="${junit}" name="org.pentaho.di.run.calculator.RunCalculator" haltonerror="false" />
			<test todir="${junit}" name="org.pentaho.di.run.constant.RunConstant" haltonerror="false" />
			<test todir="${junit}" name="org.pentaho.di.run.filterrows.RunFilterRows" haltonerror="false" />
			<test todir="${junit}" name="org.pentaho.di.run.rowgenerator.RunRowGenerator" haltonerror="false" />
			<test todir="${junit}" name="org.pentaho.di.run.selectvalues.RunSelectValues" haltonerror="false" />
			<test todir="${junit}" name="org.pentaho.di.run.sortrows.RunSortRows" haltonerror="false" />
			<test todir="${junit}" name="org.pentaho.di.run.streamlookup.RunStreamLookup" haltonerror="false" />
			<test todir="${junit}" name="org.pentaho.di.run.systemdata.RunSystemData" haltonerror="false" />
			<test todir="${junit}" name="org.pentaho.di.run.tableinput.RunTableInput" haltonerror="false" />
			<test todir="${junit}" name="org.pentaho.di.run.textfileinput.RunTextFileInput" haltonerror="false" />
			<test todir="${junit}" name="org.pentaho.di.run.textfileoutput.RunTextFileOutput" haltonerror="false" />
			<test todir="${junit}" name="org.pentaho.di.run.uniquerows.RunUniqueRows" haltonerror="false" />
			<test todir="${junit}" name="org.pentaho.di.run.databaselookup.RunDatabaseLookup" haltonerror="false" />
			<test todir="${junit}" name="org.pentaho.di.run.dimensionlookup.RunDimensionLookup" haltonerror="false" />
			<test todir="${junit}" name="org.pentaho.di.run.excelinput.RunExcelInput" haltonerror="false" />
			<test todir="${junit}" name="org.pentaho.di.run.exceloutput.RunCombinationLookup" haltonerror="false" />
			<test todir="${junit}" name="org.pentaho.di.run.scriptvalues_mod.RunScriptValuesMod" haltonerror="false" />
			<test todir="${junit}" name="org.pentaho.di.run.joinrows.RunJoinRows" haltonerror="false" />
			<test todir="${junit}" name="org.pentaho.di.run.update.RunUpdate" haltonerror="false" />
			<test todir="${junit}" name="org.pentaho.di.run.insertupdate.RunInsertUpdate" haltonerror="false" />
			<test todir="${junit}" name="org.pentaho.di.run.delete.RunDelete" haltonerror="false" />
			<test todir="${junit}" name="org.pentaho.di.run.getfilenames.RunGetFileNames" haltonerror="false" />
			<test todir="${junit}" name="org.pentaho.di.run.groupby.RunGroupBy" haltonerror="false" />
			<test todir="${junit}" name="org.pentaho.di.run.mergejoin.RunMergeJoin" haltonerror="false" />
			<test todir="${junit}" name="org.pentaho.di.run.sortedmerge.RunSortedMerge" 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="${lib}"/>
	    <delete dir="${distrib}"/>
	  	<delete dir="${api}"/>
	  	<delete dir="${webstart}"/>
	  	<delete dir="libvars"/>
	  	<delete>
	        <fileset dir=".">
			  <include name="*.zip"/>
	    	</fileset>
	  	</delete>
	  </target>

	  <target name="clean" depends="cleandirs"/>
	
	
	 <target name="nightly" depends="clean, zip, sourcezip, javadoc_zip" />

</project>
<commit_msg>incorporating kettle into the nightly build process<commit_after><project name="Kettle" default="default" basedir=".">

	  <description>
	      Kettle build file
	    </description>

	  <tstamp prefix="start"/>

	  <!-- system properties to use -->
	  <property name="cr" value="${line.separator}"/> 
	  <property name="version" value="3.0.0-M1"/>      
		
	  <!-- set global properties for this build -->
	
	  <property name="src"        			location="src"/> 
	  <property name="test"        			location="test"/> 
	  <property name="classes"        		location="classes"/> 
	  <property name="testClasses"        	location="testClasses"/> 
	  <property name="bin"    				location="bin"/>
	  <property name="build"      			location="build"/>
	  <property name="lib"        			location="lib"/>
	  <property name="plugins"        		location="plugins"/>
	  <property name="ui"        			location="ui"/>
	  <property name="homepage"        		location="homepage"/>
	  <property name="samples"        		location="samples"/>
	  <property name="libext"     	        location="libext"/>
	  <property name="testlibext"     		location="${test}/libext"/>
	  <property name="libswt"     			location="libswt"/>
	  <property name="distrib"				location="distrib"/>
	  <property name="docs"					location="docs"/>
	  <property name="api"					location="${docs}/api/"/>
	  <property name="tips"					location="${docs}/tips/"/>
	  <property name="web"					location="web"/>
	  <property name="pwd"					location="pwd"/>
	  <property name="extra"        		location="extra"/>
	  <property name="webstart"				location="webstart"/>
	  <property name="keystore"				location="keystore"/>
	  <property name="keystorePassword"		location="<PASSWORD>"/>
	  <property name="junit"				location="junit"/>

	  <property name="sourcezipfile"        location="Kettle-src-${version}.zip"/>
	  <property name="dist.dir"				value="."/>
		  
	  <target name="init" description="create timestamp and directories">
    	<echo>Init...</echo>
	  	
	    <tstamp/>
	    <mkdir dir="${build}"/>
	    <mkdir dir="${classes}"/>
	  	<mkdir dir="${testClasses}"/>
	    <mkdir dir="${lib}"/>
		<mkdir dir="${distrib}"/>
		<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}"/>
	  </target>

	  <!--
	       ==========================
	            Compile the code
	       ==========================
	  -->

	  <target name="compile" depends="init" description="compile the source " >
	  	<echo>Compiling Kettle...</echo>
	    <javac srcdir="${src}" 
	    	   destdir="${classes}"
	    	   target="5"
	    	   source="5"
	           deprecation="true"
	    	   debug="true"
	    	   excludes="be/ibridge/kettle/schema/**/* be/ibridge/kettle/menu/**/*"
	    	   memorymaximumsize="256M"
	    	   fork="true"
	    	>

	    	<classpath id="cp-kettle">
				<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>
	  </target>
	  
		  <!--
		       ===================================
		          Increase the revision number
		       ===================================
		  -->
	  	
		<target name="revision" depends="compile" description="compile the source " >
	 	  <echo>Bumping revision...</echo>
	  	  <java classname="org.pentaho.di.version.UpdateBuildVersion"
		  	    classpath="${classes}"
	  	  	  />
		 <!-- <concat><filelist dir="." files="build_version.txt"/></concat> -->
	    </target>
	
		<!--
		       ==========================
		          Compile the test code
		       ==========================
		  -->

		  <target name="compileTests" depends="kettle" description="compile the tests" >
		  	<echo>Compiling Kettle tests...</echo>
		    <javac srcdir="${test}" 
		    	   destdir="${testClasses}"
		    	   target="5"
		    	   source="5"
		           deprecation="true"
		    	>

		    	<classpath id="cp-kettle-test">
		    		<fileset dir="${lib}" 	  		includes="kettle3.jar"/>
		    		<fileset dir="${testlibext}" 	includes="*.jar"/>
			  	</classpath>
		    </javac>
		  </target>
	
	  <!--
	       ==========================
	          Copy additional files
	       ==========================
	  -->

	  <target name="copy" depends="compile" description="copy images etc to classes directory" >
	  	<echo>Copying images etc to classes directory...</echo>
	    <copy todir="${classes}">
	    	<fileset dir="${src}" includes="**/*.png **/*.xml **/*properties"/>
	  	    </copy>
	    <copy todir="${classes}">
	    	<fileset file="build_version.txt"/>
	  	    </copy>
	  	
	  </target>
	
	
	  <!--
	       ==========================
	         javadoc of the source
	       ==========================
	  -->

	  <target name="javadoc" depends="compile" description="compile the javadoc api" >
	  	<echo>Compiling the Kettle API javadocs...</echo>
        <javadoc 
        	destdir="${api}" 
        	access="public" 
        	source="1.4" 
        	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.4.2/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}/Kettle-javadoc-${version}.zip" 
	    	 basedir="${api}" 
	    	 includes="**/*"
	  	     excludes="**/Thumbs.db"
	  		/>
	  </target>

	
	  <!--
	       ==========================
	             Kettle library
	       ==========================
	  -->
		
	  <target name="kettle" depends="compile, revision, copy" description="generate the kettle library kettle3.jar">
	  	<echo>Generating the Kettle library kettle3.jar ...</echo>
	  	<jar jarfile="${lib}/kettle3.jar" 
	    	 basedir="${classes}" 
	    	 includes="**/* ../build_version.txt"
	  	     excludes="**/Thumbs.db **/kettle.jar"
	  		/>
	  	

	  </target>	
	
	<!--
	       ==========================
	        Distribution jar package
	       ==========================
	  -->
	  <target name="distrib" depends="kettle" 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}/kettle3.jar"/>

  	        <!-- external libs (jdbc etc) -->
	  		<mkdir dir="${distrib}/libext"/>
	  		<copy todir="${distrib}/libext">
	  			<fileset dir="${libext}" includes="*.jar *.zip" excludes="**/.vpn"/>
	  			</copy>
	  		<mkdir dir="${distrib}/libext/JDBC"/>
	  		<copy todir="${distrib}/libext/JDBC">
	  			<fileset dir="${libext}/JDBC" includes="*.jar *.zip" excludes="**/.vpn"/>
	  			</copy>
	  		<mkdir dir="${distrib}/libext/commons"/>
	  		<copy todir="${distrib}/libext/commons">
	  			<fileset dir="${libext}/commons" includes="*.jar *.zip" excludes="**/.vpn"/>
	  			</copy>
	  		<mkdir dir="${distrib}/libext/webservices"/>
	  		<copy todir="${distrib}/libext/webservices">
	  			<fileset dir="${libext}/webservices" includes="*.jar *.zip" excludes="**/.vpn"/>
	  			</copy>
	  		<mkdir dir="${distrib}/libext/web"/>
	  		<copy todir="${distrib}/libext/web">
	  			<fileset dir="${libext}/web" includes="*.jar *.zip" excludes="**/.vpn"/>
	  			</copy>
	  		<mkdir dir="${distrib}/libext/pentaho"/>
	  		<copy todir="${distrib}/libext/pentaho">
	  			<fileset dir="${libext}/pentaho" includes="*.jar *.zip" 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"
	  			         excludes="**/*.dot **/*.doc **/*.sxw **/*.odt **/*.vpn **/*feature list*" />
	  			</copy>

	        <!-- pwd -->
	  		<mkdir dir="${distrib}/pwd"/>
	  		<copy todir="${distrib}/pwd">
	  			<fileset dir="${pwd}" 
	  				     includes="**/*.pwd"
	  			         excludes="**/*.vpn" />
	  			</copy>

	        <!-- simple-jndi -->
	  		<mkdir dir="${distrib}/simple-jndi"/>
	  		<copy todir="${distrib}/simple-jndi">
	  			<fileset dir="${pwd}" 
	  				     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>

	        <!-- extra stuff -->
	  		<mkdir dir="${distrib}/extra"/>
	  		<copy todir="${distrib}/extra">
	  			<fileset dir="${extra}" includes="**/*"/>
	  			</copy>

	  </target>

	  <!--
	       ==========================
	             zipfile
	       ==========================
	  -->
		
	  <target name="zip" depends="distrib" description="generate the Kettle-${version}.zip file">
	  	<echo>Generating the Kettle distribution package Kettle-${version}.zip ...</echo>
	  	<jar jarfile="${dist.dir}/Kettle-${version}.zip" 
	    	 basedir="${distrib}" 
	    	 includes="**/*"
	  	     excludes="**/Thumbs.db"
	  		/>
	  </target>

	  <!--
	       ==========================
	             Source zipfile
	       ==========================
	  -->
		
	  <target name="sourcezip" depends="" description="generate the Kettle-src-${version}.zip file">
	  	<echo>Generating the Kettle source packge zip file (Kettle-src-${version}.zip) ...</echo>
	  	<jar jarfile="${dist.dir}/Kettle-src-${version}.zip" 
	  		 basedir="."
	    	 includes="**/*"
	  	     excludes="*.zip ${classes}/**/* ${distrib}/**/* homepage/**/* Licenses/**/* ${lib}/**/* ${webstart}/**/*"
	  		/>
	  </target>

	<!--
	       ==========================
	            Webstart part...
	       ==========================
	  -->

	
	<target name="copy2webstart" depends="init, kettle" description="Copy resources to webstart">
    	<echo>Copying resources to webstart...</echo>

		<copy todir="${webstart}/libext">
			<fileset dir="${libext}" includes="**/*.jar"/>
			</copy>

		<copy todir="${webstart}/libswt">
			<fileset dir="${libswt}" includes="**/*.jar"/>
		</copy>

		<copy todir="${webstart}/">
			<fileset dir="${bin}" includes="**/*.xml"/>
		</copy>

		<copy todir="${webstart}/lib">
			<fileset dir="${lib}" includes="**/*.jar"/>
		</copy>
	
		<copy todir="${webstart}/plugins">
			<fileset dir="${plugins}" includes="**/*"/>
		</copy>

		<copy todir="${webstart}">
			<fileset dir="${src}/be/ibridge/kettle/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>

		<jar destfile="${webstart}/libswt/hpux/libs.jar">
			<fileset dir="${libswt}/hpux" includes="**/*.sl"/>
		</jar>

	</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=<NAME>, 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>
    </target> 

    <target name="webstart" depends="sign-jars" description="Package WAR">
    	<echo>Create the webstart WAR file...</echo>

        <war destfile="${webstart}/kettle.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="**/repositories.xml"/>
  			  <include name="kettle_logo.png"/>
              <exclude name="${keystore}"/>
              <exclude name="kettle.war"/>
	    	</fileset>
        	
        </war>
	</target>

	<!--
	       ===========================================
	          runtests : junit performance tests
	       ============================================
	  -->

	<target name="runtests" depends="compileTests" description="Execute the run performance tests">
		
		<junit printsummary="no" fork="yes" forkmode="perTest" jvm="java" maxmemory="512M" showoutput="yes">
	    	<classpath>
				<fileset dir="${lib}" includes="kettle3.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.run.tableoutput.RunTableOutput" haltonerror="false" />
			<test todir="${junit}" name="org.pentaho.di.run.abort.RunAbort" haltonerror="false" />
			<test todir="${junit}" name="org.pentaho.di.run.addsequence.RunAddSequence4To10" haltonerror="false" />
			<test todir="${junit}" name="org.pentaho.di.run.addsequence.RunAddSequence4To05" haltonerror="false" />
			<test todir="${junit}" name="org.pentaho.di.run.addsequence.RunAddSequence4To00" haltonerror="false" />
			<test todir="${junit}" name="org.pentaho.di.run.addsequence.RunAddSequence2To10" haltonerror="false" />
			<test todir="${junit}" name="org.pentaho.di.run.addsequence.RunAddSequence2To05" haltonerror="false" />
			<test todir="${junit}" name="org.pentaho.di.run.addsequence.RunAddSequence2To00" haltonerror="false" />
			<test todir="${junit}" name="org.pentaho.di.run.addsequence.RunAddSequence1To10" haltonerror="false" />
			<test todir="${junit}" name="org.pentaho.di.run.addsequence.RunAddSequence1To05" haltonerror="false" />
			<test todir="${junit}" name="org.pentaho.di.run.addsequence.RunAddSequence1To00" haltonerror="false" />
			<test todir="${junit}" name="org.pentaho.di.run.calculator.RunCalculator" haltonerror="false" />
			<test todir="${junit}" name="org.pentaho.di.run.constant.RunConstant" haltonerror="false" />
			<test todir="${junit}" name="org.pentaho.di.run.filterrows.RunFilterRows" haltonerror="false" />
			<test todir="${junit}" name="org.pentaho.di.run.rowgenerator.RunRowGenerator" haltonerror="false" />
			<test todir="${junit}" name="org.pentaho.di.run.selectvalues.RunSelectValues" haltonerror="false" />
			<test todir="${junit}" name="org.pentaho.di.run.sortrows.RunSortRows" haltonerror="false" />
			<test todir="${junit}" name="org.pentaho.di.run.streamlookup.RunStreamLookup" haltonerror="false" />
			<test todir="${junit}" name="org.pentaho.di.run.systemdata.RunSystemData" haltonerror="false" />
			<test todir="${junit}" name="org.pentaho.di.run.tableinput.RunTableInput" haltonerror="false" />
			<test todir="${junit}" name="org.pentaho.di.run.textfileinput.RunTextFileInput" haltonerror="false" />
			<test todir="${junit}" name="org.pentaho.di.run.textfileoutput.RunTextFileOutput" haltonerror="false" />
			<test todir="${junit}" name="org.pentaho.di.run.uniquerows.RunUniqueRows" haltonerror="false" />
			<test todir="${junit}" name="org.pentaho.di.run.databaselookup.RunDatabaseLookup" haltonerror="false" />
			<test todir="${junit}" name="org.pentaho.di.run.dimensionlookup.RunDimensionLookup" haltonerror="false" />
			<test todir="${junit}" name="org.pentaho.di.run.excelinput.RunExcelInput" haltonerror="false" />
			<test todir="${junit}" name="org.pentaho.di.run.exceloutput.RunCombinationLookup" haltonerror="false" />
			<test todir="${junit}" name="org.pentaho.di.run.scriptvalues_mod.RunScriptValuesMod" haltonerror="false" />
			<test todir="${junit}" name="org.pentaho.di.run.joinrows.RunJoinRows" haltonerror="false" />
			<test todir="${junit}" name="org.pentaho.di.run.update.RunUpdate" haltonerror="false" />
			<test todir="${junit}" name="org.pentaho.di.run.insertupdate.RunInsertUpdate" haltonerror="false" />
			<test todir="${junit}" name="org.pentaho.di.run.delete.RunDelete" haltonerror="false" />
			<test todir="${junit}" name="org.pentaho.di.run.getfilenames.RunGetFileNames" haltonerror="false" />
			<test todir="${junit}" name="org.pentaho.di.run.groupby.RunGroupBy" haltonerror="false" />
			<test todir="${junit}" name="org.pentaho.di.run.mergejoin.RunMergeJoin" haltonerror="false" />
			<test todir="${junit}" name="org.pentaho.di.run.sortedmerge.RunSortedMerge" 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="${lib}"/>
	    <delete dir="${distrib}"/>
	  	<delete dir="${api}"/>
	  	<delete dir="${webstart}"/>
	  	<delete dir="libvars"/>
	  	<delete>
	        <fileset dir=".">
			  <include name="*.zip"/>
	    	</fileset>
	  	</delete>
	  </target>

	  <target name="clean" depends="cleandirs"/>
	
	
	 <target name="nightly" depends="clean, zip, sourcezip, javadoc_zip" />

</project>

{'fraction_non_alphanumeric': 0.23394722511015398, 'fraction_numerical': 0.0033665032922421904, 'mean_word_length': 2.7278767186490724, 'pattern_counts': {'":': 0, '<': 717, '<?xml version=': 0, '>': 717, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 14}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7672141', 'n_tokens_mistral': 15227, 'n_tokens_neox': 12789, 'n_words': 2114}