`
wenjinglian
  • 浏览: 821783 次
  • 性别: Icon_minigender_1
  • 来自: 株洲->深圳
社区版块
存档分类
最新评论

以前的一个后台程序目录

    博客分类:
  • JAVA
阅读更多

结构:


 

build.xml文件
 

<?xml version="1.0" encoding="UTF-8"?>
<!--  
     @author howard Han
     @version 2.0
     @date 2009-2-1
-->
<project name="DAC" default="tar" basedir=".">

	<!--the class idr -->
	<property name="lib" value="lib" />
	<property name="src" value="src" />
	<property name="bin" value="bin" />
	<property name="build" value="build" />
	<property name="build.jar" value="${lib}/dac.jar" />
	<property name="class.dir" value="${build}/classes" />
	<property name="dac.tar" value="${build}/dac.tar" />
	<property name="conf.dir" value="conf" />
	
	<property name="tmp.tar.dir" value="tmp" />

	<!--clean the dir -->
	<target name="clean">
		<delete dir="${class.dir}" quiet="true" />
		<delete file="${build.jar}" quiet="true" />
	</target>

	<!--init -->
	<target name="init" depends="clean">
		<mkdir dir="${class.dir}" />
		<path id="javac.classpath">
			<fileset dir="${lib}">
				<include name="**/**/*.jar" />
			</fileset>
		</path>
	</target>

	<!--compile the given src based on javac.classpath -->
	<target name="compile" depends="init" description="Compile all Java">

		<javac srcdir="${src}" destdir="${class.dir}" encoding="utf-8" debug="on">
			<classpath refid="javac.classpath" />
		</javac>

		<!--Jars a set of files -->
		<jar destfile="${build.jar}" basedir="${class.dir}" />

	</target>


	<!--creat tar file for behaviorl analysis module, -->
	<target name="tar" depends="compile" description="create bam.tar">
		<delete file="${dac.tar}" />
		<mkdir dir="${build}/${tmp.tar.dir}"/>
	    <mkdir dir="${build}/${tmp.tar.dir}/lib"/>
	    <mkdir dir="${build}/${tmp.tar.dir}/bin"/>
		<mkdir dir="${build}/${tmp.tar.dir}/conf"/>
		<mkdir dir="${build}/${tmp.tar.dir}/log" />
		
		<copy todir="${build}/${tmp.tar.dir}/lib">
			<fileset dir="${lib}" includes="**/**/*.jar" />
		</copy>

		<copy todir="${build}/${tmp.tar.dir}/conf">
			<fileset dir="${conf.dir}" includes="**/**/*.properties" />
			<fileset dir="${conf.dir}" includes="**/**/*.xml" />
			<fileset dir="${conf.dir}" includes="**/**/*.conf" />
		</copy>
		
		<copy todir="${build}/${tmp.tar.dir}/jni">
					<fileset dir="jni" includes="**/**/*.so" />
					<fileset dir="jni" includes="**/**/*.dll" />
			        <fileset dir="jni" includes="**/**/*.model" />
		</copy>
		
		<copy todir="${build}/${tmp.tar.dir}/">
			<fileset dir="${bin}" includes="*.*" />
		</copy>
		
		<copy todir="${build}/${tmp.tar.dir}/dict">
			<fileset dir="dict" includes="*.*" />
		</copy>
				
		<tar longfile= "gnu" destfile="${dac.tar}" basedir="${build}/tmp" />
		
		<delete dir="${build}/${tmp.tar.dir}" quiet="true" />
		<delete dir="${class.dir}" quiet="true" />

	</target>

</project>

 

非常感谢那些以前帮助过俺的朋友们!!!

  • 大小: 14.3 KB
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics