maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Karl Heinz Marbaise <khmarba...@gmx.de>
Subject Re: Problems building maven from source from behind a firewall: Unable to initialize POM dependencies.xml
Date Thu, 14 May 2015 08:36:17 GMT
Hi Andrew,

why are you building Maven from source and not downloading from 
http://maven.apache.org/download.html the distribution...(-bin.tar.gz 
unix -bin.zip for windows).

A proxy in maven (settings.xml) is something different than using 
http_proxy see https://maven.apache.org/settings.html

Best is to setup a Nexus repository manager inside the corporate 
environment and let handle Nexus the proxy / access to internet things...

http://books.sonatype.com/nexus-book/reference/config-maven.html


On 5/14/15 10:23 AM, Andrew.Marlow@sungard.com wrote:
> Hello everyone,
>
> I am trying to build maven from source in a corporate environment behind a firewall.

To be behind a firewall / proxy is a usual corporate setup....nothing 
unsual...

 > It fails to download a pom, eventually timing out.

You should the reason in the logging output if you trying to run on 
console...

 >  I read of others with the same problem and the "solutions"
 > posted always
 >  involve configuring an http proxy.
 > Different solutions have different ways of
 > specifying the proxy settings.

There is the environment variable http_proxy, there's the maven 
settings.xml in $HOME/.m2,

The settings.xml file is the correct location....

 > and even the ANT_OPTS variable.

Why ANT_OPTS ? This is not related to Maven...you should try MAVEN_OPTS 
instead...if you really need..if you use settings.xml you don't need to...


 >  I have tried them all but to no avail.
> > The pom it's trying to get is http://repo1.maven.org/maven2/org/apache/maven/maven-parent/23/maven-parent-23.pom.
 >  I can retrieve this file using wget (with http_proxy set)
 > but somehow the maven retrieve fails. I hope someone can help me.

Settings up things in settings.xml like here:

https://maven.apache.org/settings.html#Proxies

>
> Also, given that I am trying to build a source distribution,
 > why it is going off to remote repos to fetch various files?

To build things in Maven plugins are needed which need dependencies of 
their own...plus the dependencies of the code...so downloading of the 
pom is to analyze the transitive dependencies...

 >  Shouldn't they come with the source distro anyway?
If you really like to build from source you should use ANT which also 
tries to download some files (I can't remember which, don't that ages 
before...).

The binary distro contains only Maven itself no plugins etc...which will 
be downloaded automatically if you have a proxy/mirror settings.xml 
correctly or better using a repository manager...


Kind regards
Karl Heinz Marbaise

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Mime
View raw message