7
respostas

Projeto não sobe - [ivy:retrieve] Server access Error: Connection refused

Ao tentar inicializar a aplicação "leiloes" (usando "ant jetty.run") ocorre o erro abaixo. Estou tentando acesso atrás de um firewall corporativo. Tem alguma configuração de proxy específica que se precise fazer?

Neste link

https://community.liferay.com/forums/-/message_boards/message/35186540

Indica-se que sejam especificadas configurações no arquivo "build-common-ivy.xml", mas não consegui encontrá-lo.

Alguma ideia?


Log de erro

[ivy:retrieve]         ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:retrieve]         ::          UNRESOLVED DEPENDENCIES         ::
[ivy:retrieve]         ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:retrieve]         :: br.com.caelum#vraptor;3.4.0: not found
[ivy:retrieve]         :: opensymphony#sitemesh;2.4.2: not found
[ivy:retrieve]         :: javax.servlet#jstl;1.2: not found
[ivy:retrieve]         :: org.hibernate#hibernate-entitymanager;3.6.7.Final: not found
[ivy:retrieve]         :: org.hibernate#hibernate-c3p0;3.6.7.Final: not found
[ivy:retrieve]         :: org.hibernate#hibernate-validator;4.2.0.Final: not found
[ivy:retrieve]         :: joda-time#joda-time;2.0: not found
[ivy:retrieve]         :: com.thoughtworks.xstream#xstream;1.4.1: not found
[ivy:retrieve]         :: javax.servlet#servlet-api;2.5: not found
[ivy:retrieve]         :: javax.servlet.jsp#jsp-api;2.1: not found
[ivy:retrieve]         :: junit#junit;4.10: not found
[ivy:retrieve]         :: org.hamcrest#hamcrest-all;1.1: not found
[ivy:retrieve]         :: org.mockito#mockito-all;1.8.5: not found
[ivy:retrieve]         :: org.mortbay.jetty#jsp-api-2.1;6.1.14: not found
[ivy:retrieve]         :: org.mortbay.jetty#jsp-2.1;6.1.14: not found
[ivy:retrieve]         :: org.mortbay.jetty#jetty-ant;6.1.14: not found
[ivy:retrieve]         :: com.yahoo.platform.yui#yuicompressor;2.3.6: not found
[ivy:retrieve]         ::::::::::::::::::::::::::::::::::::::::::::::
[ivy:retrieve] :::: ERRORS
[ivy:retrieve]     Server access Error: Connection refused url=http://repo1.maven.org/maven2/br/com/caelum/vraptor/3.4.0/vraptor-3.4.0.pom
[ivy:retrieve]     Server access Error: Connection refused url=http://repo1.maven.org/maven2/br/com/caelum/vraptor/3.4.0/vraptor-3.4.0.jar
[ivy:retrieve]     Server access Error: Connection refused url=http://repo1.maven.org/maven2/opensymphony/sitemesh/2.4.2/sitemesh-2.4.2.pom
[ivy:retrieve]     Server access Error: Connection refused url=http://repo1.maven.org/maven2/opensymphony/sitemesh/2.4.2/sitemesh-2.4.2.jar
[ivy:retrieve]     Server access Error: Connection refused url=http://repo1.maven.org/maven2/javax/servlet/jstl/1.2/jstl-1.2.pom
[ivy:retrieve]     Server access Error: Connection refused url=http://repo1.maven.org/maven2/javax/servlet/jstl/1.2/jstl-1.2.jar
[ivy:retrieve]     Server access Error: Connection refused url=http://repo1.maven.org/maven2/org/hibernate/hibernate-entitymanager/3.6.7.Final/hibernate-entitymanager-3.6.7.Final.pom
[ivy:retrieve]     Server access Error: Connection refused url=http://repo1.maven.org/maven2/org/hibernate/hibernate-entitymanager/3.6.7.Final/hibernate-entitymanager-3.6.7.Final.jar
[ivy:retrieve]     Server access Error: Connection refused url=http://repo1.maven.org/maven2/org/hibernate/hibernate-c3p0/3.6.7.Final/hibernate-c3p0-3.6.7.Final.pom
[ivy:retrieve]     Server access Error: Connection refused url=http://repo1.maven.org/maven2/org/hibernate/hibernate-c3p0/3.6.7.Final/hibernate-c3p0-3.6.7.Final.jar

...

impossible to resolve dependencies:
    resolve failed - see output for details
7 respostas

Primeiramente veja se o projeto funciona em sua rede particular. Se sim veja com o administrador da sua rede corporativa para ele liberar as portas e ips necessários.

Na verdade, os IPs estão liberados, mas precisamos passar por um proxy - e não sei onde se definem as configurações necessárias neste caso (usando ant e ivy).

Não seria o proxy da sua rede corporativa que está barrando?

Não, não é o caso, pois eu consigo acessar as URLs pelo browser e baixar os .jar. Acho que a questão é alguma configuração de proxy específica quando se usa ant e ivy, mas ainda não descobri como definir.

Testa esse ant build.xm só pra testar se não é mesmo o firewall que tá barrando.

<project>
    <get src="http://ivy.ethz.ch/checkstyle/checkstyle-all/5.5/ivy-5.5.xml" dest="ivy-5.5.xml" />
</project>

Não funcionou também. Entretanto, se acesso a url

http://ivy.ethz.ch/checkstyle/checkstyle-all/5.5/ivy-5.5.xml

pelo browser, consigo ter acesso ao xml.

Por essa razão, acredito que seja alguma configuração de proxy específica para uso de ant e ivy - como é sugerido em

https://community.liferay.com/forums/-/message_boards/message/35186540

"Being in a company, behind a firewall seems to be the biggest reason this happens. As turns out, you have set proxy information specifically for Ivy.

In build-common-ivy.xml, you need to add a . I put it right after the line and that took care of it."

Sabe onde encontro esse arquivo build-common-ivy.xml?

*...you need to add a <setproxy proxyhost="host" proxyport="port" />. I put it right after the <mkdir dir="${ivy.home}" /> line and that took care of it.

Quer mergulhar em tecnologia e aprendizagem?

Receba a newsletter que o nosso CEO escreve pessoalmente, com insights do mercado de trabalho, ciência e desenvolvimento de software