Colin, Kit, and myself tried to debug through this ages ago, but I couldn't find a bug for it.
Ant blows up on snap builds:
https://build.snapcraft.io/user/snapcrafters/cassandra/52418
…
maven-ant-tasks-download:
[echo] Downloading Maven ANT Tasks...
[get] Getting: http://repo2.maven.org/maven2/org/apache/maven/maven-ant-tasks/2.1.3/maven-ant-tasks-2.1.3.jar
[get] To: /build/c06aa5fe0b4650ca21947706c2dcb57a-xenial/parts/cassandra/build/build/maven-ant-tasks-2.1.3.jar
[get] Error opening connection java.io.IOException: Server returned HTTP response code: 407 for URL: http://repo2.maven.org/maven2/org/apache/maven/maven-ant-tasks/2.1.3/maven-ant-tasks-2.1.3.jar
[get] Error opening connection java.io.IOException: Server returned HTTP response code: 407 for URL: http://repo2.maven.org/maven2/org/apache/maven/maven-ant-tasks/2.1.3/maven-ant-tasks-2.1.3.jar
[get] Error opening connection java.io.IOException: Server returned HTTP response code: 407 for URL: http://repo2.maven.org/maven2/org/apache/maven/maven-ant-tasks/2.1.3/maven-ant-tasks-2.1.3.jar
[get] Can't get http://repo2.maven.org/maven2/org/apache/maven/maven-ant-tasks/2.1.3/maven-ant-tasks-2.1.3.jar to /build/c06aa5fe0b4650ca21947706c2dcb57a-xenial/parts/cassandra/build/build/maven-ant-tasks-2.1.3.jar
BUILD FAILED
/build/c06aa5fe0b4650ca21947706c2dcb57a-xenial/parts/cassandra/build/build.xml:277: Can't get http://repo2.maven.org/maven2/org/apache/maven/maven-ant-tasks/2.1.3/maven-ant-tasks-2.1.3.jar to /build/c06aa5fe0b4650ca21947706c2dcb57a-xenial/parts/cassandra/build/build/maven-ant-tasks-2.1.3.jar
Total time: 1 second
ant artifacts -Ddist.dir=/build/c06aa5fe0b4650ca21947706c2dcb57a-xenial/parts/cassandra/install
Command '['/bin/sh', '/tmp/tmpg2dgzsm_', 'ant', 'artifacts', '-Ddist.dir=/build/c06aa5fe0b4650ca21947706c2dcb57a-xenial/parts/cassandra/install']' returned non-zero exit status 1
Traceback (most recent call last):
File "/usr/share/launchpad-buildd/slavebin/buildsnap", line 244, in main
builder.build()
File "/usr/share/launchpad-buildd/slavebin/buildsnap", line 191, in build
["snapcraft"], path=os.path.join("/build", self.name), env=env)
File "/usr/share/launchpad-buildd/slavebin/buildsnap", line 100, in run_build_command
["/bin/sh", "-c", command], echo=echo, get_output=get_output)
File "/usr/share/launchpad-buildd/slavebin/buildsnap", line 71, in chroot
subprocess.check_call(cmd)
File "/usr/lib/python2.7/subprocess.py", line 541, in check_call
raise CalledProcessError(retcode, cmd)
CalledProcessError: Command '['/usr/bin/sudo', '/usr/sbin/chroot', '/home/buildd/build-SNAPBUILD-52418/chroot-autobuild', 'linux64', '/bin/sh', '-c', 'cd /build/c06aa5fe0b4650ca21947706c2dcb57a-xenial && env LANG=C.UTF-8 https_proxy=http://snap-proxy.launchpad.net:3128 http_proxy=http://snap-proxy.launchpad.net:3128 GIT_PROXY_COMMAND=/usr/local/bin/snap-git-proxy snapcraft']' returned non-zero exit status 1
Revoking proxy token...
As I recall I got quite a way through debugging this and https:/ /code.launchpad .net/~cjwatson/ launchpad- buildd/ local-snap- proxy/+ merge/322545 was a big help, but the build logs in my local Launchpad instance suggest that that wasn't enough. With local-snap-proxy applied, it looks like I ended up with this:
maven-ant- tasks-download: repo2.maven. org/maven2/ org/apache/ maven/maven- ant-tasks/ 2.1.3/maven- ant-tasks- 2.1.3.jar cassandra/ parts/cassandra /build/ build/maven- ant-tasks- 2.1.3.jar repo2.maven. org/maven2/ org/apache/ maven/maven- ant-tasks/ 2.1.3/maven- ant-tasks- 2.1.3.jar to /build/ cassandra/ parts/cassandra /build/ build/maven- ant-tasks- 2.1.3.jar
[echo] Downloading Maven ANT Tasks...
[get] Getting: http://
[get] To: /build/
[get] Error getting http://
BUILD FAILED cassandra/ parts/cassandra /build/ build.xml: 277: java.net. ConnectExceptio n: Connection refused (Connection refused) PlainSocketImpl .socketConnect( Native Method) AbstractPlainSo cketImpl. doConnect( AbstractPlainSo cketImpl. java:350) AbstractPlainSo cketImpl. connectToAddres s(AbstractPlain SocketImpl. java:206) AbstractPlainSo cketImpl. connect( AbstractPlainSo cketImpl. java:188) SocksSocketImpl .connect( SocksSocketImpl .java:392) Socket. connect( Socket. java:589) Socket. connect( Socket. java:538) NetworkClient. doConnect( NetworkClient. java:180) www.http. HttpClient. openServer( HttpClient. java:432) www.http. HttpClient. openServer( HttpClient. java:527) www.http. HttpClient. <init>( HttpClient. java:211) www.http. HttpClient. New(HttpClient. java:308) www.http. HttpClient. New(HttpClient. java:326) www.protocol. http.HttpURLCon nection. getNewHttpClien t(HttpURLConnec tion.java: 1202) www.protocol. http.HttpURLCon nection. plainConnect0( HttpURLConnecti on.java: 1138) www.protocol. http.HttpURLCon nection. plainConnect( HttpURLConnecti on.java: 1032) www.protocol. http.HttpURLCon nection. connect( HttpURLConnecti on.java: 966) tools.ant. taskdefs. Get$GetThread. openConnection( Get.java: 728) tools.ant. taskdefs. Get$GetThread. get(Get. java:641) tools.ant. taskdefs. Get$GetThread. run(Get. java:631)
/build/
at java.net.
at java.net.
at java.net.
at java.net.
at java.net.
at java.net.
at java.net.
at sun.net.
at sun.net.
at sun.net.
at sun.net.
at sun.net.
at sun.net.
at sun.net.
at sun.net.
at sun.net.
at sun.net.
at org.apache.
at org.apache.
at org.apache.
Total time: 6 seconds dir=/build/ cassandra/ parts/cassandra /install' ]' returned non-zero exit status 1
Command '['/bin/sh', '/tmp/tmpqg9m6cnl', 'ant', '-autoproxy', 'artifacts', '-Ddist.
The good news is that my fixes were enough to get your Jenkins snap working, although you need to apply https:/ /github. com/evandandrea /jenkins- snap/pull/ 3.