Installation behind a proxy

I downloaded the src tar with dependencies. I have http_proxy set. Still, when I run ‘ant install’ it gets to the download-ivy: target and gets a 407 error when opening the connection.

download-ivy:
[mkdir] Created dir: /home/bonardo/og/OG-Platform/projects/OG-Util/build/bootstrap
[echo] installing ivy…
[get] Getting: http://ivyrepo.opengamma.com/org.apache.ant/ivy/2.1.0/ivy-2.1.0.jar
[get] To: /home/bonardo/og/OG-Platform/projects/OG-Util/build/bootstrap/ivy.jar
[get] Error opening connection java.io.IOException: Server returned HTTP response code: 407 for URL: http://ivyrepo.opengamma.com/org.apache.ant/ivy/2.1.0/ivy-2.1.0.jar
[get] Error opening connection java.io.IOException: Server returned HTTP response code: 407 for URL: http://ivyrepo.opengamma.com/org.apache.ant/ivy/2.1.0/ivy-2.1.0.jar
[get] Error opening connection java.io.IOException: Server returned HTTP response code: 407 for URL: http://ivyrepo.opengamma.com/org.apache.ant/ivy/2.1.0/ivy-2.1.0.jar
[get] Can’t get http://ivyrepo.opengamma.com/org.apache.ant/ivy/2.1.0/ivy-2.1.0.jar to /home/bonardo/og/OG-Platform/projects/OG-Util/build/bootstrap/ivy.jar

BUILD FAILED

Since this was the tar with dependencies, why does it need to download the ivy jar? If I download that elsewhere and copy it over, are there other external dependencies in the install process?

Thanks,

You are of course right, it shouldn’t need to do that - it’s a artifact from the original ivy example files we used many years ago. I’ll get someone to take a look at it and suggest a patch to get it working.

In the mean time, could you make ivy.jar available for separate download? And, if you did, would putting it in the appropriate location (OG-Platform/projects/OG-Util/build/bootstrap/ivy.jar from the looks of the above message) satisfy the makefile?

Indeed the 1.1.0 source with dependencies erroneously omits ivy.jar in the individual sub-project directories. All that needs to be done is to copy or link the instance of ivy.jar that is already present in OG-Platform/build/bootstrap to OG-Platform/projects/sub-project name/build/bootstrap for each sub-project. You will have to create the bootstrap directory in each sub-project first, as they are not present in the archive.

I’m afraid there is one other bug in the 1.1.0 source with dependencies that will stop you from successfully compiling even after applying the above fix, but this is relatively easy to sort out. Now ‘ant install’ will result in the following error:

[ivy:resolve] module not found: org.apache.commons#commons-codec;[1.3,1.6[

The commons-codec version included in the ivy repository is 1.6, but the specified dependency (apache httpclient requires version < 1.6) is incorrect, and should read [1.3, 1.6].

The easiest (but not the cleanest) way to fix this without regenerating dependencies is to fool ivy into thinking that the provided version of commons-codec is 1.5 by:

  • renaming directory OG-Platform/repository/org.apache.commons/commons-codec/1.6 to OG-Platform/repository/org.apache.commons/commons-codec/1.5

  • renaming file OG-Platform/repository/org.apache.commons/commons-codec/1.5/commons-codec-1.6.jar to OG-Platform/repository/org.apache.commons/commons-codec/1.5/commons-codec-1.5.jar

  • replacing all references to 1.6 with 1.5 in OG-Platform/repository/org.apache.commons/commons-codec/1.5/ivy.xml

Following these changes ‘ant install’ succeeds without requiring an Internet connection. These issues have been fixed in the meantime and the next release will build offline without problems.

Hope this helps. Please do let us know if there are any further issues.

Regards,

Kevin

Thanks, I’ll give it a try.

This will be fixed for the 1.2 release, which is in final testing now.