java,gradle编译spring源码出错
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了java,gradle编译spring源码出错相关的知识,希望对你有一定的参考价值。
spring 3.2.4源代码自带的gradlew编译的,配置文件里写的是com.lowagie:itext 2.1.7报错总说找不到com.itextpdf:itextpdf:4.2.2这是为什么?其他版本的spring3源码也是这样,求帮助
Total time: 39.844 secs
E:\workspace3\spring>gradlew build --stacktrace
:spring-context-support:compileJava
FAILURE: Build failed with an exception.
* What went wrong:
Could not resolve all dependencies for configuration ':spring-context-support:op
tional'.
> Could not find com.itextpdf:itextpdf:4.2.2.
Required by:
org.springframework:spring-context-support:3.2.4.RELEASE > com.lowagie:ite
xt:4.2.2
* Try:
Run with --info or --debug option to get more log output.
* Exception is:
org.gradle.api.artifacts.ResolveException: Could not resolve all dependencies fo
r configuration ':spring-context-support:optional'.
at org.gradle.api.internal.artifacts.ivyservice.DefaultLenientConfigurat
ion.rethrowFailure(DefaultLenientConfiguration.java:55)
Caused by: org.gradle.api.internal.artifacts.ivyservice.ModuleVersionNotFoundExc
eption: Could not find com.itextpdf:itextpdf:4.2.2.
Required by:
org.springframework:spring-context-support:3.2.4.RELEASE > com.lowagie:itext
:4.2.2
将dependency org="com.itextpdf" name="itextpdf" rev="4.2.2" 修改为dependency dependency org="com.itextpdf" name="itextpdf" rev="5.2.0",
然后将使用了该类的AbstractPdfStamperView、AbstractPdfView的import com.itext 修改为 com.itextpdf。。。
具体原因及说明可以看 去http://www.bdtool.net/blog_356.html 查看。 参考技术A Form formPreview = new Form();
public Leaf(string name) : base(name)
public override void Add(Component c)
Console.WriteLine("Cannot add to a leaf");
public override void Remove(Component c)
Console.WriteLine("Cannot remove to a leaf");
public override void Display(int depth)
Console.WriteLine(new string('-',depth)+name);
追问
能给点注释吗?谢了
以上是关于java,gradle编译spring源码出错的主要内容,如果未能解决你的问题,请参考以下文章
idea在编译spring源码时gradle构建新模块找不到依赖的问题解决