<project name="migrate to mybatis3" basedir="." default="migrateToMyBatis3"> <target name="migrateToMyBatis3"> <!-- delete possible results from previous run --> <delete> <fileset dir="destination" includes="*.xml"/> </delete> <!-- xslt convert sqlMaps 2 to mybatis 3 --> <xslt basedir="source" style="migrate.xslt" includes="*.xml" destdir="destination" extension=".xml"/> <!-- replace #id:NUMERIC# to #id,jdbcType=NUMERIC# etc. --> <replace dir="destination" includes="*.xml" token=":NUMERIC#" value=",jdbcType=NUMERIC#" encoding="UTF8"/> <replace dir="destination" includes="*.xml" token=":TIMESTAMP#" value=",jdbcType=TIMESTAMP#" encoding="UTF8"/> <replace dir="destination" includes="*.xml" token=":VARCHAR#" value=",jdbcType=VARCHAR#" encoding="UTF8"/> <replace dir="destination" includes="*.xml" token=":BLOB#" value=",jdbcType=BLOB#" encoding="UTF8"/> <!-- add any needed jdbc type here (for example :CLOB#, :FLOAT#, :REAL#, :BIT#, :INTEGER#, :DECIMAL#, :DATE#, :TIME#, .... ) <replace dir="destination" includes="*.xml" token=":???#" value=",jdbcType=???#" encoding="UTF8"/> --> <!-- replace $id$ with ${id} --> <replaceregexp match="\$([a-zA-Z0-9.\[\]_]+)\$" replace="$\{\1}" flags="mg" byline="false" encoding="UTF8"> <fileset dir="destination" includes="*.xml" /> </replaceregexp> <!-- replace #id# with #{id} --> <replaceregexp match="#([a-zA-Z0-9,_.=\[\]]{2,})#" replace="#{\1}" flags="mg" byline="false" encoding="UTF8"> <fileset dir="destination" includes="*.xml" /> </replaceregexp> <!-- replace xyz[] with item for use in iterators--> <replaceregexp match="[a-z.]{2,}\[\]" replace="item" flags="ig" encoding="UTF8"> <fileset dir="destination" includes="*.xml" /> </replaceregexp> <xmlvalidate failonerror="yes" lenient="false" warn="yes"> <attribute name="http://apache.org/xml/features/validation/schema" value="false" /> <attribute name="http://xml.org/sax/features/namespaces" value="false" /> <fileset dir="destination" includes="*.xml" /> <dtd publicId="-//mybatis.org//DTD SQL Map Config 3.0//EN" location="mybatis-3-config.dtd" /> <dtd publicId="-//mybatis.org//DTD Mapper 3.0//EN" location="mybatis-3-mapper.dtd" /> </xmlvalidate> </target> </project>
背景是:项目的jar包升级,从ibatis2升级到mybatis3,我从google code下载了这个build文件,搭建了ant环境,但是用ant编译的时候报错,connection time out。请大家帮忙看看,谢谢
1.ant环境应该没错
2.开始执行
3.报错:
4.看下文档目录
请各位大牛帮忙看下,多谢了
执行 ANT -V查看详细信息
:oops: 这个build.xml怎么这么复杂?????
这个链接超时 是不是某些下载链接 无法链接下载啊???
[code="java"]
C�lio Cidral Junior wrote on Thu, 06 Apr 2006 19:48:23 GMT:
I'm trying to run a build script which has a target that uses the
task and references an external <xmlcatalog>, but Ant is<br> giving me the warning message below.</p> <p>Apache resolver library not found, internal resolver will be used<br> Warning: catalogpath listing external catalogs will be ignored</p> <p>I've Googled a lot about this problem and couldn't find any helpful<br> information, except this thread:<br> <a href="http://www.ant-tasks.com/msg/14363.html">http://www.ant-tasks.com/msg/14363.html</a></p> </blockquote> <p>Hello,</p> <p>I got the same error message today and solved it. So I am posting<br> some comments on this issue for the archive:</p> <p>The original author's problem has been probably caused by the fact that<br> he was using xml-commons-resolver-1.0 in the classpath. The Ant<br> documentation explicitly mentions that you should use<br> xml-commons-resolver-1.1:<br> <a href="http://ant.apache.org/manual/CoreTypes/xmlcatalog.html">http://ant.apache.org/manual/CoreTypes/xmlcatalog.html</a></p> <p>My own problem was caused by myself having put the correct version<br> of resolver.jar into JDK's jre/lib/endorsed directory (because I upgraded<br> Xalan and it appeared to pick it up all right from there). For some reason,<br> if resolver.jar is visible to the classloader for jre/lib/endorsed, Ant<br> will not be able to use it, EVEN if you add it to the Ant classpath.</p> <p>Regards,<br> Jan Ploski</p> <hr> <p>To unsubscribe, e-mail: <a href="mailto:user-unsubscribe@ant.apache.org">user-unsubscribe@ant.apache.org</a><br> For additional commands, e-mail: <a href="mailto:user-help@ant.apache.org">user-help@ant.apache.org</a><br> [/code]</p>