For more information on how the build file works and its syntax, refer to http://ant.apache.org/manual/. The following shows an example of the build file. Typically, the name of the component goes in at the placeholder (i.e., 1). <?xml version="1.0"?> <project name=" 1 " default="all" basedir="."> <description>${ant.project.name} Component</description> <property name="src" location="src" /> <property name="build" location="bin"/> <!Change the following lines to reflect Isight installations--> <property name=Isight-55" location= "C:\SIMULIA\Isight5.5" />" <property name=Isight-50 location= "C:\SIMULIA\Isight5.0" /> <property name="Isight-45 location= "C:\SIMULIA\Isight4.5" /> <!-- Change the location to the Isight version above which you want to compile against. The jar file name does not need to change --> <property name="Isight" location="$(Isight-50)" /? <property name="jarfile" value=" 1 .jar" /> <property name="homedir" value="com/engineous/component/ 1 " /> <property name="mmfile" value="${homedir}/ 1 .xml" /> <tstamp> <format property="timestamp" pattern="yyyy-MM-dd HH:mm:ss" /> </tstamp> <target name="all" depends="clean,compile,jar,publish" description="Cleans, comiles, jars, and publishes the ${ant.project.name} Component" /> <target name="compile" descripton= "Compiles the ${ant.project.name} Component"> <mkdir dir="${build}" /> <copy file=${src}/${mmfile}" tofile="${build}/${mmfile}" /> <copy file="{src}/${homedir}/gui/resources/parameterAdd.gif" tofile="${build}/${homedir}/gui/resources/parameterAdd .gif" /> <javac srcdir="${src}" destdir="${build}" debug="on" verbose="false"> <classpath> <fileset dir="${Isight}/sdk" includes="**/*.jar" /> <fileset dir="${Isight}/lib" includes="**/*.jar" /> </classpath> </javac> </target> <target name="jar" depends="compile" description="Jars the ${ant.project.name} Component"> <jar destfile="${jarfile}" basedir="${build}"> <manifest> <attribute name="Manifest-Version" value="1.0" /> <attribute name="Bult-By value= SIMULIA" /> <attribute name="Build-Date" value="${timestamp}" /> <attribute name="Implementation-Version" value="2.0.0" /> <attribute name="Implementation-Vendor" value= SIMULIA" /> <attribute name="Implementation-Vendor-Id" value=com.engineous /> <section name="${mmfile}"> <attribute name="Meta-Model" value="true" /> </section> </manifest> </jar> </target> <target name="publish" depends="jar" description= "Publishes the ${ant.project.name} Component"> <exec executable="${Isight}/bin/win32/fipercmd.bat">\ <arg line="publish file:${jarfile} type:metamodel profile:standalone logonprompt:no:/> </exec> </target> <target name="clean" description="Cleans all build directories/files"> <delete dir=${build}" /> <delete file="${jarfile}" /> </target> </project> |