0 0

熟悉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:
&gt; I'm trying to run a build script which has a target that uses the
&gt; &lt;style&gt; task and references an external &lt;xmlcatalog&gt;, but Ant is
&gt; giving me the warning message below.
&gt;
&gt;    Apache resolver library not found, internal resolver will be used
&gt;    Warning: catalogpath listing external catalogs will be ignored
&gt;
&gt; I've Googled a lot about this problem and couldn't find any helpful
&gt; information, except this thread:
&gt; 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 />&lt;!DOCTYPE sqlMap PUBLIC "-//iBATIS.com//DTD SQL Map2.0//EN" "http://www.ibatis.com/dtd/sql-map-2.dtd"&gt;修改完这2个地方之后虽然还是有warning,但是已经可以实现转换了,谢谢您的提醒。 <br /> <br /><div class="quote_title">suziwen 写道</div><div class="quote_div">执行 ANT -V查看详细信息</div> <br />
2011年8月05日 08:55

3个答案 按时间排序 按投票排序

0 0

采纳的答案

执行 ANT -V查看详细信息

2011年8月05日 12:07
0 0

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
0 0

这个build.xml怎么这么复杂?????

这个链接超时 是不是某些下载链接 无法链接下载啊???

2011年8月05日 11:12

相关推荐

    Jmeter+ant+Jenkins集成接口自动化测试说明.docx

    使用Ant编写build.xml文件,包含JMeter测试计划的执行逻辑,如设置测试计划路径、输出结果文件等。通过`jmeter Ant任务`执行JMeter测试。 五、集成到Jenkins,构建持续化集成 1. 在Jenkins中创建新项目,选择Free...

    Eclipse里配置Ant 组织的Project(3) -- E中配置Tomcat的JNDI

    这将引导你导入一个已有的Ant构建文件,这个文件通常命名为`build.xml`,它定义了项目的构建过程,包括编译、测试和打包等步骤。 接着,我们将配置Tomcat服务器以支持JNDI。在Eclipse中,点击"Window" -&gt; ...

    mysql2018.01.08链接jar包

    这可以通过多种方式完成,例如在IDE(如Eclipse或IntelliJ IDEA)中设置项目依赖,或者在命令行执行Java程序时使用`-cp`或`-classpath`参数。添加后,就可以使用`java.sql.DriverManager`类来建立与MySQL服务器的...

    spring-boot-reference.pdf

    15.2. Importing XML Configuration 16. Auto-configuration 16.1. Gradually Replacing Auto-configuration 16.2. Disabling Specific Auto-configuration Classes 17. Spring Beans and Dependency Injection 18. ...

    今日内容:三天精通Jmeter接口测试项目实战训练营(3).pdf

    * 需要一个build.xml文件,并且把build.xml和test.jmx放到同一个目录 * 配置全局配置文件:jmeter.properties * 输入命令:ant 执行 * 结合Jenkins: 六、接口自动化的目的 * 实现团队协作,版本控制 * 找错,定位...

    hibernate3.1 jar包

    - buildtime swarmcache-1.0rc2.jar (1.0rc2) - runtime, optional - runtime, optional jboss-cache.jar (1.2.2 alpha) - TreeCache clustered cache - runtime, optional jgroups-2.2.7.jar (2.2.7) - JGroups ...

    《程序天下:J2EE整合详解与典型案例》光盘源码

    7.3.2 配置文件build.xml 7.3.3 编译源代码 7.3.4 创建JAR文件 7.4 小结 第八章 JUnit使用指南 8.1 JUnit介绍 8.1.1 JUnit简介 8.1.2 为什么要使用JUnit 8.2 建立JUnit的开发环境 8.2.1 下载JUnit 8.2.2 配置JUnit ...

    搞定J2EE:STRUTS+SPRING+HIBERNATE整合详解与典型案例 (2)

    一共四个,其中pdf 三个包,源码一个包 第一章 J2EE快速入门 1.1 J2EE概述 1.1.1 J2EE的来源 1.1.2 J2EE整体框架 1.1.3 从J2EE到JavaEE 1.2 J2EE组件 1.2.1 客户端组件 1.2.2 Web组件 1.2.3 业务逻辑组件 1.3 J2EE...

    搞定J2EE:STRUTS+SPRING+HIBERNATE整合详解与典型案例 (1)

    一共四个,其中pdf 三个包,源码一个包 第一章 J2EE快速入门 1.1 J2EE概述 1.1.1 J2EE的来源 1.1.2 J2EE整体框架 1.1.3 从J2EE到JavaEE 1.2 J2EE组件 1.2.1 客户端组件 1.2.2 Web组件 1.2.3 业务逻辑组件 1.3 J2EE...

    搞定J2EE:STRUTS+SPRING+HIBERNATE整合详解与典型案例 (3)

    一共四个,其中pdf 三个包,源码一个包 第一章 J2EE快速入门 1.1 J2EE概述 1.1.1 J2EE的来源 1.1.2 J2EE整体框架 1.1.3 从J2EE到JavaEE 1.2 J2EE组件 1.2.1 客户端组件 1.2.2 Web组件 1.2.3 业务逻辑组件 1.3 J2EE...

    openacs的搭建方法

    进入下载的目录,将Ant复制到同一目录,并创建一个名为`make.bat`的批处理文件,内容为`start ant -f build.xml exit`。运行此批处理文件,Ant将编译源码并在dist目录下生成acs.ear文件。 3. **部署OpenACS** - 将...

    Struts2.1.6+Spring2.5.6+Hibernate3.3.1框架整合常见错误

    2. **检查构建工具**: 如果使用构建工具(如Maven或Ant),则需要确认其配置文件(如`pom.xml`或`build.xml`)中的`classpath`设置是否正确。 通过以上分析,我们可以发现,在使用Struts2.1.6、Spring2.5.6与...

    mybatis_generator

    如果是Ant任务,则需要在build.xml文件中添加相应的target。 4. **生成代码**:执行后,Mybatis Generator会根据配置文件中的设置,自动生成指定的Java类、Mapper接口和XML配置文件。这些文件可以直接在Myeclipse中...

    jbpm4.4的安装myeclipse配置还有helloworld实例

    - 修改 `jbpm-4.4\install\build.xml` 文件中的 `&lt;property name="database" value="hsqldb" /&gt;` 行,将 `value` 属性值更改为 `"mysql"`。 - 修改 `jbpm-4.4\install\jdbc\mysql.properties` 文件中的数据库配置...

    使用Mybatis Generator结合Ant脚本快速自动生成Model、Mapper等文件的方法

    然后,创建一个Ant构建文件,例如`build_mybatis.xml`,这个文件用于执行MyBatis Generator。在其中添加任务来调用`mybatis-generator:generate`目标: ```xml &lt;project xmlns="http://maven.apache.org/POM/4.0.0...

    mysql-connector-java-6.0.6.jar

    System.out.println("Failed to make connection!"); } } catch (SQLException e) { System.err.format("SQL State: %s\n%s", e.getSQLState(), e.getMessage()); } catch (Exception e) { e.printStackTrace...

    Java连接数据库mysql,驱动文件,附带源码

    `build.xml`可能是一个Ant构建文件,用于自动化构建过程,`docs`目录可能包含JDBC驱动的文档资料,对于理解如何使用驱动以及解决可能出现的问题非常有帮助。 总的来说,这个压缩包提供了从Java应用连接到MySQL...

    jbpm4.4配置文档

    - 修改`jbpm-4.4\install\build.xml`文件中的`&lt;property name="database" value="hsqldb"/&gt;`,将`value`值更改为`mysql`。 - 修改`jbpm-4.4\install\jdbc\mysql.properties`中的数据库配置,确保连接信息正确无误...

    学生信息管理系统 JAVA Mysql 数据库课程设计 简单界面.zip

    6. **Build Files**: 如构建脚本(build.xml)如果是使用Ant,或者Maven的pom.xml,用于项目的构建和打包。 7. **Run Script**: 运行程序的脚本,可能是bat或sh文件,方便用户直接启动应用。 通过这个课程设计,...

    Stock-Management-System-Java-Project.zip_project_project managem

    1. **源代码文件**:如`src`目录,其中可能有多个包(package),每个包下有对应的类文件,如`StockManager.java`、`Product.java`、`DatabaseConnection.java`等,分别代表库存管理类、商品类和数据库连接类。...

Global site tag (gtag.js) - Google Analytics