<commit_before><!-- In order for this build file to be referenced by name on import into other build files, 
     it's much nicer to have a short name with no spaces. Please don't change it. -->
<project name="Kettle CE Assembly" basedir="." default="dist" xmlns:ivy="antlib:org.apache.ivy.ant">

  <!-- =================================================================================
       Property Defaults
       Any of these properties can be overridden in either assembly.properties or override.properties
       =================================================================================-->

  <!-- Load the properties files in the proper order -->
  <property file="override.properties"
            description="Properties customized for your development environment belong in this file.  This file will never be checked into the SCM." />
  <property file="build.properties"
            description="Properties customized for your particular project belong in this file." />
  
  <!-- the impl properties are used to create the manifest file -->
  <property name="impl.title" value="Kettle" />
  <property name="impl.version" value="${project.revision}" />
  <property name="impl.vendor" value="Pentaho Corporation" />

  <import file="build-res/subfloor-pkg.xml" />

  <target name="dist" depends="init,resolve,resolve-swtlibs,resolve-launcher,package" description="Builds and packages the application"/>
  	
	<target name="assemble-full" depends="init,resolve,resolve-swtlibs,resolve-launcher,assemble" description="Builds the application" />

	
  <target name="assemble" depends="subfloor-pkg.assemble" description="copy jar files to distribution directory" >
  	<echo>Construct the distribution package...</echo>
    <!-- make JavaApplicationStub executable for OSX -->
    <chmod file="${approot.stage.dir}/Data Integration.app/Contents/MacOS/JavaApplicationStub" perm="ugo+rx"/>
  	
  	<!-- Remove the SWT JAR used for compilation -->
  	<delete quiet="true">
  		<fileset dir="${stage.dir}/${package.root.dir}/lib" includes="swt*.jar" />
  	</delete>
  	
    <!-- Unzip the libswt package into the libswt folder of the distribution -->
    <unzip dest="${stage.dir}/${package.root.dir}" overwrite="true">
      <fileset dir="${swtlib.dir}">
        <include name="**/*.zip"/>
      </fileset>
    </unzip>
    
    <!-- Unzip the big-data package into the big-data folder of the distribution -->
    <antcall target="unzip-big-data-plugin">
        <param name="big.data.plugin.location" value="${lib.dir}"/>
    </antcall>  
    
    <!-- Unzip the mongodb package into the mongodb folder of the distribution -->
    <antcall target="unzip-mongodb-plugin">
        <param name="mongodb.plugin.location" value="${lib.dir}"/>
    </antcall>  
        	    
  	<!-- Insert launcher revision number into batch files -->
    <replace dir="${stage.dir}/${package.root.dir}">
      <include name="**/*.bat"/>
    	<include name="**/*.sh"/>
    	<include name="**/*.plist"/>
      <replacefilter token="launcher.jar" value="launcher-${launcher.revision}.jar"/>     
    </replace>
  	
  </target>
	
	<!--=======================================================================
	      publish-local
	      
	      Builds and publishes the jar file for this project to the user's 
	      local repository for download by other projects currently being 
	      executed on the user's system.
	      ====================================================================-->
	  <target name="publish-local"
	          depends="assemble-full, package-zip, publish-local-nojar"
	          description="Builds and publishes the jar file to the local repository">
	  </target>


	  <!--=======================================================================
	        publish
	    
	        Creates and publishes the jar file for this project to a Maven2 
	        repository. 
	        ====================================================================-->
	 <target name="publish"
	         depends="assemble-full, package-zip, publish-nojar"
	         description="Builds and publishes the jar file to the local repository">
	 </target>
  
  
	    <!-- Unzip the big data package into the big-data folder of the distribution -->
	      <target name="unzip-big-data-plugin" depends="init">
	      <unzip dest="${stage.dir}/${package.root.dir}/plugins" overwrite="true">
	        <fileset dir="${big.data.plugin.location}">
	          <include name="pentaho-big-data-plugin*.zip"/>
	        </fileset>
	      </unzip>
	      </target>
	          
	    <!-- Unzip the mongodb into the mongodb folder of the distribution -->
	      <target name="unzip-mongodb-plugin" depends="init">
	      <unzip dest="${stage.dir}/${package.root.dir}/plugins" overwrite="true">
	        <fileset dir="${mongodb.plugin.location}">
	          <include name="pentaho-mongodb-plugin*.zip"/>
	        </fileset>
	      </unzip>
	      </target>
  
	
	
	<!--=======================================================================
	        resolve-swtlibs
	        
	        Resolved the swtlibs configuration from ivy.xml
	    =====================================================================-->
	  <target name="resolve-swtlibs" depends="install-ivy"><commit_msg>[CM-325] Fix the assembly while retaining pentaho common subfloor files. Moved custom package.artifact.ivyfile=ivy.xml to build.xml Moved custom "publish-nojar.internal" target with publisher for the zip assembly out to build.xml<commit_after><!-- In order for this build file to be referenced by name on import into other build files, 
     it's much nicer to have a short name with no spaces. Please don't change it. -->
<project name="Kettle CE Assembly" basedir="." default="dist" xmlns:ivy="antlib:org.apache.ivy.ant">

  <!-- =================================================================================
       Property Defaults
       Any of these properties can be overridden in either assembly.properties or override.properties
       =================================================================================-->

  <!-- Load the properties files in the proper order -->
  <property file="override.properties"
            description="Properties customized for your development environment belong in this file.  This file will never be checked into the SCM." />
  <property file="build.properties"
            description="Properties customized for your particular project belong in this file." />
  
  <!-- the impl properties are used to create the manifest file -->
  <property name="impl.title" value="Kettle" />
  <property name="impl.version" value="${project.revision}" />
  <property name="impl.vendor" value="Pentaho Corporation" />
  
  <!-- override the default package-ivy.xml defined in common subfloor.pkg -->
    <property name="package.artifact.ivyfile"
              value="ivy.xml"
              description="The ivy file defining dependencies of the package" />
  

  <import file="build-res/subfloor-pkg.xml" />

  <target name="dist" depends="init,resolve,resolve-swtlibs,resolve-launcher,package" description="Builds and packages the application"/>
  	
	<target name="assemble-full" depends="init,resolve,resolve-swtlibs,resolve-launcher,assemble" description="Builds the application" />

	
  <target name="assemble" depends="subfloor-pkg.assemble" description="copy jar files to distribution directory" >
  	<echo>Construct the distribution package...</echo>
    <!-- make JavaApplicationStub executable for OSX -->
    <chmod file="${approot.stage.dir}/Data Integration.app/Contents/MacOS/JavaApplicationStub" perm="ugo+rx"/>
  	
  	<!-- Remove the SWT JAR used for compilation -->
  	<delete quiet="true">
  		<fileset dir="${stage.dir}/${package.root.dir}/lib" includes="swt*.jar" />
  	</delete>
  	
    <!-- Unzip the libswt package into the libswt folder of the distribution -->
    <unzip dest="${stage.dir}/${package.root.dir}" overwrite="true">
      <fileset dir="${swtlib.dir}">
        <include name="**/*.zip"/>
      </fileset>
    </unzip>
    
    <!-- Unzip the big-data package into the big-data folder of the distribution -->
    <antcall target="unzip-big-data-plugin">
        <param name="big.data.plugin.location" value="${lib.dir}"/>
    </antcall>  
    
    <!-- Unzip the mongodb package into the mongodb folder of the distribution -->
    <antcall target="unzip-mongodb-plugin">
        <param name="mongodb.plugin.location" value="${lib.dir}"/>
    </antcall>  
        	    
  	<!-- Insert launcher revision number into batch files -->
    <replace dir="${stage.dir}/${package.root.dir}">
      <include name="**/*.bat"/>
    	<include name="**/*.sh"/>
    	<include name="**/*.plist"/>
      <replacefilter token="launcher.jar" value="launcher-${launcher.revision}.jar"/>     
    </replace>
  	
  </target>
	
	<!--=======================================================================
	      publish-local
	      
	      Builds and publishes the jar file for this project to the user's 
	      local repository for download by other projects currently being 
	      executed on the user's system.
	      ====================================================================-->
	  <target name="publish-local"
	          depends="assemble-full, package-zip, publish-local-nojar"
	          description="Builds and publishes the jar file to the local repository">
	  </target>


	  <!--=======================================================================
	        publish
	    
	        Creates and publishes the jar file for this project to a Maven2 
	        repository. 
	        ====================================================================-->
	 <target name="publish"
	         depends="assemble-full, package-zip, publish-nojar"
	         description="Builds and publishes the jar file to the local repository">
	 </target>
  
  <!-- Differs from subfloor by publishing the zip instead of jar --> 
  <target name="publish-nojar.internal" depends="install-antcontrib,create-pom,ivy.deliver">
    <antcall target="maven-publish-dependencies">
      <param name="publish.groupId" value="${ivy.artifact.group}" />
      <param name="publish.artifactId" value="${ivy.artifact.id}" />
      <param name="publish.version" value="${project.revision}" />
      <param name="publish.file" value="${ivy.artifact.ivypathname}" />
    </antcall>

    <if>
      <equals arg1="${source.publish}" arg2="true" />
        <then>
          <antcall target="maven-publish-sources">
            <param name="publish.groupId" value="${ivy.artifact.group}" />
            <param name="publish.artifactId" value="${ivy.artifact.id}" />
            <param name="publish.version" value="${project.revision}" />
            <param name="publish.file" value="${dist.dir}/${ivy.artifact.id}-${project.revision}-sources.jar" />
          </antcall>
        </then>
    </if>

    <antcall target="maven-publish-artifact">
      <param name="publish.pomFile" value="${ivy.artifact.pomfile}" />
      <param name="publish.file" value="${dist.dir}/${ivy.artifact.id}-${project.revision}.zip" />
    </antcall>

    <antcall target="maven-publish.post"/>
    
  </target>
    
	    <!-- Unzip the big data package into the big-data folder of the distribution -->
	      <target name="unzip-big-data-plugin" depends="init">
	      <unzip dest="${stage.dir}/${package.root.dir}/plugins" overwrite="true">
	        <fileset dir="${big.data.plugin.location}">
	          <include name="pentaho-big-data-plugin*.zip"/>
	        </fileset>
	      </unzip>
	      </target>
	          
	    <!-- Unzip the mongodb into the mongodb folder of the distribution -->
	      <target name="unzip-mongodb-plugin" depends="init">
	      <unzip dest="${stage.dir}/${package.root.dir}/plugins" overwrite="true">
	        <fileset dir="${mongodb.plugin.location}">
	          <include name="pentaho-mongodb-plugin*.zip"/>
	        </fileset>
	      </unzip>
	      </target>
  
	
	
	<!--=======================================================================
	        resolve-swtlibs
	        
	        Resolved the swtlibs configuration from ivy.xml
	    =====================================================================-->
	  <target name="resolve-swtlibs" depends="install-ivy">
{'fraction_non_alphanumeric': 0.22539113428943938, 'fraction_numerical': 0.0005704041720990873, 'mean_word_length': 3.2570239334027056, 'pattern_counts': {'":': 0, '<': 166, '<?xml version=': 0, '>': 166, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 11}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1411274', 'n_tokens_mistral': 3403, 'n_tokens_neox': 3122, 'n_words': 849}