首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >使用gradle构建spring时出现编译错误

使用gradle构建spring时出现编译错误
EN

Stack Overflow用户
提问于 2012-10-23 10:45:01
回答 1查看 1.6K关注 0票数 2

通过使用git下载Spring源代码,我正在学习如何使用spring和gradle。我已经使用git克隆git://github.com/SpringSource/spring-framework.git下载了它,我还在本地安装了gradle。

当我试图执行的时候

gradle构建

我收到如下编译错误:

代码语言:javascript
复制
C:\Users\mahendran\spring-framework>gradle build
:spring-core:asmRepackJar
:spring-core:cglibRepackJar
:spring-core:compileJava
C:\Users\mahendran\spring-framework\spring-core\src\main\java\org\springframework\util\xml\StaxUtils.java:318: 
cannot find symbol symbol : method newFactory()
location: class javax.xml.stream.XMLEventFactory
            return new XMLEventStreamWriter(eventWriter, XMLEventFactory.newFactory());
                                                                        ^
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1 error
:spring-core:compileJava FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':spring-core:compileJava'.
Compilation failed; see the compiler error output for details.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 1 mins 5.58 secs
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2012-10-24 01:34:59

这看起来像是版本偏差--我认为你需要更新你的JDK。在JDK6版本1.6.0.18中添加了AFAICT、newFactory()。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/13022820

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档