zookeeper-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Shawn Heisey <apa...@elyograg.org>
Subject "ant eclipse" in source code fails, easy fix
Date Sun, 04 Mar 2018 03:44:59 GMT
I know I really should be putting this on the dev list.  The reason I'm 
not doing so is because I'm already subscribed to far too many mailing 
lists.  I don't expect to be making a ton of contributions to ZK, so I 
don't want to join another mailing list for one little discussion.  If 
at some point I *do* find myself more involved with ZK development, I 
will join the dev list.

I just cloned the source to poke around a little bit, not make changes.  
I find eclipse fairly easy to use, so I wanted to prep the repository 
for loading into that software.  I typed "ant eclipse" immediately after 
cloning from the github mirror.  It failed.

====
C:\Users\elyograg\git\zookeeper>ant eclipse
Buildfile: C:\Users\elyograg\git\zookeeper\build.xml

ant-eclipse-download:
       [get] Getting: 
http://downloads.sourceforge.net/project/ant-eclipse/ant-eclipse/1.0/ant-eclipse-1.0.bin.tar.bz2
       [get] To: 
C:\Users\elyograg\git\zookeeper\src\java\ant-eclipse-1.0.bin.tar.bz2
       [get] 
http://downloads.sourceforge.net/project/ant-eclipse/ant-eclipse/1.0/ant-eclipse-1.0.bin.tar.bz2

moved to 
https://iweb.dl.sourceforge.net/project/ant-eclipse/ant-eclipse/1.0/ant-eclipse-1.0.bin.tar.bz2

BUILD FAILED
C:\Users\elyograg\git\zookeeper\build.xml:1809: Redirection detected 
from http to https. Protocol switch unsafe, not allowed.

Total time: 0 seconds
====

The reason is simple -- sourceforge no longer allows unencrypted 
access.  They are nice enough to redirect the request to https, and if 
this had been a browser access, that would have worked without problem.  
But apparently ant doesn't consider such redirects to be safe.

The fix is easy -- add one character to the ant build.  I tested this, 
it worked without issue on Windows.  I expect it would work on the 
better operating systems too.

====
diff --git a/build.xml b/build.xml
index 639707e7..a6b7617b 100644
--- a/build.xml
+++ b/build.xml
@@ -1805,7 +1805,7 @@ xmlns:cs="antlib:com.puppycrawl.tools.checkstyle.ant">
       </condition>

       <target name="ant-eclipse-download" unless="ant-eclipse.jar.exists">
-       <get 
src="http://downloads.sourceforge.net/project/ant-eclipse/ant-eclipse/1.0/ant-eclipse-1.0.bin.tar.bz2"
+       <get 
src="https://downloads.sourceforge.net/project/ant-eclipse/ant-eclipse/1.0/ant-eclipse-1.0.bin.tar.bz2"
              dest="${src.dir}/java/ant-eclipse-1.0.bin.tar.bz2" 
usetimestamp="false" />

         <bunzip2 src="${src.dir}/java/ant-eclipse-1.0.bin.tar.bz2"/>
====

Do you want an issue in Jira, or is this informal discussion enough?

Thanks,
Shawn


Mime
View raw message