Commit 303b0297 authored by Anton Beloglazov's avatar Anton Beloglazov

Fixed Issue 32: problem with ant classpath declaration

parent 854f5b10
<?xml version="1.0"?> <?xml version="1.0"?>
<!-- <!--
July 2010 July 2010
Build file or Makefile for CloudSim. Build file or Makefile for CloudSim.
Note: Note:
Make sure you have installed 'ant' and put the location of it into Make sure you have installed 'ant' and put the location of it into
your path so you can access it anywhere. your path so you can access it anywhere.
'ant' can be downloadable from http://ant.apache.org/ 'ant' can be downloadable from http://ant.apache.org/
Usage: Usage:
* Type 'ant' to compile all cloudsim source files, put them into the * Type 'ant' to compile all cloudsim source files, put them into the
classes/ directory and to create a cloudsim-new.jar file in the jars/ directory classes/ directory and to create a cloudsim-new.jar file in the jars/ directory
* Type 'ant clean' to delete all the compiled classes and the classes/ * Type 'ant clean' to delete all the compiled classes and the classes/
directory itself. The generated cloudsim-new.jar is not deleted. directory itself. The generated cloudsim-new.jar is not deleted.
Note: Note:
* You need to set up PATH for ant in Windows and/or Unix. * You need to set up PATH for ant in Windows and/or Unix.
Acknowledgement: Acknowledgement:
Thank to Uros Cibej for providing this file and instruction on Thank to Uros Cibej for providing this file and instruction on
how to use it. how to use it.
--> -->
...@@ -36,46 +36,51 @@ Acknowledgement: ...@@ -36,46 +36,51 @@ Acknowledgement:
This is the build file for CloudSim This is the build file for CloudSim
</description> </description>
<!-- location of libraries --> <!-- location to store Java classes -->
<property name="classpath" location="./jars/flanagan.jar" />
<!-- location to store Java classes -->
<property name="class.dir" location="./classes" /> <property name="class.dir" location="./classes" />
<!-- location to store CloudSim source files --> <!-- location to store CloudSim source files -->
<property name="src.dir" location="./sources" /> <property name="src.dir" location="./sources" />
<!-- location to store jar files --> <!-- location to store jar files -->
<property name="jar.dir" location="./jars" /> <property name="jar.dir" location="./jars" />
<!-- classpath declaration -->
<path id="classpath">
<fileset dir="./jars">
<include name="*.jar" />
</fileset>
</path>
<target name="prepare"> <target name="prepare">
<mkdir dir="${class.dir}" /> <mkdir dir="${class.dir}" />
</target> </target>
<!-- rule to compile CloudSim source files --> <!-- rule to compile CloudSim source files -->
<target name="build" depends="prepare"> <target name="build" depends="prepare">
<javac srcdir="${src.dir}" destdir="${class.dir}" classpath="${classpath}" <javac srcdir="${src.dir}" destdir="${class.dir}" includeantruntime="false">
includeantruntime="false" /> <classpath refid="classpath"/>
</javac>
</target> </target>
<!-- Rule for making a jar file. <!-- Rule for making a jar file.
Note: Note:
* The new jar file is named as "cloudsim-new.jar" to avoid overriding * The new jar file is named as "cloudsim-new.jar" to avoid overriding
the existing jar file. the existing jar file.
* The new jar file only contains cloudsim classes only. * The new jar file only contains cloudsim classes only.
--> -->
<target name="makejar" depends="build"> <target name="makejar" depends="build">
<echo>Compiling a new jar file, named: "cloudsim-new.jar".</echo> <echo>Compiling a new jar file, named: "cloudsim-new.jar".</echo>
<echo>This jar file contains CloudSim classes only.</echo> <echo>This jar file contains CloudSim classes only.</echo>
<jar destfile="${jar.dir}/cloudsim-new.jar" basedir="${class.dir}" /> <jar destfile="${jar.dir}/cloudsim-new.jar" basedir="${class.dir}" />
</target> </target>
<target name="clean" description="clean up" > <target name="clean" description="clean up" >
<delete dir="${class.dir}" /> <delete dir="${class.dir}" />
</target> </target>
</project> </project>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment