Follow the instructions from https://tomcat.apache.org/tomcat-8.5-doc/building.html When you execute ant ide-eclipse the build fails with BUILD FAILED /path/tomcat-8.5/build.xml:2650: The following error occurred while executing this line: /path/tomcat-8.5/build.xml:2780: Redirection detected from http to https. Protocol switch unsafe, not allowed. ant -version Apache Ant(TM) version 1.10.2 compiled on February 3 2018
This is the offending download: setproxy: downloadzip: [get] Getting: http://downloads.sourceforge.net/easymock/easymock-3.2.zip [get] To: /path/tomcat-8.5-libs/download-2035161754.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://vorboss.dl.sourceforge.net/project/easymock/EasyMock/3.2/easymock-3.2.zip
Workaround: Set base-sf.loc=https://downloads.sourceforge.net in the build.properties.
I can understand Ant not allowing an https -> http redirect but I'm not sure why http -> https isn't allowed. In theory, switching everything to https would fix this - but many of the mirrors used by the ASF are not configured for TLS. And the ECJ download doesn't appear to want to work over TLS either. Maven and SF seem OK so my solution at this point is to switch them to TLS and leave the others.
Thanks for the report. Fixed in: - trunk for 9.0.7 onwards - 8.5.x for 8.5.30 onwards - 8.0.x for 8.0.51 onwards - 7.0.x for 7.0.86 onwards
(In reply to Mark Thomas from comment #3) > I can understand Ant not allowing an https -> http redirect but I'm not sure > why http -> https isn't allowed. > > In theory, switching everything to https would fix this - but many of the > mirrors used by the ASF are not configured for TLS. And the ECJ download > doesn't appear to want to work over TLS either. > > Maven and SF seem OK so my solution at this point is to switch them to TLS > and leave the others. On JMeter we switched to https for sf. But some mirrors for sf are using http, which will lead to flaky test builds, when a non https mirror is chosen by sf. We kept it anyway, as the alternative of using http didn't work at all.
(In reply to Mark Thomas from comment #3) > I can understand Ant not allowing an https -> http redirect but I'm not sure > why http -> https isn't allowed. > This is actually a regression in Apache Ant 1.9.10+. The code of Get task was broken during a checkstyle cleanup. I filed this into Bugzilla for Apache Ant: https://bz.apache.org/bugzilla/show_bug.cgi?id=62499 > In theory, switching everything to https would fix this - but many of the > mirrors used by the ASF are not configured for TLS. And the ECJ download > doesn't appear to want to work over TLS either. > > Maven and SF seem OK so my solution at this point is to switch them to TLS > and leave the others. I am facing failure with ASF mirrors. Using Apache Ant 1.9.12: trydownload: [get] Getting: https://www.apache.org/dyn/closer.lua?action=download&filename=/commons/daemon/binaries/commons-daemon-1.1.0-bin.tar.gz [get] To: -censored-\download-1299307821.tar.gz [get] https://www.apache.org/dyn/closer.lua?action=download&filename=/commons/daemon/binaries/commons-daemon-1.1.0-bin.tar.gz moved to http://apache-mirror.rbc.ru/pub/apache//commons/daemon/binaries/commons-daemon-1.1.0-bin.tar.gz BUILD FAILED -censored-\trunk\build.xml:2670: The following error occurred while executing this line: -censored-\trunk\build.xml:2986: The following error occurred while executing this line: -censored-\trunk\build.xml:3102: Redirection detected from https to http. Protocol switch unsafe, not allowed. The workaround: specify a specific mirror by setting "base-apache.loc.1" property in build.properties file to the root URL of a mirror.
(In reply to Konstantin Kolinko from comment #6) > (In reply to Mark Thomas from comment #3) > > I can understand Ant not allowing an https -> http redirect but I'm not sure > > why http -> https isn't allowed. > > > > This is actually a regression in Apache Ant 1.9.10+. > The code of Get task was broken during a checkstyle cleanup. > > I filed this into Bugzilla for Apache Ant: > https://bz.apache.org/bugzilla/show_bug.cgi?id=62499 The bug in Apache Ant have been fixed. The fix will be available in the next releases of 1.9.x and 1.10.x.
FWIW - a vote for releasing Ant with this fix is in progress, if anyone wants to try it out https://www.mail-archive.com/dev@ant.apache.org/msg47371.html