You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Shixiang Wen <ws...@yahoo.com.cn> on 2013/01/22 06:25:43 UTC

Default remote repository URL is invalid to build Maven

Hi,

I tried to build maven 3.0.4 by following commands:

set M2_HOME=C:\Data\wengm\workspace\maven-3.0.4-SNAPSHOT

set PATH=%M2_HOME%;%PATH%

ant

However, I failed with following error:

C:\Data\wengm\workspace\apache-maven-3.0.4>ant
Buildfile: C:\Data\wengm\workspace\apache-maven-3.0.4\build.xml

clean-bootstrap:

initTaskDefs:
     [echo] Building Apache Maven ...

isMavenHomeSet:

init:
     [echo] maven.home = C:\Data\wengm\workspace\maven-3.0.4-SNAPSHOT
     [echo] maven.repo.local = C:\Users\egugwen/.m2/repository
     [echo] distributionId = apache-maven
     [echo] distributionName = Apache Maven
     [echo] distributionDirectory = apache-maven

prompt-maven-home-exists:
    [input] WARNING:
    [input] The specified target directory
    [input]   C:\Data\wengm\workspace\maven-3.0.4-SNAPSHOT
    [input] already exists. It will be deleted and overwritten by the build.
    [input] Do you want to continue? (yes, [no])
yes

pull:
[artifact:pom] Downloading: org/apache/maven/maven-parent/21/maven-parent-21.pom from repository central at http://repo1.maven.org/maven2
[artifact:pom] Error transferring file: Connection timed out: connect
[artifact:pom] [WARNING] Unable to get resource 'org.apache.maven:maven-parent:pom:21' from repository central (http://repo1.maven.org/maven2): Error transferring file:
 Connection timed out: connect
[artifact:pom] An error has occurred while processing the Maven artifact tasks.
[artifact:pom]  Diagnosis:
[artifact:pom]
[artifact:pom] Unable to initialize POM dependencies.xml: Cannot find parent: org.apache.maven:maven-parent for project: null:maven:pom:3.0.4 for project null:maven:pom
:3.0.4
[artifact:pom] Unable to download the artifact from any repository
[artifact:pom]

BUILD FAILED
C:\Data\wengm\workspace\apache-maven-3.0.4\build.xml:105: Unable to initialize POM dependencies.xml: Cannot find parent: org.apache.maven:maven-parent for project: null
:maven:pom:3.0.4 for project null:maven:pom:3.0.4

Total time: 44 seconds

Then, I tried to access http://repo1.maven.org/maven2 and it told me:

Browsing for this directory has been disabled.
View this directory's contents on http://search.maven.org instead.

So, could you please:
	* change the default remote repository URL from http://repo1.maven.org/maven2 to something else?
	* tell user like me to configure the remote repository URL?
Look forward to your response! Thanks!

Bruce Wen(GuangMing)

Re: Default remote repository URL is invalid to build Maven

Posted by Anders Hammar <an...@hammar.net>.
Are you behind a web proxy? If so, I belive you need to configure this. I
don't personally build Maven with ant, so I don't know how but there should
be a clue somewhere (maybe in build.xml?).

The  http://repo1.maven.org/maven2 repo is fine. That's not the problem
here.

/Anders


On Tue, Jan 22, 2013 at 6:25 AM, Shixiang Wen <ws...@yahoo.com.cn>wrote:

> Hi,
>
> I tried to build maven 3.0.4 by following commands:
>
> set M2_HOME=C:\Data\wengm\workspace\maven-3.0.4-SNAPSHOT
>
> set PATH=%M2_HOME%;%PATH%
>
> ant
>
> However, I failed with following error:
>
> C:\Data\wengm\workspace\apache-maven-3.0.4>ant
> Buildfile: C:\Data\wengm\workspace\apache-maven-3.0.4\build.xml
>
> clean-bootstrap:
>
> initTaskDefs:
>      [echo] Building Apache Maven ...
>
> isMavenHomeSet:
>
> init:
>      [echo] maven.home = C:\Data\wengm\workspace\maven-3.0.4-SNAPSHOT
>      [echo] maven.repo.local = C:\Users\egugwen/.m2/repository
>      [echo] distributionId = apache-maven
>      [echo] distributionName = Apache Maven
>      [echo] distributionDirectory = apache-maven
>
> prompt-maven-home-exists:
>     [input] WARNING:
>     [input] The specified target directory
>     [input]   C:\Data\wengm\workspace\maven-3.0.4-SNAPSHOT
>     [input] already exists. It will be deleted and overwritten by the
> build.
>     [input] Do you want to continue? (yes, [no])
> yes
>
> pull:
> [artifact:pom] Downloading:
> org/apache/maven/maven-parent/21/maven-parent-21.pom from repository
> central at http://repo1.maven.org/maven2
> [artifact:pom] Error transferring file: Connection timed out: connect
> [artifact:pom] [WARNING] Unable to get resource
> 'org.apache.maven:maven-parent:pom:21' from repository central (
> http://repo1.maven.org/maven2): Error transferring file:
>  Connection timed out: connect
> [artifact:pom] An error has occurred while processing the Maven artifact
> tasks.
> [artifact:pom]  Diagnosis:
> [artifact:pom]
> [artifact:pom] Unable to initialize POM dependencies.xml: Cannot find
> parent: org.apache.maven:maven-parent for project: null:maven:pom:3.0.4 for
> project null:maven:pom
> :3.0.4
> [artifact:pom] Unable to download the artifact from any repository
> [artifact:pom]
>
> BUILD FAILED
> C:\Data\wengm\workspace\apache-maven-3.0.4\build.xml:105: Unable to
> initialize POM dependencies.xml: Cannot find parent:
> org.apache.maven:maven-parent for project: null
> :maven:pom:3.0.4 for project null:maven:pom:3.0.4
>
> Total time: 44 seconds
>
> Then, I tried to access http://repo1.maven.org/maven2 and it told me:
>
> Browsing for this directory has been disabled.
> View this directory's contents on http://search.maven.org instead.
>
> So, could you please:
>         * change the default remote repository URL from
> http://repo1.maven.org/maven2 to something else?
>         * tell user like me to configure the remote repository URL?
> Look forward to your response! Thanks!
>
> Bruce Wen(GuangMing)

Re: 回复: AW: Default remote repository URL is invalid to build Maven

Posted by Anders Hammar <an...@hammar.net>.
It's defined in the super-POM.
So, the Ant script used Maven Ant tasks to read the POM for building Maven.
That POM inherits from the super-POM, where that repo is defined.

/Anders


On Tue, Jan 22, 2013 at 1:31 PM, Shixiang Wen <ws...@yahoo.com.cn>wrote:

> Hi,
>
>
> I will try the solution below. Before that, I still want to know where the
> default remote repository URL (http://repo1.maven.org/maven2) is defined.
> Is it hard-coded?
>
>
> Bruce
>
>
> ________________________________
>  �����ˣ� Stadelmann Josef <jo...@axa-winterthur.ch>
> �ռ��ˣ� Maven Developers List <de...@maven.apache.org>
> �������ڣ� 2013��1��22��, ���ڶ�, 5:13 ����
> ����: AW: Default remote repository URL is invalid to build Maven
>
> and the link below is how to make ant loading but creating prior
> an authenticator object which many version of ant doesn't by do default
>
>
> http://vouters.dyndns.org/tima/All-OS-Oracle-Java-Problem_attempting_to_go_through_Basic_authentication_required_company_Web_server_proxy.html
>
>
> Josef
>
>
>
> -----Urspr�ngliche Nachricht-----
> Von: Stadelmann Josef [mailto:josef.stadelmann@axa-winterthur.ch]
> Gesendet: Dienstag, 22. Januar 2013 10:10
> An: Maven Developers List
> Betreff: AW: Default remote repository URL is invalid to build Maven
>
> Sitting behind a firewall is mostly the cause of such troubles.
>
> In this case you
> 1. need to tell maven about how to reach out through the firewall 2. and
> you need to tell ant about how to reach out through the firewall
>     a) when called alone from a shell
>     b) when called from the ant plugin (or vice vers) under maven
>
> general for maven documented (but sometimes not enough i.e. no
> http.auth.preference=BAsic hint can be passed by maven to the proxy which
> needs this to not start negotiating with the client, where as the client
> might not always be able to negotiate a authentication schema.
> <proxies>
>    <proxy>
>     <active>true</active>
>     <protocol>http</protocol>
>      <host>bcproxyserver.ch.winterthur.com</host>
>      <port>8080</port>
>      <username>myusername</username>
>      <password>mypassword</password>
>      <nonProxyHosts>*.wgrintra.net</nonProxyHosts>
>      <id>default</id>
>    </proxy>
> </proxies>
>
> for maven we use
> MAVEN_OPTS=
> -XX:MaxPermSize=512m -Xmx950m -Xms950m
> -Dhttp.auth.preference=Basic
> -Dhttp.proxyhost=proxyserver.com
> -Dhttp.proxyport=8080
> -Dhttp.proxyuser=myusername
> -Dhttp.proxypassword=mypassword
>
> For ant we use
> ANT_OPTS=
> -Dhttp.proxyHost=proxyserver.com
> -Dhttp.proxyPort=8080
> -Dhttp.proxyUser=myusername
> -Dhttp.proxyPassword=mypassword
> -Dhttp.auth.preference=Basic
>
> AND most important, you should look at
> http://vouters.dyndns.org/tima/All-OS-ANT-ANT_and_URLs_authentication.html
> and then say thanks to Philippe Vouters, which has documented so nicely
> what we have done in the past to make ant going
>
> Josef
>
>
>
>
>
>
> -----Urspr�ngliche Nachricht-----
> Von: Brett Porter [mailto:brett@porterclan.net] Im Auftrag von Brett
> Porter
> Gesendet: Dienstag, 22. Januar 2013 06:39
> An: Maven Developers List; Shixiang Wen
> Betreff: Re: Default remote repository URL is invalid to build Maven
>
>
> On 21/01/2013, at 9:25 PM, Shixiang Wen <ws...@yahoo.com.cn> wrote:
> > pull:
> > [artifact:pom] Downloading:
> > org/apache/maven/maven-parent/21/maven-parent-21.pom from repository
> > central at http://repo1.maven.org/maven2 [artifact:pom] Error
> > transferring file: Connection timed out: connect
>
> It seems that the place you were building this was unable to reach
> http://repo1.maven.org/maven2 at the time of the build (connection timed
> out) - if you're able to resolve that issue so it can connect to it then it
> should work without changes.
>
> Regards,
> Brett
>
> --
> Brett Porter
> brett@apache.org
> http://brettporter.wordpress.com/
> http://au.linkedin.com/in/brettporter
> http://twitter.com/brettporter
>
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org For additional
> commands, e-mail: dev-help@maven.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org For additional
> commands, e-mail: dev-help@maven.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org

回复: AW: Default remote repository URL is invalid to build Maven

Posted by Shixiang Wen <ws...@yahoo.com.cn>.
Hi,

 
I will try the solution below. Before that, I still want to know where the default remote repository URL (http://repo1.maven.org/maven2) is defined. Is it hard-coded?


Bruce


________________________________
 发件人: Stadelmann Josef <jo...@axa-winterthur.ch>
收件人: Maven Developers List <de...@maven.apache.org> 
发送日期: 2013年1月22日, 星期二, 5:13 下午
主题: AW: Default remote repository URL is invalid to build Maven
 
and the link below is how to make ant loading but creating prior 
an authenticator object which many version of ant doesn't by do default

http://vouters.dyndns.org/tima/All-OS-Oracle-Java-Problem_attempting_to_go_through_Basic_authentication_required_company_Web_server_proxy.html


Josef



-----Urspr黱gliche Nachricht-----
Von: Stadelmann Josef [mailto:josef.stadelmann@axa-winterthur.ch] 
Gesendet: Dienstag, 22. Januar 2013 10:10
An: Maven Developers List
Betreff: AW: Default remote repository URL is invalid to build Maven

Sitting behind a firewall is mostly the cause of such troubles.

In this case you
1. need to tell maven about how to reach out through the firewall 2. and you need to tell ant about how to reach out through the firewall
    a) when called alone from a shell
    b) when called from the ant plugin (or vice vers) under maven

general for maven documented (but sometimes not enough i.e. no http.auth.preference=BAsic hint can be passed by maven to the proxy which needs this to not start negotiating with the client, where as the client might not always be able to negotiate a authentication schema.
<proxies> 
   <proxy> 
    <active>true</active>
    <protocol>http</protocol>
     <host>bcproxyserver.ch.winterthur.com</host>
     <port>8080</port>
     <username>myusername</username>
     <password>mypassword</password>
     <nonProxyHosts>*.wgrintra.net</nonProxyHosts>
     <id>default</id>
   </proxy>
</proxies>

for maven we use
MAVEN_OPTS=
-XX:MaxPermSize=512m -Xmx950m -Xms950m
-Dhttp.auth.preference=Basic
-Dhttp.proxyhost=proxyserver.com
-Dhttp.proxyport=8080
-Dhttp.proxyuser=myusername
-Dhttp.proxypassword=mypassword

For ant we use
ANT_OPTS=
-Dhttp.proxyHost=proxyserver.com
-Dhttp.proxyPort=8080
-Dhttp.proxyUser=myusername
-Dhttp.proxyPassword=mypassword
-Dhttp.auth.preference=Basic

AND most important, you should look at
http://vouters.dyndns.org/tima/All-OS-ANT-ANT_and_URLs_authentication.html
and then say thanks to Philippe Vouters, which has documented so nicely what we have done in the past to make ant going

Josef






-----Urspr黱gliche Nachricht-----
Von: Brett Porter [mailto:brett@porterclan.net] Im Auftrag von Brett Porter
Gesendet: Dienstag, 22. Januar 2013 06:39
An: Maven Developers List; Shixiang Wen
Betreff: Re: Default remote repository URL is invalid to build Maven


On 21/01/2013, at 9:25 PM, Shixiang Wen <ws...@yahoo.com.cn> wrote:
> pull:
> [artifact:pom] Downloading: 
> org/apache/maven/maven-parent/21/maven-parent-21.pom from repository 
> central at http://repo1.maven.org/maven2 [artifact:pom] Error 
> transferring file: Connection timed out: connect

It seems that the place you were building this was unable to reach http://repo1.maven.org/maven2 at the time of the build (connection timed out) - if you're able to resolve that issue so it can connect to it then it should work without changes.

Regards,
Brett

--
Brett Porter
brett@apache.org
http://brettporter.wordpress.com/
http://au.linkedin.com/in/brettporter
http://twitter.com/brettporter






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


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


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

AW: Default remote repository URL is invalid to build Maven

Posted by Stadelmann Josef <jo...@axa-winterthur.ch>.
and the link below is how to make ant loading but creating prior 
an authenticator object which many version of ant doesn't by do default

http://vouters.dyndns.org/tima/All-OS-Oracle-Java-Problem_attempting_to_go_through_Basic_authentication_required_company_Web_server_proxy.html


Josef



-----Ursprüngliche Nachricht-----
Von: Stadelmann Josef [mailto:josef.stadelmann@axa-winterthur.ch] 
Gesendet: Dienstag, 22. Januar 2013 10:10
An: Maven Developers List
Betreff: AW: Default remote repository URL is invalid to build Maven

Sitting behind a firewall is mostly the cause of such troubles.

In this case you
1. need to tell maven about how to reach out through the firewall 2. and you need to tell ant about how to reach out through the firewall
	a) when called alone from a shell
	b) when called from the ant plugin (or vice vers) under maven

general for maven documented (but sometimes not enough i.e. no http.auth.preference=BAsic hint can be passed by maven to the proxy which needs this to not start negotiating with the client, where as the client might not always be able to negotiate a authentication schema.
<proxies> 
   <proxy> 
	<active>true</active>
	<protocol>http</protocol>
	 <host>bcproxyserver.ch.winterthur.com</host>
	 <port>8080</port>
	 <username>myusername</username>
	 <password>mypassword</password>
	 <nonProxyHosts>*.wgrintra.net</nonProxyHosts>
	 <id>default</id>
   </proxy>
</proxies>

for maven we use
MAVEN_OPTS=
-XX:MaxPermSize=512m -Xmx950m -Xms950m
-Dhttp.auth.preference=Basic
-Dhttp.proxyhost=proxyserver.com
-Dhttp.proxyport=8080
-Dhttp.proxyuser=myusername
-Dhttp.proxypassword=mypassword

For ant we use
ANT_OPTS=
-Dhttp.proxyHost=proxyserver.com
-Dhttp.proxyPort=8080
-Dhttp.proxyUser=myusername
-Dhttp.proxyPassword=mypassword
-Dhttp.auth.preference=Basic

AND most important, you should look at
http://vouters.dyndns.org/tima/All-OS-ANT-ANT_and_URLs_authentication.html
and then say thanks to Philippe Vouters, which has documented so nicely what we have done in the past to make ant going

Josef






-----Ursprüngliche Nachricht-----
Von: Brett Porter [mailto:brett@porterclan.net] Im Auftrag von Brett Porter
Gesendet: Dienstag, 22. Januar 2013 06:39
An: Maven Developers List; Shixiang Wen
Betreff: Re: Default remote repository URL is invalid to build Maven


On 21/01/2013, at 9:25 PM, Shixiang Wen <ws...@yahoo.com.cn> wrote:
> pull:
> [artifact:pom] Downloading: 
> org/apache/maven/maven-parent/21/maven-parent-21.pom from repository 
> central at http://repo1.maven.org/maven2 [artifact:pom] Error 
> transferring file: Connection timed out: connect

It seems that the place you were building this was unable to reach http://repo1.maven.org/maven2 at the time of the build (connection timed out) - if you're able to resolve that issue so it can connect to it then it should work without changes.

Regards,
Brett

--
Brett Porter
brett@apache.org
http://brettporter.wordpress.com/
http://au.linkedin.com/in/brettporter
http://twitter.com/brettporter






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


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


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


AW: Default remote repository URL is invalid to build Maven

Posted by Stadelmann Josef <jo...@axa-winterthur.ch>.
Sitting behind a firewall is mostly the cause of such troubles.

In this case you 
1. need to tell maven about how to reach out through the firewall
2. and you need to tell ant about how to reach out through the firewall
	a) when called alone from a shell
	b) when called from the ant plugin (or vice vers) under maven

general for maven documented (but sometimes not enough i.e. no http.auth.preference=BAsic hint can be passed by maven to the proxy which needs this to not start negotiating with the client, where as the client might not always be able to negotiate a authentication schema.
<proxies> 
   <proxy> 
	<active>true</active>
	<protocol>http</protocol>
	 <host>bcproxyserver.ch.winterthur.com</host>
	 <port>8080</port>
	 <username>myusername</username>
	 <password>mypassword</password>
	 <nonProxyHosts>*.wgrintra.net</nonProxyHosts>
	 <id>default</id>
   </proxy>
</proxies>

for maven we use
MAVEN_OPTS=
-XX:MaxPermSize=512m -Xmx950m -Xms950m 
-Dhttp.auth.preference=Basic 
-Dhttp.proxyhost=proxyserver.com 
-Dhttp.proxyport=8080 
-Dhttp.proxyuser=myusername
-Dhttp.proxypassword=mypassword

For ant we use
ANT_OPTS=
-Dhttp.proxyHost=proxyserver.com 
-Dhttp.proxyPort=8080 
-Dhttp.proxyUser=myusername 
-Dhttp.proxyPassword=mypassword 
-Dhttp.auth.preference=Basic

AND most important, you should look at 
http://vouters.dyndns.org/tima/All-OS-ANT-ANT_and_URLs_authentication.html
and then say thanks to Philippe Vouters, which has documented so nicely what we have done in the past to make ant going

Josef






-----Ursprüngliche Nachricht-----
Von: Brett Porter [mailto:brett@porterclan.net] Im Auftrag von Brett Porter
Gesendet: Dienstag, 22. Januar 2013 06:39
An: Maven Developers List; Shixiang Wen
Betreff: Re: Default remote repository URL is invalid to build Maven


On 21/01/2013, at 9:25 PM, Shixiang Wen <ws...@yahoo.com.cn> wrote:
> pull:
> [artifact:pom] Downloading: 
> org/apache/maven/maven-parent/21/maven-parent-21.pom from repository 
> central at http://repo1.maven.org/maven2 [artifact:pom] Error 
> transferring file: Connection timed out: connect

It seems that the place you were building this was unable to reach http://repo1.maven.org/maven2 at the time of the build (connection timed out) - if you're able to resolve that issue so it can connect to it then it should work without changes.

Regards,
Brett

--
Brett Porter
brett@apache.org
http://brettporter.wordpress.com/
http://au.linkedin.com/in/brettporter
http://twitter.com/brettporter






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


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


Re: Default remote repository URL is invalid to build Maven

Posted by Brett Porter <br...@apache.org>.
On 21/01/2013, at 9:25 PM, Shixiang Wen <ws...@yahoo.com.cn> wrote:
> pull:
> [artifact:pom] Downloading: org/apache/maven/maven-parent/21/maven-parent-21.pom from repository central at http://repo1.maven.org/maven2
> [artifact:pom] Error transferring file: Connection timed out: connect

It seems that the place you were building this was unable to reach http://repo1.maven.org/maven2 at the time of the build (connection timed out) - if you're able to resolve that issue so it can connect to it then it should work without changes.

Regards,
Brett

--
Brett Porter
brett@apache.org
http://brettporter.wordpress.com/
http://au.linkedin.com/in/brettporter
http://twitter.com/brettporter






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