1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
|
<?xml version="1.0"?>
<project name="SpringExample" default="run" basedir=".">
<!--Edit properties in build.properties before running ant-->
<property file="build.properties"/>
<path id="all-libs">
<fileset dir="${springframework.dir}/lib">
<include name="**/*.jar"/>
</fileset>
<fileset dir="${springframework.dir}/dist">
<include name="*.jar"/>
</fileset>
<fileset dir="${xerces.dir}">
<include name="*.jar"/>
</fileset>
</path>
<target name="clean">
<delete dir="classes"/>
<delete file="springconfig.xml"/>
</target>
<target name="build" >
<mkdir dir="classes"/>
<javac destdir="classes"
deprecation="false" optimize="false" failonerror="true">
<src path="${src.dir}"/>
<classpath refid="all-libs"/>
</javac>
<copy todir=".">
<fileset dir="${src.dir}">
<include name="springconfig.xml"/>
</fileset>
</copy>
</target>
<target name="run" depends="build">
<java classname="Hello">
<classpath>
<pathelement path="classes"/>
<pathelement path=".src.pack"/>
<path refid="all-libs"/>
</classpath>
</java>
</target>
</project> |
Partager