[ 
https://issues.apache.org/jira/browse/THRIFT-1507?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16289814#comment-16289814
 ] 

Artem Glotov commented on THRIFT-1507:
--------------------------------------

[~ioan] My workaround is to download dependency jar files to the host with 
available Internet connection (your notebook maybe). And manually copy them to 
the target server to folder lib/java/build/lib:
* commons-codec-1.9.jar
* httpclient-4.4.1.jar
* junit-4.4.jar
* mockito-all-1.9.5.jar
* slf4j-api-1.7.12.jar
* commons-logging-1.2.jar
* httpcore-4.4.1.jar
* log4j-1.2.17.jar
* servlet-api-2.5.jar
* slf4j-log4j12-1.7.12.jar

Then you should delete *mvn.init* dependency in build.xml:
{code:xml}<target name="init" depends="setup.init,mvn.init" 
unless="init.finished">{code}
it looks like:
{code:xml}<target name="init" depends="setup.init" unless="init.finished">{code}

Enjoy!

> Maven can't download resource from central when behind a proxy and won't use 
> local repository
> ---------------------------------------------------------------------------------------------
>
>                 Key: THRIFT-1507
>                 URL: https://issues.apache.org/jira/browse/THRIFT-1507
>             Project: Thrift
>          Issue Type: Bug
>          Components: Java - Library
>    Affects Versions: 0.8
>         Environment: Ubuntu 10.04 LTS, running in a VM in VMWare Player 
> hosted on Windows XP Pro which is behind a proxy server.
>            Reporter: Mark Anderson
>            Assignee: Jake Farrell
>              Labels: build, maven
>
> When 'make' enters lib/java, the build fails on the mvn.init target with:
> . . .
> [artifact:dependencies] [WARNING] Overriding profile: 
> 'maven-ant-tasks-repo-profile' (source: pom) with new instance from source: 
> pom
> [artifact:dependencies] Downloading: 
> org/slf4j/slf4j-api/1.5.8/slf4j-api-1.5.8.pom from repository central at 
> http://repo1.maven.org/maven2
> [artifact:dependencies] Error transferring file: Connection refused
> [artifact:dependencies] [WARNING] Unable to get resource 
> 'org.slf4j:slf4j-api:pom:1.5.8' from repository central 
> (http://repo1.maven.org/maven2): Error transferring file: Connection refused
> . . .
> This occurs for every dependency in the 'pom' artifact (on some files, the 
> error is "Connection timed out").
> The preceding target, mvn.ant.tasks.download, succeeds (the 
> maven-ant-tasks-2.1.3.jar file is sitting in the tools directory).
> I have added to build.xml:
> proxy.host=proxy1.domain.com
> proxy.port=80
> proxy.user=
> proxy.pass=
> proxy.enabled=true
> and to /etc/maven2/settings.xml:
>      <proxy>
>       <id>proxy1</id>
>       <active>true</active>
>       <protocol>http</protocol>
>       <host>proxy1.domain.com</host>
>       <port>80</port>
>       <nonProxyHosts>localhost</nonProxyHosts>
>     </proxy>
> Maven does not seem to be picking up the proxy.  If I manually download all 
> the resources and install them into my local repository (~/.m2/repository) as 
> suggested and re-run make, I still get the errors -- Maven doesn't try to use 
> the local repository.
> If I move the machine out from behind the firewall, everything works fine: 
> Maven downloads all the dependencies and the Java stuff is able to be built.  
> If I then put the machine back behind the firewall and run 'sudo make 
> install', Maven again tries to download the dependencies from central and 
> that, of course, fails.  It doesn't realize that all the dependencies have 
> been downloaded and the Java files have been compiled.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to