Bug 62164 - Build for Eclipse IDE does not work
Summary: Build for Eclipse IDE does not work
Status: RESOLVED FIXED
Alias: None
Product: Tomcat 8
Classification: Unclassified
Component: Documentation (show other bugs)
Version: 8.5.x-trunk
Hardware: PC Linux
: P2 major (vote)
Target Milestone: ----
Assignee: Tomcat Developers Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-08 13:53 UTC by Alexander Veit
Modified: 2022-04-23 16:21 UTC (History)
0 users



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Veit 2018-03-08 13:53:37 UTC
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
Comment 2 Alexander Veit 2018-03-08 14:17:13 UTC
Workaround: Set

 base-sf.loc=https://downloads.sourceforge.net

in the build.properties.
Comment 3 Mark Thomas 2018-03-09 20:42:00 UTC
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.
Comment 4 Mark Thomas 2018-03-09 21:07:15 UTC
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
Comment 5 Felix Schumacher 2018-03-10 12:38:14 UTC
(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.
Comment 6 Konstantin Kolinko 2018-06-27 19:57:56 UTC
(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.
Comment 7 Konstantin Kolinko 2018-06-28 11:24:05 UTC
(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.
Comment 8 Jaikiran Pai 2018-07-11 06:09:24 UTC
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