{"id":649,"date":"2017-03-03T15:10:05","date_gmt":"2017-03-03T07:10:05","guid":{"rendered":"http:\/\/www.xttblog.com\/?p=649"},"modified":"2017-03-03T15:10:05","modified_gmt":"2017-03-03T07:10:05","slug":"ant%e6%8c%87%e4%bb%a4build-xmlant%e8%bf%90%e8%a1%8c%e7%9a%84%e9%85%8d%e7%bd%ae%e6%96%87%e4%bb%b6%e5%91%bd%e4%bb%a4%e9%9b%86","status":"publish","type":"post","link":"https:\/\/www.xttblog.com\/?p=649","title":{"rendered":"ANT\u6307\u4ee4build.xml[ANT\u8fd0\u884c\u7684\u914d\u7f6e\u6587\u4ef6]\u547d\u4ee4\u96c6"},"content":{"rendered":"<p>\n\tANT\u6307\u4ee4build.xml[ANT\u8fd0\u884c\u7684\u914d\u7f6e\u6587\u4ef6]\u547d\u4ee4\u96c6<br \/>\n\t1.ANT\u793a\u4f8b1.0(\u5c06\u6307\u5b9a\u8def\u5f84\u4e0b\u7684\u6587\u4ef6\u590d\u5236\u5230\u6307\u5b9a\u7684\u5176\u4ed6\u4f4d\u7f6e)<br \/>\n\t&lt;?xml version=&quot;1.0&quot; encoding=&quot;GBK&quot;?&gt;<br \/>\n\t&lt;project [&nbsp;Project\u6839\u6807\u7b7e]name[ name &#8211;\u9879\u76ee\u540d\u79f0<br \/>\n\t(3) basedir&nbsp;property\u8986\u76d6\u3002\u5982\u679c\u5c5e\u6027\u548cbasedir&nbsp;property\u90fd\u6ca1\u6709\u8bbe\u5b9a\uff0c\u5c31\u4f7f\u7528buildfile\u6587\u4ef6\u7684\u7236\u76ee\u5f55\u3002 ]=&quot;\u6d4b\u8bd5\u811a\u672c&quot; default[default &#8211;\u5f53\u6ca1\u6709\u6307\u5b9atarget\u65f6\u4f7f\u7528\u7684\u7f3a\u7701target]=&#8221;copyfile&#8221; basedir[basedir &#8211;\u7528\u4e8e\u8ba1\u7b97\u6240\u6709\u5176\u4ed6\u8def\u5f84\u7684\u57fa\u8def\u5f84\u3002\u8be5\u5c5e\u6027\u53ef\u4ee5\u88ab]=&quot;.&quot; &gt;<br \/>\n\t&lt;target name=&quot;copyfile&quot;&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;copy file=&quot;d:\/a.txt&quot; todir=&quot;e:\/Temp&quot; overwrite=&quot;true&quot; \/&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&lt;\/target&gt;<br \/>\n\t&lt;\/project&gt;<br \/>\n\t2.ANT\u793a\u4f8b1.1(\u7f16\u8bd1\u3001\u8fd0\u884c\u9879\u76eeantTest)<br \/>\n\t&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; ?&gt;<br \/>\n\t&lt;project name=&quot;antTest&quot; default=&quot;run&quot; basedir=&quot;.&quot;&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&lt;property [\u914d\u7f6e\u6587\u4ef6\u4e2d\u7684\u53d8\u91cf]name=&quot;src&quot; value=&quot;src&quot; \/&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&lt;property name=&quot;dest&quot; value=&quot;classes&quot; \/&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&lt;property name=&quot;hello_jar&quot; value=&quot;hello1.jar[ANT\u6253\u5305jar\u7684\u540d\u79f0\u3002\u5982\u6253war\u5305\uff1ahello1.war]&quot; \/&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&lt;target[ANT\u6267\u884c\u547d\u4ee4,\u521d\u59cb\u5316\u547d\u4ee4.\u8fd9\u91ccmkdir\u521b\u5efa\u76ee\u5f55\u547d\u4ee4] name=&quot;init&quot;&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;mkdir dir=&quot;${dest}&quot; \/&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&lt;\/target&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&lt;target name=&quot;compile&quot; depends=&quot;init&quot;[\u5728\u6267\u884c\u8be5\u547d\u4ee4\u524d\u6267\u884cinit\u547d\u4ee4]&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;javac srcdir[\u521b\u5efascr\u76ee\u5f55\uff0c\u5373classes]=&quot;${src}&quot; destdir=&quot;${dest}&quot; \/&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&lt;\/target&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&lt;target name=&quot;build&quot; depends=&quot;compile&quot;&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;jar jarfile=&quot;${hello_jar}[jar\u6587\u4ef6\u751f\u6210\u4f4d\u7f6e]&quot; basedir=&quot;${dest}&quot; \/&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&lt;\/target&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&lt;target name=&quot;run&quot; depends=&quot;build&quot;&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;java classname=&quot;test.ant.HelloWorld&quot;[\u6253\u5305\u6307\u5b9a\u7684class\u7c7b] classpath=&quot;${hello_jar}&quot; \/&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&lt;\/target&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&lt;target name=&quot;clean&quot;&gt;[\u6253\u5305\u5b8c\u6210\u540e\uff0c\u5220\u9664.class\u6587\u4ef6]<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;delete dir=&quot;${dest}&quot; \/&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;delete file=&quot;${hello_jar}&quot; \/&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&lt;\/target&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&lt;target name=&quot;rerun&quot; depends=&quot;clean,run&quot;&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;ant target=&quot;clean&quot; \/&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;ant target=&quot;run&quot; \/&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&lt;\/target&gt;<br \/>\n\t&lt;\/project&gt;<br \/>\n\t3. ANT\u793a\u4f8b1.2(\u7f16\u8bd1\u3001\u8fd0\u884c\u9879\u76eeantTest)<br \/>\n\t&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; ?&gt;<br \/>\n\t&lt;project name=&quot;antTest&quot; default=&quot;war&quot;[\u9ed8\u8ba4\u6267\u884cwar\u547d\u4ee4] basedir=&quot;.&quot;&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&lt;property name=&quot;classes&quot; value=&quot;build\/classes&quot; \/&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&lt;property name=&quot;build&quot; value=&quot;build&quot; \/&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&lt;property name=&quot;lib&quot; value=&quot;WebRoot\/WEB-INF\/lib&quot; \/&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&lt;!&#8211; \u5220\u9664build\u8def\u5f84&#8211;&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&lt;target name=&quot;clean&quot;&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;delete dir=&quot;build&quot; \/&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&lt;\/target&gt;\n<\/p>\n<p>\n\t&nbsp;&nbsp; &nbsp;&lt;!&#8211; \u5efa\u7acbbuild\/classes\u8def\u5f84\uff0c\u5e76\u7f16\u8bd1class\u6587\u4ef6\u5230build\/classes\u8def\u5f84\u4e0b&#8211;&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&lt;target name=&quot;compile&quot; depends=&quot;clean&quot;&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;mkdir dir=&quot;${classes}&quot; \/&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;javac srcdir=&quot;src&quot; destdir=&quot;${classes}&quot; includeantruntime=&quot;on&quot; \/&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&lt;\/target&gt;\n<\/p>\n<p>\n\t&nbsp;&nbsp; &nbsp;&lt;!&#8211; \u6253war\u5305&#8211;&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&lt;target name=&quot;war&quot; depends=&quot;compile&quot;&gt;[\u8fd9\u91cc\u5148\u6267\u884c\u627ewar\u547d\u4ee4\uff0c\u627e\u5230war\u547d\u4ee4\u540e\uff0c\u53d1\u73b0\u5728\u6267\u884cwar\u884c\u65f6\uff0c\u5fc5\u987b\u5148\u6267\u884ccompile\u547d\u4ee4\u3002\u5f53\u627e\u5230compile\u547d\u4ee4\u540e\uff0c\u53d1\u73b0\u5fc5\u987b\u5148\u6267\u884cclean\u547d\u4ee4\u3002\u627e\u5230clean\u547d\u4ee4\u540e\uff0c\u5f00\u59cb\u6267\u884c\u3002\u5b9e\u9645\u4e0a\uff0c\u8fd9\u91cc\u6700\u5f00\u59cb\u6267\u884c\u7684\u662fclean\u547d\u4ee4\uff0c\u7136\u540e\u63a5\u7740\u4e00\u5c42\u4e00\u5c42\u7684\u6267\u884c\u3002]<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;war destfile=&quot;${build}\/antTest.war&quot; webxml=&quot;WebRoot\/WEB-INF\/web.xml&quot;&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;!&#8211; \u62f7\u8d1dWebRoot\u4e0b\u9664\u4e86WEB-INF\u548cMETA-INF\u7684\u4e24\u4e2a\u6587\u4ef6\u5939&#8211;&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;fileset dir=&quot;WebRoot&quot; includes=&quot;**\/*.jsp&quot; \/&gt;\n<\/p>\n<p>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;!&#8211; \u62f7\u8d1dlib\u76ee\u5f55\u4e0b\u7684jar\u5305&#8211;&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;lib dir=&quot;${lib}&quot; \/&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;!&#8211; \u62f7\u8d1dbuild\/classes\u4e0b\u7684class\u6587\u4ef6&#8211;&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;classes dir=&quot;${classes}&quot;\/&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;\/war&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&lt;\/target&gt;<br \/>\n\t&lt;\/project&gt;<br \/>\n\t4. ANT\u793a\u4f8b1.3(\u7f16\u8bd1\u3001\u8fd0\u884c\u9879\u76eeantTest)<br \/>\n\t&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; ?&gt;<br \/>\n\t&lt;project name=&quot;antTest&quot; default=&quot;compile&quot; basedir=&quot;.&quot;&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&lt;target name=&quot;clean&quot;&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;delete dir=&quot;build&quot; \/&gt;[\u5220\u9664\u6587\u4ef6build\u547d\u4ee4]<br \/>\n\t&nbsp;&nbsp; &nbsp;&lt;\/target&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&lt;target name=&quot;compile&quot; depends=&quot;clean&quot;&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;mkdir dir=&quot;build\/classes&quot; \/&gt;[\u521b\u5efa\u591a\u7ea7\u76ee\u5f55]<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;javac srcdir=&quot;src&quot; destdir=&quot;build\/classes&quot; \/&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&lt;\/target&gt;<br \/>\n\t&lt;\/project&gt;<br \/>\n\t5. ANT\u793a\u4f8b1.4(\u7f16\u8bd1\u3001\u8fd0\u884c\u9879\u76eeantTest)<br \/>\n\t&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; ?&gt;<br \/>\n\t&lt;project name=&quot;javaTest&quot; default=&quot;jar&quot; basedir=&quot;.&quot;&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&lt;target name=&quot;clean&quot;&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;delete dir=&quot;build&quot; \/&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&lt;\/target&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&lt;target name=&quot;compile&quot; depends=&quot;clean&quot;&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;mkdir dir=&quot;build\/classes&quot; \/&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;javac srcdir=&quot;src&quot; destdir=&quot;build\/classes&quot; \/&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&lt;\/target&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&lt;target name=&quot;run&quot; depends=&quot;compile&quot;&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;java classname=&quot;test.ant.HelloWorld&quot;&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;classpath&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;pathelement path=&quot;build\/classes&quot; \/&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;\/classpath&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;\/java&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&lt;\/target&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&lt;target name=&quot;jar&quot; depends=&quot;run&quot;&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;jar destfile=&quot;helloworld.jar&quot; basedir=&quot;build\/classes&quot;&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;manifest[\u6307\u5b9amain\u65b9\u6cd5\u914d\u7f6e]&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;attribute name=&quot;Main-class&quot; value=&quot;HelloWorld&quot; \/&gt;[\u6307\u5b9aHelloWorld\u7c7b\u7684main\u65b9\u6cd5]<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;\/manifest&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;\/jar&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&lt;\/target&gt;<br \/>\n\t&lt;\/project&gt;<br \/>\n\t6. ANT\u793a\u4f8b1.5(\u7f16\u8bd1\u3001\u8fd0\u884c\u9879\u76ee)\u590d\u6742\u7684\u914d\u7f6e<br \/>\n\t&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;<br \/>\n\t&lt;project name=&quot;antTest&quot; basedir=&quot;.&quot; default=&quot;pack.web[\u627epack.web\u547d\u4ee4]&quot;&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&lt;property name=&quot;build.debug&quot; value=&quot;on&quot; \/&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&lt;property name=&quot;build.debug.level&quot; value=&quot;lines,vars,source&quot; \/&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&lt;property name=&quot;compile.deprecation&quot; value=&quot;false&quot; \/&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&lt;property name=&quot;compile.optimize&quot; value=&quot;true&quot; \/&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&lt;property name=&quot;source.excludes&quot; value=&quot;applicationContext.xml, jdbc.properties &quot; \/&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&lt;property name=&quot;portal.opensource.excludes&quot; value=&quot;wlclient.jar,servlet-api.jar,j2ee.jar&quot; \/&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&lt;property name=&quot;lib.dev.excludes&quot; value=&quot;a.jar&quot; \/&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&lt;property name=&quot;source.dao.dir&quot; value=&quot;${basedir}\/..\/dao&quot; \/&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&lt;property name=&quot;source.mgr.dir&quot; value=&quot;${basedir}\/..\/mgr&quot; \/&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&lt;property name=&quot;source.portal.dir&quot; value=&quot;${basedir}\/..\/web&quot; \/&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&lt;property name=&quot;build.dir&quot; value=&quot;c:\/web&quot; \/&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&lt;property name=&quot;lib.dir&quot; value=&quot;${basedir}\/..\/libIbssPub&quot; \/&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&lt;property name=&quot;lib.dev.dir&quot; value=&quot;${lib.dir}\/dev&quot; \/&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&lt;property name=&quot;lib.opensource.dir&quot; value=&quot;${lib.dir}\/opensource&quot; \/&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&lt;property name=&quot;lib.weblogic.dir&quot; value=&quot;${lib.dir}\/weblogic&quot; \/&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&lt;target name=&quot;clean&quot;&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;delete dir=&quot;${build.dir}&quot; \/&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;mkdir dir=&quot;${build.dir}\/mgr&quot; \/&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;mkdir dir=&quot;${build.dir}\/dao&quot; \/&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&lt;\/target&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&lt;path id=&quot;general.compile.classpath&quot;&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;fileset dir=&quot;${lib.opensource.dir}&quot; includes=&quot;**\/*.jar&quot; \/&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;fileset dir=&quot;${lib.dev.dir}&quot; includes=&quot;**\/*.jar&quot; \/&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;fileset dir=&quot;${lib.weblogic.dir}&quot; includes=&quot;**\/*.jar&quot; \/&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&lt;\/path&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&lt;target name=&quot;compile.mgr&quot;&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;javac destdir=&quot;${build.dir}\/mgr&quot; encoding=&quot;GBK&quot; debug=&quot;${build.debug}&quot; debuglevel=&quot;${build.debug.level}&quot;[\u6307\u5b9a\u65e5\u5fd7\u7ea7\u522b] deprecation=&quot;${compile.deprecation}&quot; optimize=&quot;${compile.optimize}&quot;&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;src path=&quot;${source.mgr.dir}\/src&quot; \/&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;classpath refid=&quot;general.compile.classpath&quot; \/&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;classpath&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;fileset file=&quot;${build.dir}\/dao.jar&quot; \/&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;\/classpath&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;\/javac&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;copy todir=&quot;${build.dir}\/mgr&quot;&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;fileset dir=&quot;${source.mgr.dir}\/src&quot; excludes[\u6392\u9664\u6307\u5b9a\u8def\u5f84\u4e0b\u7684\u6587\u4ef6\u7684\u547d\u4ee4]=&quot;**\/*.java, &nbsp;**\/*.class, log4j.properties, ${source.excludes}&quot; \/&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;\/copy&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&lt;\/target&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&lt;target name=&quot;compile.dao&quot;&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;javac srcdir=&quot;${source.dao.dir}\/src&quot; destdir=&quot;${build.dir}\/dao&quot; encoding=&quot;GBK&quot;[\u6307\u5b9a\u7f16\u7801GBK] debug=&#8221;${build.debug}&#8221; debuglevel=&#8221;${build.debug.level}&#8221; deprecation=&#8221;${compile.deprecation}&#8221; optimize=&#8221;${compile.optimize}&#8221;[\u4f18\u5316\u6307\u5b9a\u76ee\u5f55]&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;classpath refid=&quot;general.compile.classpath&quot; \/&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;\/javac&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;copy todir=&quot;${build.dir}\/dao&quot; overwrite=&quot;true&quot;&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;fileset dir=&quot;${source.dao.dir}\/src&quot; excludes=&quot;**\/*.java, **\/*.class, log4j.properties, ${source.excludes}&quot; \/&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;\/copy&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&lt;\/target&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&lt;target name=&quot;pack.dao&quot; depends=&quot;compile.dao&quot;&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;delete file=&quot;${build.dir}\/dao.jar&quot; \/&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;jar destfile=&quot;${build.dir}\/dao.jar&quot;&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;fileset dir=&quot;${build.dir}\/dao&quot; \/&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;\/jar&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&lt;\/target&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&lt;target name=&quot;pack.mgr&quot; depends=&quot;compile.mgr&quot;&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;delete file=&quot;${build.dir}\/mgr.jar&quot; \/&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;jar destfile=&quot;${build.dir}\/mgr.jar&quot;&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;fileset dir=&quot;${build.dir}\/mgr&quot; \/&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;\/jar&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&lt;\/target&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&lt;target name=&quot;pack.portal&quot;&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;war destfile=&quot;${build.dir}\/web.war&quot; webxml=&quot;${source.portal.dir}\/WebRoot\/WEB-INF\/web.xml&quot;&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;fileset dir=&quot;${source.portal.dir}\/WebRoot&quot; \/&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;lib dir=&quot;${lib.dev.dir}&quot; excludes=&quot;${lib.dev.excludes}&quot; \/&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;lib dir=&quot;${lib.opensource.dir}&quot; excludes=&quot;${portal.opensource.excludes}&quot; \/&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;lib dir=&quot;${build.dir}&quot; includes=&quot;*.jar&quot;[\u5bfc\u5165\u9879\u76ee\u4e2d\u5f15\u7528\u7684jar\u5305\u6587\u4ef6] \/&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;\/war&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&lt;\/target&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&lt;target name=&quot;pack.web&quot; description=&quot;\u6253\u5305WEB&quot;[\u5907\u6ce8\u547d\u4ee4]&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;echo file[\u521b\u5efajdbc.properties\u6587\u4ef6,\u5e76\u65b0\u589e\u5185\u5bb9]=&quot;${source.portal.dir}\/src\/jdbc.properties&quot; append=&quot;false&quot; message=&quot;jdbc.driverClassName=oracle.jdbc.driver.OracleDriver${line.separator}&quot; \/&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;echo file=&quot;${source.portal.dir}\/src\/jdbc.properties&quot; append=&quot;true&quot; message=&quot;jdbc.url=jdbc:oracle:thin:@127.0.0.1:1521:orcl${line.separator}&quot; \/&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;echo file=&quot;${source.portal.dir}\/src\/jdbc.properties&quot; append=&quot;true&quot; message=&quot;jdbc.username=web_dev${line.separator}&quot; \/&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;echo file=&quot;${source.portal.dir}\/src\/jdbc.properties&quot; append=&quot;true&quot; message=&quot;jdbc.password=devweb${line.separator}&quot; \/&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;echo file=&quot;${source.portal.dir}\/src\/jdbc.properties&quot; append=&quot;true&quot; message=&quot;datasource.name=jdbc\/web${line.separator}&quot; \/&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;antcall target=&quot;clean&quot; \/&gt;[\u5148\u6267\u884cclean\u547d\u4ee4]<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;antcall target=&quot;pack.dao&quot; \/&gt;[\u7b49\u5f85clean\u547d\u4ee4\u6267\u884c\u5b8c\u6bd5\u540e,\u6267\u884cpack.dao\u547d\u4ee4]<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;antcall target=&quot;pack.mgr&quot; \/&gt;[\u7b49\u5f85pack.dao\u547d\u4ee4\u6267\u884c\u5b8c\u6bd5\u540e,\u6267\u884cpack.mgr\u547d\u4ee4]<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;delete dir=&quot;${build.dir}\/mgr&quot; \/&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;delete dir=&quot;${build.dir}\/dao&quot; \/&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;antcall target=&quot;pack.portal&quot; \/&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;exec executable=&quot;cmd.exe&quot;&gt;[\u6253\u5f00cmd.exe, \u5207\u6362\u5230c\u76d8,\u5f00\u59cb\u542f\u52a8tomcat]<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;arg value=&quot;\/c&quot; \/&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;arg value=&quot;start ${build.dir}&quot; \/&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;\/exec&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&lt;\/target&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&lt;property name=&quot;tomcat.home&quot; value=&quot;D:\/apache-tomcat-6.0.20[\u9879\u76ee\u6253\u5305\u90e8\u7f72\u8def\u5f84]&quot; \/&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&lt;target name=&quot;deploy.tomcat&quot; description=&quot;\u90e8\u7f72\u5230tomcat&quot;&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;copy todir=&quot;${tomcat.home}\/webapps&quot; overwrite=&quot;true&quot;&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;fileset dir=&quot;${build.dir}&quot; includes=&quot;web.war&quot; \/&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;\/copy&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&lt;\/target&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&lt;target name=&quot;tomcat.start&quot;&gt;[\u542f\u52a8tomcat\u547d\u4ee4]<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;java jar=&quot;${tomcat.home}\/bin\/bootstrap.jar&quot; fork=&quot;true&quot;&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;jvmarg value=&quot;-Dcatalina.home=${tomcat.home}&quot; \/&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;jvmarg value=&quot;-Dsys.run.environment=SPS&quot; \/&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;jvmarg value=&quot;-Xdebug&quot; \/&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;\/java&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&lt;\/target&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&lt;target name=&quot;tomcat.stop[\u505c\u6b62tomcat\u547d\u4ee4]&quot;&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;java jar=&quot;${tomcat.home}\/bin\/bootstrap.jar&quot; fork=&quot;true&quot;&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;jvmarg value=&quot;-Dcatalina.home=${tomcat.home}&quot; \/&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;arg line=&quot;stop&quot; \/&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&lt;\/java&gt;<br \/>\n\t&nbsp;&nbsp; &nbsp;&lt;\/target&gt;<br \/>\n\t&lt;\/project&gt;<\/p>\n<!-- <audio autoplay=\"autoplay\" height=\"100\" width=\"100\" hidden=\"true\"><source src=\"https:\/\/c.coka.la\/orAvPR.mp3\" type=\"audio\/mp3\"\/><\/audio><img decoding=\"async\" src=\"https:\/\/images.weserv.nl\/?url=https:\/\/ws3.sinaimg.cn\/large\/8fa5dcfcgy1g4em3rzar5j20ib089ae0.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/> --><p><!-- <img decoding=\"async\" src=\"https:\/\/raw.githubusercontent.com\/xmt1139057136\/xttblog\/master\/8fa5dcfcgy1g4em3rzar5j20ib089ae0.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/>--><img decoding=\"async\" src=\"https:\/\/saas.51autoparts.cn\/api\/admin\/sys-file\/oss\/file?fileName=84db51f8561e448f9a4fda2eff0811f9.jpg\" alt=\"\u4e1a\u4f59\u8349\u516c\u4f17\u53f7\"\/><\/p><p>\u6700\u540e\uff0c\u6b22\u8fce\u5173\u6ce8\u6211\u7684\u4e2a\u4eba\u5fae\u4fe1\u516c\u4f17\u53f7\uff1a\u4e1a\u4f59\u8349\uff08yyucao\uff09\uff01<b>\u53ef\u52a0\u4f5c\u8005\u5fae\u4fe1\u53f7\uff1a<font color=\"red\">xttblog2<\/font>\u3002\u5907\u6ce8\uff1a\u201c1\u201d\uff0c\u6dfb\u52a0\u535a\u4e3b\u5fae\u4fe1\u62c9\u4f60\u8fdb\u5fae\u4fe1\u7fa4\u3002\u5907\u6ce8\u9519\u8bef\u4e0d\u4f1a\u540c\u610f\u597d\u53cb\u7533\u8bf7\u3002<\/b>\u518d\u6b21\u611f\u8c22\u60a8\u7684\u5173\u6ce8\uff01\u540e\u7eed\u6709\u7cbe\u5f69\u5185\u5bb9\u4f1a\u7b2c\u4e00\u65f6\u95f4\u53d1\u7ed9\u60a8\uff01\u539f\u521b\u6587\u7ae0\u6295\u7a3f\u8bf7\u53d1\u9001\u81f3532009913@qq.com\u90ae\u7bb1\u3002\u5546\u52a1\u5408\u4f5c\u4e5f\u53ef\u6dfb\u52a0\u4f5c\u8005\u5fae\u4fe1\u8fdb\u884c\u8054\u7cfb\uff01<\/p><p>\u672c\u6587\u539f\u6587\u51fa\u5904\uff1a<a href=\"https:\/\/www.xttblog.com\">\u4e1a\u4f59\u8349<\/a>\uff1a &raquo; <a href=\"https:\/\/www.xttblog.com\/?p=649\">ANT\u6307\u4ee4build.xml[ANT\u8fd0\u884c\u7684\u914d\u7f6e\u6587\u4ef6]\u547d\u4ee4\u96c6<\/a><\/p><!-- <div class=\"bd-reward-stl\"><button id=\"bdRewardBtn\"><span><\/span><\/button><\/div> -->","protected":false},"excerpt":{"rendered":"<p>ANT\u6307\u4ee4build.xml[ANT\u8fd0\u884c\u7684\u914d\u7f6e\u6587\u4ef6]\u547d\u4ee4\u96c6 1.ANT\u793a\u4f8b1.0(\u5c06\u6307\u5b9a\u8def\u5f84\u4e0b\u7684\u6587\u4ef6\u590d\u5236\u5230\u6307\u5b9a [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[853,856,713,855,854],"class_list":["post-649","post","type-post","status-publish","format-standard","hentry","category-java","tag-ant","tag-java","tag-maven","tag-855","tag-854"],"_links":{"self":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/649","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=649"}],"version-history":[{"count":1,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/649\/revisions"}],"predecessor-version":[{"id":650,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=\/wp\/v2\/posts\/649\/revisions\/650"}],"wp:attachment":[{"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=649"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=649"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.xttblog.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=649"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}