`
jayjayjaylun
  • 浏览: 87157 次
  • 性别: Icon_minigender_1
  • 来自: 广州
社区版块
存档分类
最新评论

ant 编译路经

    博客分类:
  • java
阅读更多
<project name="avm" default="hkdev22" basedir=".">

	<description>
		The build file for AVM project
	</description>

	<!-- set global properties for this build -->
	<property name="prj_name" value="avm" />
	<property name="src" location="src" />
	<property name="build" location="build" />
	<property name="dist" location="dist" />
	<property name="deploy" location="deploy" />
	<property name="dist_file" value="${dist}/${prj_name}" />

	<!-- set the library file to empty first -->
	<property name="lib_common" value="common" />
	<!--modify by frank
	<property name="lib_spring" value="spring/spring1.2" />
	-->
	<property name="lib_spring" value="../libgt/spring/spring2.0.6" />
	<property name="lib_hibernate" value="hibernate/hibernate2" />
	<property name="lib_mysql_connector" value="jdbc/MySQL/v3.1.6" />

	<!-- Carry out all the initialization work -->
	<target name="init">
		<!-- Create the time stamp -->
		<tstamp />
		<!-- Create the build directory structure used by compile -->
		<mkdir dir="${build}" />
	</target>

    <path id="lib.class.path" >
        <fileset dir="webapp/WEB-INF/lib" >
            <include name="*.jar" />
        </fileset>
    	
    	<fileset dir="${lib_spring}" >
    		<include name="*.jar" />
    	</fileset>
        <!--<fileset dir="${jar.all.dir}" >
            <include name="**/*.jar" />
            <include name="*.jar" />
        </fileset>-->
    </path>


    <!-- Compile the source -->
	<target name="compile" depends="init" description="compile the source ">
		<javac srcdir="${src}"  destdir="webapp/WEB-INF/classes" encoding="utf-8" >

            <classpath refid="lib.class.path" />
        </javac>
	</target>
<project> 


 <path id="lib.class.path" >
        <fileset dir="webapp/WEB-INF/lib" >
            <include name="*.jar" />
        </fileset>
    	
    	<fileset dir="${lib_spring}" >
    		<include name="*.jar" />
    	</fileset>
        <!--<fileset dir="${jar.all.dir}" >
            <include name="**/*.jar" />
            <include name="*.jar" />
        </fileset>-->
    </path>



eclipse 编译的时候 要使用编写的classpath 经常忘记
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics