<project name="DLWSJavaSample" default="compile" basedir=".">
<property file="build.properties" />
<path id="lib.classpath">
<fileset dir="${dir.lib}">
<include name="*.jar" />
</fileset>
<fileset dir="${dir.lib.cli}">
<include name="*.jar" />
</fileset>
</path>
<!-- =================================================================== -->
<!-- Clean the build directory -->
<!-- =================================================================== -->
<target name="clean" description="Cleanup build artifacts">
<delete dir="${dir.generated}" />
</target>
<!-- =================================================================== -->
<!-- Prepare the build directory -->
<!-- =================================================================== -->
<target name="setup" description="Prepare for build" depends="clean">
<mkdir dir="${dir.generated}" />
<mkdir dir="${dir.generated.java}" />
<mkdir dir="${dir.generated.classes}" />
</target>
<!-- =================================================================== -->
<!-- wsimport to generate the client stubs from the WSDL -->
<!-- =================================================================== -->
<target name="genclient" description="Generate stubs from the WSDL" depends="setup">
<exec executable="${java.home}/../bin/wsimport">
<arg line="-keep -d ${dir.generated.java} -extension -p com.bm.datalic.dlws.stubs ${dir.config.wsdl}" />
</exec>
</target>
<!-- =================================================================== -->
<!-- Compile the sample code (stubs already compiled) -->
<!-- =================================================================== -->
<target name="compile" description="Compile DLWS Sample Code" depends="genclient">
<javac destdir="${dir.generated.classes}" classpathref="lib.classpath" debug="on" includeantruntime="false">
<src path="${dir.src}" />
<src path="${dir.generated.java}" />
</javac>
</target>
<!-- =================================================================== -->
<!-- Run (replace ${sampleName} and ${programFlag} appropriately) -->
<!-- =================================================================== -->
<target name="run" description="Run DLWS Sample Code" depends="compile">
<java fork="true" classname="com.bm.datalic.dlws.PerSecurity">
<arg line="-s ${sampleName} -p ${programFlag}" />
<classpath>
<path refid="lib.classpath" />
</classpath>
<classpath location="${dir.generated.classes}" />
</java>
</target>
</project>
<property file="build.properties" />
<path id="lib.classpath">
<fileset dir="${dir.lib}">
<include name="*.jar" />
</fileset>
<fileset dir="${dir.lib.cli}">
<include name="*.jar" />
</fileset>
</path>
<!-- =================================================================== -->
<!-- Clean the build directory -->
<!-- =================================================================== -->
<target name="clean" description="Cleanup build artifacts">
<delete dir="${dir.generated}" />
</target>
<!-- =================================================================== -->
<!-- Prepare the build directory -->
<!-- =================================================================== -->
<target name="setup" description="Prepare for build" depends="clean">
<mkdir dir="${dir.generated}" />
<mkdir dir="${dir.generated.java}" />
<mkdir dir="${dir.generated.classes}" />
</target>
<!-- =================================================================== -->
<!-- wsimport to generate the client stubs from the WSDL -->
<!-- =================================================================== -->
<target name="genclient" description="Generate stubs from the WSDL" depends="setup">
<exec executable="${java.home}/../bin/wsimport">
<arg line="-keep -d ${dir.generated.java} -extension -p com.bm.datalic.dlws.stubs ${dir.config.wsdl}" />
</exec>
</target>
<!-- =================================================================== -->
<!-- Compile the sample code (stubs already compiled) -->
<!-- =================================================================== -->
<target name="compile" description="Compile DLWS Sample Code" depends="genclient">
<javac destdir="${dir.generated.classes}" classpathref="lib.classpath" debug="on" includeantruntime="false">
<src path="${dir.src}" />
<src path="${dir.generated.java}" />
</javac>
</target>
<!-- =================================================================== -->
<!-- Run (replace ${sampleName} and ${programFlag} appropriately) -->
<!-- =================================================================== -->
<target name="run" description="Run DLWS Sample Code" depends="compile">
<java fork="true" classname="com.bm.datalic.dlws.PerSecurity">
<arg line="-s ${sampleName} -p ${programFlag}" />
<classpath>
<path refid="lib.classpath" />
</classpath>
<classpath location="${dir.generated.classes}" />
</java>
</target>
</project>
No comments:
Post a Comment