Be happy with Java

这两天在写的这个破烂ant,还有错误,tnnd.(修改版,已完成)

jar包那采用了一种很极端的方式,本来引用过的,又引用了一次。老大让我把这个写成ppt,今明两天就把框架写好吧。细节问题的改进可能没有时间做了。先交。

  1 <? xml version="1.0" ?>
  2 <!--  build.xml - a Deploy Ant buildfile  -->
  3 < project  name ="Deploy"  default ="listenerspackage"  basedir ="." >
  4     
  5      < property  name ="GMD_Common_Lib"  value ="${basedir}/GMD_Common_Lib" />
  6      < property  name ="GMD_Clients"  value ="${basedir}/GMD_Clients" />
  7      < property  name ="GMD_Router"  value ="${basedir}/GMD_Router" />
  8      < property  name ="GMD_Core"  value ="${basedir}/GMD_Core" />
  9      < property  name ="GMD_Listeners"  value ="${basedir}/GMD_Listeners" />
 10      < property  name ="properties"  value ="${basedir}/properties" />
 11     
 12     
 13      < property  name ="src.dir"  value ="${basedir}/src" />
 14
 15      < property  name ="Comm_Lib.src"  value ="${src.dir}/GMD_Common_Lib" />
 16      < property  name ="Clients.src"  value ="${src.dir}/GMD_Clients" />
 17      < property  name ="Router.src"  value ="${src.dir}/GMD_Router" />
 18      < property  name ="Core.src"  value ="${src.dir}/GMD_Core" />
 19      < property  name ="Listeners.src"  value ="${src.dir}/GMD_Listeners" />
 20
 21      <!-- Temporary build directories  -->
 22
 23      < property  name ="build.dir"  value ="${basedir}/build" />
 24
 25      < property  name ="build.src"  value ="${build.dir}/src" />
 26
 27      < property  name ="Comm_Lib.buildsrc"  value ="${build.src}/GMD_Common_Lib" />
 28      < property  name ="Clients.buildsrc"  value ="${build.src}/GMD_Clients" />
 29      < property  name ="Router.buildsrc"  value ="${build.src}/GMD_Router" />
 30      < property  name ="Core.buildsrc"  value ="${build.src}/GMD_Core" />
 31      < property  name ="Listeners.buildsrc"  value ="${build.src}/GMD_Listeners" />
 32
 33      < property  name ="build.classes"  value ="${build.dir}/classes" />
 34
 35      < property  name ="Comm_Lib.buildclasses"  value ="${build.classes}/GMD_Common_Lib" />
 36      < property  name ="Clients.buildclasses"  value ="${build.classes}/GMD_Clients" />
 37      < property  name ="Router.buildclasses"  value ="${build.classes}/GMD_Router" />
 38      < property  name ="Core.buildclasses"  value ="${build.classes}/GMD_Core" />
 39      < property  name ="Listeners.buildclasses"  value ="${build.classes}/GMD_Listeners" />
 40
 41      <!-- temp folder contains the unjar(by shell scripts) lib -->
 42      < property  name ="build.lib"  value ="${build.dir}/lib" />
 43      < property  name ="lib"  value ="${basedir}/lib" />
 44      < property  name ="temp"  value ="${lib}/temp" />
 45     
 46      <!--  Target to create the build directories prior to the  -->
 47      <!-- compile target.  -->
 48      < target  name ="prepare"  description ="mkdir and copy souce code preparation" >
 49          < mkdir  dir ="${src.dir}" />
 50          < mkdir  dir ="${build.dir}" />
 51          < mkdir  dir ="${build.src}" />
 52          < mkdir  dir ="${build.classes}" />
 53          < mkdir  dir ="${Comm_Lib.buildclasses}" />
 54          < mkdir  dir ="${Clients.buildclasses}" />
 55          < mkdir  dir ="${Router.buildclasses}" />
 56          < mkdir  dir ="${Core.buildclasses}" />
 57          < mkdir  dir ="${Listeners.buildclasses}" />
 58          < mkdir  dir ="${build.lib}" />     
 59          <!-- copy src files & lib of third party -->
 60          < copy  todir ="${Comm_Lib.src}" >
 61              < fileset  dir ="${GMD_Common_Lib}" />
 62          </ copy >
 63          < copy  todir ="${Clients.src}" >
 64              < fileset  dir ="${GMD_Clients}" />
 65          </ copy >
 66          < copy  todir ="${Router.src}" >
 67              < fileset  dir ="${GMD_Router}" />
 68          </ copy >
 69          < copy  todir ="${Core.src}" >
 70              < fileset  dir ="${GMD_Core}" />
 71          </ copy >
 72          < copy  todir ="${Listeners.src}" >
 73              < fileset  dir ="${GMD_Listeners}" />
 74          </ copy >
 75          < copy  todir ="${build.src}" >
 76              < fileset  dir ="${src.dir}" />
 77          </ copy >
 78          < copy  todir ="${build.lib}" >
 79              < fileset  dir ="${lib}" />
 80          </ copy >
 81      </ target >
 82
 83      < target  name ="clean"  description ="Removes all generated files." >
 84          < delete  dir ="${build.dir}" />
 85      </ target >
 86
 87      < target  name ="commlibcompile"  depends ="prepare"  description ="Compiles GMD_Comm_Lib source code." >
 88          < javac  encoding ="iso-8859-1"  destdir ="${Comm_Lib.buildclasses}" >
 89              < src  path ="${Comm_Lib.src}" />
 90              < classpath >
 91                  < fileset  dir ="${build.lib}" >
 92                      < include  name ="**/*.jar" />
 93                  </ fileset >
 94                  < pathelement  location ="${build.lib}" />
 95                  <!-- <pathelement location="${build.lib}/**/*.jar"/> -->
 96              </ classpath >
 97          </ javac >
 98      </ target >
 99
100      < target  name ="libcopy"  depends ="commlibcompile"  description ="Copy unjar lib." >
101          < copy  todir ="${Comm_Lib.buildclasses}" >
102              < fileset  dir ="${temp}" />
103          </ copy >
104      </ target >
105     
106      < target  name ="propertiescopy"  depends ="libcopy"  description ="Copy properties files." >
107          < copy  todir ="${Comm_Lib.buildclasses}" >
108              < fileset  dir ="${properties}" />
109          </ copy >
110      </ target >
111     
112      < target  name ="commlibpackage"  depends ="propertiescopy"  description ="package comlib." >
113          < jar  jarfile ="${basedir}/GMDCommLib.jar"  basedir ="${Comm_Lib.buildclasses}"  includes ="**" />
114      </ target >
115     
116      < target  name ="clientscompile"  depends ="commlibpackage"  description ="Compiles GMD_Clients source code." >
117          < javac  encoding ="iso-8859-1"  destdir ="${Clients.buildclasses}" >
118              < src  path ="${Clients.src}" />
119              < classpath >
120                  < fileset  dir ="${basedir}" >
121                      < include  name ="*.jar" />
122                  </ fileset >
123                  <!-- <pathelement location="${basedir}"/> -->
124                  < fileset  dir ="${lib}" >
125                      < include  name ="**/*.jar" />
126                  </ fileset >
127                  < pathelement  location ="${lib}" />
128              </ classpath >
129          </ javac >
130      </ target >
131     
132      < target  name ="clientspackage"  depends ="clientscompile"  description ="package clients." >
133          < jar  jarfile ="${basedir}/GMDClients.jar"  basedir ="${Clients.buildclasses}"  includes ="**" />
134      </ target >
135     
136      < target  name ="routercompile"  depends ="clientspackage"  description ="Complies GMD_Router source code." >
137          < javac  encoding ="iso-8859-1"  destdir ="${Router.buildclasses}" >
138              < src  path ="${Router.buildsrc}" />
139              < classpath >
140                  < fileset  dir ="${basedir}" >
141                      < include  name ="*.jar" />
142                  </ fileset >
143                  <!-- <pathelement location="${basedir}"/> -->
144                  < fileset  dir ="${lib}" >
145                      < include  name ="**/*.jar" />
146                  </ fileset >
147                  < pathelement  location ="${lib}" />
148              </ classpath >
149          </ javac >
150      </ target >
151     
152      < target  name ="routerpackage"  depends ="routercompile"  description ="package router." >
153          < jar  jarfile ="${basedir}/GMDRouter.jar"  basedir ="${Router.buildclasses}"  includes ="**" />
154      </ target >
155
156      < target  name ="corecompile"  depends ="routerpackage"  description ="Compiles GMD_Core source code." >
157          < javac  encoding ="iso-8859-1"  destdir ="${Core.buildclasses}" >
158              < src  path ="${Core.src}" />
159              < classpath >
160                  < fileset  dir ="${basedir}" >
161                      < include  name ="*.jar" />
162                  </ fileset >
163                  <!-- <pathelement location="${basedir}"/> -->
164                  < fileset  dir ="${lib}" >
165                      < include  name ="**/*.jar" />
166                  </ fileset >
167                  < pathelement  location ="${lib}" />
168              </ classpath >
169          </ javac >
170      </ target >
171     
172      < target  name ="corepackage"  depends ="corecompile"  description ="package core" >
173          < jar  jarfile ="${basedir}/GMDCore.jar"  basedir ="${Core.buildclasses}"  includes ="**" />
174      </ target >
175     
176      < target  name ="listenerscompile"  depends ="corepackage"  description ="Compile GMD_Listeners source code." >
177          < javac  encoding ="iso-8859-1"  destdir ="${Listeners.buildclasses}" >
178              < src  path ="${Listeners.src}" />
179                  < classpath >
180                  < fileset  dir ="${basedir}" >
181                      < include  name ="*.jar" />
182                  </ fileset >
183                  <!-- <pathelement location="${basedir}"/> -->
184                  < fileset  dir ="${lib}" >
185                      < include  name ="**/*.jar" />
186                  </ fileset >
187                  < pathelement  location ="${lib}" />
188              </ classpath >
189          </ javac >
190      </ target >
191     
192      < target  name ="listenerspackage"  depends ="listenerscompile"  description ="package listeners" >
193          < jar  jarfile ="${basedir}/GMDListeners.jar"  basedir ="${Listeners.buildclasses}"  includes ="**" />
194      </ target >
195
196      <!--
197     <target name="build-lib">
198         <javac srcdir="${src.ejb.dir}:${src.java.dir}" destdir="${build.dir}" debug="on" deprecation="on" includes="**/*.java"
199         excludes="${global.exclude}">
200             <classpath>
201                 <pathelement location="."/>
202                 <pathelement location="${lib.dir}/somlib.jar"/>
203             <classpath>
204         </javac>
205         <jar jarfile="${dist}/lib/finallib.jar" basedir="${build.dir}"/>
206         <copy todir="${weblogic.dir}/${weblogic.server.home}/public_html/jsp">
207             <fileset dir="${src.www.dir}/jsp"/>
208         </copy>
209     </target>
210      -->
211 </ project >
212 <!--  End of file  -->

posted on 2006-07-06 20:35 SYBIL@BLOGJAVA 阅读(366) 评论(0)  编辑  收藏


只有注册用户登录后才能发表评论。


网站导航: