如果想把tomcat8.5源码导入到eclipse中,按照官网的引导走还是很容易的。但是在执行ant ide-eclipse过程中,出现了类似下面的错误。
[get] Error getting http://downloads.sourceforge.net/cglib/cglib-nodep-2.2.3.jar to /Users/apple/Documents/workspace/tc8.5.x/tomcat-build-libs/download-1918381580.tmp
BUILD FAILED
/Users/apple/Documents/workspace/tc8.5.x/build.xml:2646: The following error occurred while executing this line:
/Users/apple/Documents/workspace/tc8.5.x/build.xml:2759: 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 sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
at sun.security.ssl.SSLSocketImpl.fatal(SSLSocketIm
引发这个问题原因,好像是sourceforge的证书不受信任,可是通过把sourceforge的证书导入到java证书库以及导入到macos钥匙串上面后还是不好用。于是乎通过分析build.xml文件,原来是build.properties里面指定了这个jar包的下载路径,这就简单了,https不好用,那我们就改成http的呗,在浏览器上访问build.properties上面的jar路径,找到最终的下载路径,改成http,再次ant ide-eclipse,大功告成。`
—– cglib, used by EasyMock, version 2.2 or later —–
cglib.version=2.2.3
cglib.home=
base.path/cglib−
{cglib.version}
cglib.loc=http://nchc.dl.sourceforge.net/project/cglib/cglib2/2.2.3/cglib-nodep-2.2.3.jar
cglib.jar=
cglib.home/cglib−nodep−
{cglib.version}.jar`