You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@zookeeper.apache.org by Shawn Heisey <ap...@elyograg.org> on 2018/03/04 03:44:59 UTC
"ant eclipse" in source code fails, easy fix
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
Re: "ant eclipse" in source code fails, easy fix
Posted by Shawn Heisey <ap...@elyograg.org>.
On 3/3/2018 10:10 PM, Edward Ribeiro wrote:
> I recommend you open a JIRA issue at
> https://issues.apache.org/jira/projects/ZOOKEEPER and then open a PR to
> https://www.github.com/apache/zookeeper , please. This is clearly a bug and
> the fix is trivial so you can bypass any dev mailing list discussion, IMO.
Jira and linked github PR created.
https://issues.apache.org/jira/browse/ZOOKEEPER-2992
Thanks,
Shawn
Re: "ant eclipse" in source code fails, easy fix
Posted by Edward Ribeiro <ed...@gmail.com>.
Hi Shawn,
Fair enough. :)
I recommend you open a JIRA issue at
https://issues.apache.org/jira/projects/ZOOKEEPER and then open a PR to
https://www.github.com/apache/zookeeper , please. This is clearly a bug and
the fix is trivial so you can bypass any dev mailing list discussion, IMO.
Cheers!
E.
Em 4 de mar de 2018 12:45 AM, "Shawn Heisey" <ap...@elyograg.org> escreveu:
> 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.n
> et/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-ecl
> ipse/1.0/ant-eclipse-1.0.bin.tar.bz2 moved to
> https://iweb.dl.sourceforge.net/project/ant-eclipse/ant-ecli
> pse/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.puppycraw
> l.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
>
>