求教用 ANT BUILD Spring3 时报错

2016-05-25 15:19:08 +08:00
 cs4814751
用 ant build 的时候四五分钟之后,就报这个错,实在摸不到头脑哪里的毛病,求大大赐教。

compile.init:

jar.init:

jar:
[mkdir] Created dir: C:\Users\cs481\Desktop\spring-framework-3.0.5.RELEASE\projects\org.springframework.instrument.tomcat\target\artifacts
[mkdir] Created dir: C:\Users\cs481\Desktop\spring-framework-3.0.5.RELEASE\projects\org.springframework.instrument.tomcat\target\classes
[s:javac] Compiling 3 source files to C:\Users\cs481\Desktop\spring-framework-3.0.5.RELEASE\projects\org.springframework.instrument.tomcat\target\classes
[s:javac] ----------
[s:javac] 1. ERROR in C:\Users\cs481\Desktop\spring-framework-3.0.5.RELEASE\projects\org.springframework.instrument.tomcat\src\main\java\org\springframework\instrument\classloading\WeavingTransformer.java (at line 77)
[s:javac] String internalName = className.replace(".", "/");
[s:javac] ^^^^^^^^^^^^^^^^^^^^^^^^^^^
[s:javac] The type java.lang.CharSequence cannot be resolved. It is indirectly referenced from required .class files
[s:javac] ----------
[s:javac] 2. ERROR in C:\Users\cs481\Desktop\spring-framework-3.0.5.RELEASE\projects\org.springframework.instrument.tomcat\src\main\java\org\springframework\instrument\classloading\WeavingTransformer.java (at line 77)
[s:javac] String internalName = className.replace(".", "/");
[s:javac] ^^^^^^^
[s:javac] The method replace(char, char) in the type String is not applicable for the arguments (String, String)
[s:javac] ----------
[s:javac] 2 problems (2 errors)
[subant] Leaving directory: C:\Users\cs481\Desktop\spring-framework-3.0.5.RELEASE\projects\org.springframework.instrument.tomcat

BUILD FAILED
C:\Users\cs481\Desktop\spring-framework-3.0.5.RELEASE\projects\spring-build\multi-bundle\artifact.xml:60: The following error occurred while executing this line:
C:\Users\cs481\Desktop\spring-framework-3.0.5.RELEASE\projects\spring-build\multi-bundle\common.xml:86: The following error occurred while executing this line:
C:\Users\cs481\Desktop\spring-framework-3.0.5.RELEASE\projects\spring-build\common\artifact.xml:43: The following error occurred while executing this line:
C:\Users\cs481\Desktop\spring-framework-3.0.5.RELEASE\projects\spring-build\common\common.xml:161: The following error occurred while executing this line:
C:\Users\cs481\Desktop\spring-framework-3.0.5.RELEASE\projects\spring-build\standard\common.xml:29: Compile failed; see the compiler error output for details.

Total time: 4 minutes 23 seconds
1709 次点击
所在节点    Java
3 条回复
crytis
2016-05-25 17:56:03 +08:00
用 maven 吧
crayhuang
2016-05-25 18:11:19 +08:00
用 maven + 1
tidezyc
2016-05-26 10:13:34 +08:00
人家好好的 gradle 的项目,楼上推荐 maven 的是什么逻辑

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/281167

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX