本文主要是介绍编译tomcat 补坑,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
http://supportopensource.iteye.com/blog/1884674
基本的步骤参考上面的连接
但是有两点需要补一下坑
第一个就是,版本的搭配似乎必须是ant 1.8~jdk6~tomcat7
最开始我的版本搭配是ant 1.10~jdk8~tomcat7,结果编到一半报错。后来jdk换成1.8,ant直接启动不起来,ant换成1.8才正常启动起来。
第二个坑就是,执行ant ide-eclipse这个命令时,有几个文件下载不下来
报错类似于
testexist:
[echo] Testing for E:/projects/src/apache-tomcat-7.0.81-src/tomcat-build-libs/easymock-3.2/easymock-3.2.jar
downloadzip:
[get] Getting: http://downloads.sourceforge.net/easymock/easymock-3.2.zip
[get] To: E:\projects\src\apache-tomcat-7.0.81-src\tomcat-build-libs\download-1178687414.zip
[get] http://downloads.sourceforge.net/easymock/easymock-3.2.zip permanently moved to http://downloads.sourceforge.net/project/easymock/EasyMock/3.2/easymock-3.2.zip
[get] http://downloads.sourceforge.net/project/easymock/EasyMock/3.2/easymock-3.2.zip moved to https://nchc.dl.sourceforge.net/project/easymock/EasyMock/3.2/easymock-3.2.zip
[get] Error getting http://downloads.sourceforge.net/easymock/easymock-3.2.zip to E:\projects\src\apache-tomcat-7.0.81-src\tomcat-build-libs\download-1178687414.zip
BUILD FAILED
E:\projects\src\apache-tomcat-7.0.81-src\build.xml:2700: The following error occurred while executing this line:
E:\projects\src\apache-tomcat-7.0.81-src\build.xml:2864: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at com.sun.net.ssl.internal.ssl.Alerts.getSSLException(Alerts.java:174)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.fatal(SSLSocketImpl.java:1747)
at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:241)
at com.sun.net.ssl.internal.ssl.Handshaker.fatalSE(Handshaker.java:235)
at com.sun.net.ssl.internal.ssl.ClientHandshaker.serverCertificate(ClientHandshaker.java:1209)
at com.sun.net.ssl.internal.ssl.ClientHandshaker.processMessage(ClientHandshaker.java:135)
at com.sun.net.ssl.internal.ssl.Handshaker.processLoop(Handshaker.java:593)
at com.sun.net.ssl.internal.ssl.Handshaker.process_record(Handshaker.java:529)
具体原因似乎还是https连接失败。
但是发现http://downloads.sourceforge.net/easymock/easymock-3.2.zip这个路径在浏览器中实际是可以打开的,
又注意到有个testexist步骤,因此就把这个zip包从浏览器里下载下来,再按照testexist中检查点路径放入文件,这样就跳过了下载出错的环节。
按照这个方法,那个包下载错误就手动下载哪个,基本就没错了
导入eclipse的步骤可以参考
http://blog.csdn.net/lihuayong/article/details/26805461
这篇关于编译tomcat 补坑的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!