<?xml version="1.0" encoding="UTF-8" ?>
     <project name="ePP Prototype Build Script" default="all" basedir="../">
    <property name="build.dir"   value="."/>
    <property name="BpelName.zip" value="FR14_ViewCall.zip"/>
    <property name="BpelProcess.jar" value="FR14_ViewCall.jar"/>
    <property name="BPEL.dir" value="../../../eu.ellectraweb.solution.epp.application/models/BPEL/FR14_ViewCall"/>
    <property name="Partner.dir" value="Partners/Autho_Authen/*.*"/>
    <property name="classes.dir" value="${build.dir}"/>
    <property name="tooldir" value="../../../eu.ellectraweb.framework.components/Components/Bpel_Tools/dist"/>
    <target name="all">
    
    <mkdir dir="${build.dir}/distjar"/>
    <mkdir dir="${build.dir}/distzip"/>
    <mkdir dir="${build.dir}/source-bpel"/>
    <mkdir dir="${build.dir}/source-bind"/>
    
    <mkdir dir="${build.dir}/distjar/META-INF"/>
  
    <mkdir dir="${build.dir}/source-bpel/META-INF"/>
    <mkdir dir="${build.dir}/source-bind/META-INF"/>
    
   
    <mkdir dir="${build.dir}/source-bind/FR14_ViewCall"/>
    
    <copy todir="${build.dir}/source-bpel">
		<fileset dir="${BPEL.dir}">
			<exclude name="**/*.jsp"/>
		</fileset>
	</copy>
	
    <copy todir="${build.dir}/source-bind/FR14_ViewCall">
		<fileset dir="${BPEL.dir}">
			<exclude name="**/*.bpel"/>
		</fileset>
	</copy>
	
	<copy todir="${build.dir}/source-bind/META-INF">
    	<fileset dir="${build.dir}/META-INF">
    		<exclude name="**/*.jsp"/>
    	</fileset>
    </copy>
    
    <copy todir="${build.dir}/source-bpel/META-INF">
    	    	<fileset dir="${build.dir}/META-INF">
    	    		<exclude name="**/*.jsp"/>
    	    	</fileset>
    	    </copy>
    	
    	<copy todir="${build.dir}/distjar/META-INF">
    	    	    	<fileset dir="${build.dir}/META-INF">
    	    	    		<exclude name="**/*.jsp"/>
    	    	    	</fileset>
    	    	    </copy>
    	    	    
    
    <copy todir="${build.dir}/">
    	    	<fileset dir="${tooldir}">
    	    		<exclude name="**/*.jsp"/>
    	    	</fileset>
    	    </copy>	
    	
    <java jar="${classes.dir}/OpenESB_Generator.jar" fork="true">
 		<arg line="FR14_ViewCall" />
	 </java>
	 
	 <java jar="${classes.dir}/WSDLGenerator.jar" fork="true">
    	 		<arg line="source-bpel/ localhost:8080 localhost:8080" />
    		 </java>
    	
    	<java jar="${classes.dir}/WSDLGenerator.jar" fork="true">
    	    	 		<arg line="source-bind/FR14_ViewCall/ localhost:8080 localhost:8080" />
    	    		 </java>
	 
    <jar jarfile="${build.dir}/distjar/${BpelProcess.jar}" compress="false">
				
					<fileset dir="${build.dir}/source-bpel">
						
						
						
					</fileset>
		    		</jar>
    
    <jar jarfile="${build.dir}/distjar/sun-http-binding.jar" compress="false">
				
					<fileset dir="${build.dir}/source-bind">
						
						
						
					</fileset>
		    		</jar>
    
    <copy todir="${build.dir}/distjar/META-INF">
    	    	    	    	<fileset dir="${build.dir}/META-INF">
    	    	    	    		<exclude name="**/*.jsp"/>
    	    	    	    	</fileset>
    	    	    	    </copy>
    	    	    	    
    <zip destfile="${build.dir}/distzip/${BpelName.zip}" compress="false">

	    <zipfileset dir="${build.dir}/distjar">
				

	    </zipfileset>

	</zip>
    
    <delete file="${build.dir}/OpenESB_Generator.jar"/>
    	<delete file="${build.dir}/META-INF/jbi.xml"/>
    			<delete file="${build.dir}/WSDLGenerator.jar"/>
    			<delete includeemptydirs="true">
    				<fileset dir="${build.dir}/source-bind"/>
    			</delete>
    	<delete includeemptydirs="true">
    	    				<fileset dir="${build.dir}/source-bpel"/>
    	    			</delete>
    	<delete includeemptydirs="true">
    	    	    				<fileset dir="${build.dir}/distjar"/>
    	    	    			</delete>
    	    	    			
    </target>
    </project>
    