-
熟悉ant的帮忙看下,执行这个build.xml时一直报错,connection time out5
<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.看下文档目录
请各位大牛帮忙看下,多谢了
问题补充:这个代码是从google code 下的,用来将ibatis2.X的xml文档转化为mybatis3.X的xml。 <br />可是注释掉了那些链接甚至删除掉那些链接还是报这个错。connection time out <br /><div class="quote_title">renpeng301 写道</div><div class="quote_div"><img src="/images/smiles/icon_redface.gif"/> 这个build.xml怎么这么复杂????? <br /> <br />这个链接超时 是不是某些下载链接 无法链接下载啊???</div> <br />
问题补充:使用ant -v命令得到了下面的错误信息。 <br />Apache resolver library not found, internal resolver will be used <br />[img]http://dl.iteye.com/upload/picture/pic/96204/150b3988-35c5-3318-9387-f39f2cfadf6f.png <br />[/img] <br /><div class="quote_title">suziwen 写道</div><div class="quote_div">执行 ANT -V查看详细信息</div> <br />
问题补充:下载resolver.jar和xml-commons-resolver-1.1同时放到jre\lib和ant\lib下。分别试了这2个jar包,还是不行。仍然是同样的错误。 <br /><div class="quote_title">renpeng301 写道</div><div class="quote_div"><pre name="code" class="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
> <style> task and references an external <xmlcatalog>, but Ant is
> giving me the warning message below.
>
> Apache resolver library not found, internal resolver will be used
> Warning: catalogpath listing external catalogs will be ignored
>
> I've Googled a lot about this problem and couldn't find any helpful
> information, except this thread:
> http://www.ant-tasks.com/msg/14363.html
Hello,
I got the same error message today and solved it. So I am posting
some comments on this issue for the archive:
The original author's problem has been probably caused by the fact that
he was using xml-commons-resolver-1.0 in the classpath. The Ant
documentation explicitly mentions that you should use
xml-commons-resolver-1.1:
http://ant.apache.org/manual/CoreTypes/xmlcatalog.html
My own problem was caused by myself having put the correct version
of resolver.jar into JDK's jre/lib/endorsed directory (because I upgraded
Xalan and it appeared to pick it up all right from there). For some reason,
if resolver.jar is visible to the classloader for jre/lib/endorsed, Ant
will not be able to use it, EVEN if you add it to the Ant classpath.
Regards,
Jan Ploski
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org
</pre></div> <br />
问题补充:解决了,第一个问题是我的目录缺少这个jar包,第二个原因是使用ant -d命令查看到的.我要转换的xml文件用的还是 <br /><!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd">修改完这2个地方之后虽然还是有warning,但是已经可以实现转换了,谢谢您的提醒。 <br /> <br /><div class="quote_title">suziwen 写道</div><div class="quote_div">执行 ANT -V查看详细信息</div> <br />2011年8月05日 08:55
3个答案 按时间排序 按投票排序
-
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 > <style> task and references an external <xmlcatalog>, but Ant is > giving me the warning message below. > > Apache resolver library not found, internal resolver will be used > Warning: catalogpath listing external catalogs will be ignored > > I've Googled a lot about this problem and couldn't find any helpful > information, except this thread: > http://www.ant-tasks.com/msg/14363.html Hello, I got the same error message today and solved it. So I am posting some comments on this issue for the archive: The original author's problem has been probably caused by the fact that he was using xml-commons-resolver-1.0 in the classpath. The Ant documentation explicitly mentions that you should use xml-commons-resolver-1.1: http://ant.apache.org/manual/CoreTypes/xmlcatalog.html My own problem was caused by myself having put the correct version of resolver.jar into JDK's jre/lib/endorsed directory (because I upgraded Xalan and it appeared to pick it up all right from there). For some reason, if resolver.jar is visible to the classloader for jre/lib/endorsed, Ant will not be able to use it, EVEN if you add it to the Ant classpath. Regards, Jan Ploski --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org
2011年8月05日 15:04
相关推荐
jmeter+ant 持续集成build.xml文件,直接使用ant命令执行jmeter脚本文件,得到图形测试报告
NULL 博文链接:https://kanpiaoxue.iteye.com/blog/1995837
第一次做jmeter+ant自动化接口测试,需要build文件,开始直接copy博客中的内容,格式不对,调试好久不成功...后发现在jmeter/extras文件夹中有一个build文件,copy出来根据需要修改下,成功了,特上传自选供大家使用;
NULL 博文链接:https://siwind.iteye.com/blog/1473839
Python写的一个程序,可以生成java开发中ANT工具所需的build.xml文件。
jmeter+ant+jenkins---build.xml文件,下载运行即可成功
开源ant的build.xml的一些属性配置,内含 几个例子。比较实用
ANT_发布项目中_build.xml_文件的详细配置
一个普通java程序用ant打包的列子,完整的,里面采用的是eclipse自带的编译插件进行的打包,需要结合eclipse中的插件一起使用
ANT-build.xml文件详解 ANT-build.xml文件详解 ANT-build.xml文件详解 ANT-build.xml文件详解
详细介绍了ant的环境变量的配置及build.xml文件的配置详解
ant +build.xml 文件Jenkins部署javaEE项目,助力成功自动化部署。ant +build.xml 文件Jenkins部署javaEE项目,助力成功自动化部署。ant +build.xml 文件Jenkins部署javaEE项目,助力成功自动化部署。ant +build.xml...
jmeter实现接口自动化测试: 1)buil.xml文件实现了测试报告和发邮件 2)优化后的报告模板:jmeter-results-newreport.xsl
ant做的一个小例子,里面有build.xml的详细配置,导入myEclipse后可直接运行。
演示 build.xml 是编写方法,适合 ant build 初学者,解压,进入 ant 目录, 运行命令 ant 既可
对build.xml文件中用到的标签进行了详尽的解说,并且附有例子,ant build.xml文件详解
Ant_的最完整build.xml解释,Ant入门与进阶,ant学习工具书
ant打包项目的build.xml配置
ant build.xml demo 供自己及好友学习,能很快上手
我的开发环境是Eclipse,ant.xml是放在项目下的ant(新建),也可以修改project的basedir.