You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Daniele Dellafiore <d....@sourcesense.com> on 2007/07/09 12:57:09 UTC

Cannot download parent pom from specified remote repository

Hi all.
I have this problem. I have created a super pom in a project defined as:

	<groupId>com.sourcesense.alfresco</groupId>
	<artifactId>alfresco-base</artifactId>
	<packaging>pom</packaging>
	<version>1.0</version>

then I use it in my actual project in this way:

	<parent>
		<groupId>com.sourcesense.alfresco</groupId>
		<artifactId>alfresco-base</artifactId>
		<version>1.0</version>
	</parent>

I have made "mvn install" of parent-pom project and then the child
project resolve correctly all dependancies.
So I make a "mvn deploy" of parent-pom to share with others.

Other team members cannot make it work because the parent-pom is not
found on company repo.
Note that there are a lot of dependencies in child project that were
downloaded correctly. Looking the log it seems that maven2 tries to
download the parent-pom just from repo1.maven.org ignoring the repo
declared in pom.xml of child project.

********* LOG BEGINS ***********

[INFO] Scanning for projects...
Downloading: http://repo1.maven.org/maven2/com/sourcesense/alfresco/alfresco-base/1.0/alfresco-base-1.0.pom
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.

GroupId: com.sourcesense.alfresco
ArtifactId: alfresco-base
Version: 1.0

Reason: Unable to download the artifact from any repository

  com.sourcesense.alfresco:alfresco-base:pom:1.0

from the specified remote repositories:
  central (http://repo1.maven.org/maven2),
  sourcesense (dav:https://dev.sourcesense.com/repos/dev/maven2)

********* LOG ENDS ***********

As you can see, it claims to try to download alfresco-base pom from my
company repository but the first lines of the log tell me a different
thing.

What can I do?

Thanks.

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


Re: Cannot download parent pom from specified remote repository

Posted by Rémy Sanlaville <re...@gmail.com>.
>
> My company repo is *not* a mirror :|
> So if I left it specified as a mirror in settings.xml, I am no more
> able to download from official repo!
> So is not possible to let it.


I think, most of your problem is here.
If you specify in the setting.xml a mirror of central to your corporate
maven 2 proxy
this don't mean that you have a mirror of the maven 2 repository. I think
the term
mirror is confusing. Normally, if you have a corporate maven 2 proxy, it is
working like a 2nd cache

>mvn ...  ----> Local Repository (1rst cache) ----> Proxy Maven 2 (2nd
cache) ---> Maven 2 repository

It seems that it is not the case for you and I am not sure to understand why
?
It would be easier if it will be the case.


> I think that in your parent pom you define some repositories which are
> used
> > to found your dependencies. But for the parent pom you need to specify
> where
> > to found it.
>
> in both parent pom and project pom I define my company repo as
> distribution server and as repository:
>
>         <distributionManagement>
>                 <repository>
>                         <id>sourcesense</id>
>                         <url>dav:
> https://dev.sourcesense.com/repos/dev/maven2</url>
>                 </repository>
>         </distributionManagement>
>
>         <repositories>
>                 <repository>
>                         <id>sourcesense</id>
>                         <url>dav:
> https://dev.sourcesense.com/repos/dev/maven2</url>
>                 </repository>
>         </repositories>
>
> Maybe a issue related to dav?
>

I don't kow if you can use the webdav protocol for a repository.
Can't you use an http adresse ? like <url>
https://dev.sourcesense.com/repos/dev/maven2</url>

Rémy

Re: Cannot download parent pom from specified remote repository

Posted by Daniele Dellafiore <il...@gmail.com>.
On 7/11/07, Rémy Sanlaville <re...@gmail.com> wrote:
> >
> > Ok, I have added this and works.
>
>
> Happy to see that it works :-)

Yesm it works but is not a suitable solution. I explain you why...

>
> I still have one question unresolved:
> > why to download artifact defined as dependency from my company repo I
> > just need to add the <repository> in my pom (or in settings.xml) while
> > when the artifact to download is the parent project I need to specify
> > the mirror?
>
>
> It's difficult to give an answer. I need to know your configuration
> (configuration of your
> maven 2 proxy, your parent pom...).

My company repo is *not* a mirror :|
So if I left it specified as a mirror in settings.xml, I am no more
able to download from official repo!
So is not possible to let it.

> I think that in your parent pom you define some repositories which are used
> to found your dependencies. But for the parent pom you need to specify where
> to found it.

in both parent pom and project pom I define my company repo as
distribution server and as repository:

	<distributionManagement>
		<repository>
			<id>sourcesense</id>
			<url>dav:https://dev.sourcesense.com/repos/dev/maven2</url>
		</repository>
	</distributionManagement>

	<repositories>
		<repository>
			<id>sourcesense</id>
			<url>dav:https://dev.sourcesense.com/repos/dev/maven2</url>
		</repository>
	</repositories>

Maybe a issue related to dav?

I remember you the log, as you can see maven does not even try to
download the parent pom from my company repo, goes directly on repo1.
After he said he had tried, but we know this is not true.

I am thinking this is a issue, maybe just of dav plugin, maybe of maven.

[INFO] Scanning for projects...
Downloading: http://repo1.maven.org/maven2/com/sourcesense/alfresco/alfresco-base/1.0/alfresco-base-1.0.pom
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Failed to resolve artifact.

GroupId: com.sourcesense.alfresco
ArtifactId: alfresco-base
Version: 1.0

Reason: Unable to download the artifact from any repository

  com.sourcesense.alfresco:alfresco-base:pom:1.0

from the specified remote repositories:
  central (http://repo1.maven.org/maven2),
  sourcesense (dav:https://dev.sourcesense.com/repos/dev/maven2)

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


Re: Cannot download parent pom from specified remote repository

Posted by Rémy Sanlaville <re...@gmail.com>.
>
> Ok, I have added this and works.


Happy to see that it works :-)

I still have one question unresolved:
> why to download artifact defined as dependency from my company repo I
> just need to add the <repository> in my pom (or in settings.xml) while
> when the artifact to download is the parent project I need to specify
> the mirror?


It's difficult to give an answer. I need to know your configuration
(configuration of your
maven 2 proxy, your parent pom...).

I think that in your parent pom you define some repositories which are used
to found your dependencies. But for the parent pom you need to specify where
to found it.

The second part  is not needed, you think is better to add it anyway?


If you have a maven 2 proxy, it's better to declared it in the setting.xmlvia
the mirror section. Otherwise, you just use it for your inhouse
repositories.

Rémy

Re: Cannot download parent pom from specified remote repository

Posted by Daniele Dellafiore <il...@gmail.com>.
On 7/10/07, Rémy Sanlaville <re...@gmail.com> wrote:
> Hi,
>
> As I mentioned in my first post, try to add this in your setting.xml
>   <mirrors>
>     <mirror>
>       <id>Corporate Proxy</id>
>       <mirrorOf>central</mirrorOf>
>       <name>my corporate repository</name>
>       <url>url to your maven 2 proxy</url>
>     </mirror>
>   </mirrors>
>
> This indicates to maven 2 to look at your maven 2 proxy instead of repo1.
> Normally your proxy is configure in order to look at maven 2 repository if
> needed

Ok, I have added this and works.

I still have one question unresolved:
why to download artifact defined as dependency from my company repo I
just need to add the <repository> in my pom (or in settings.xml) while
when the artifact to download is the parent project I need to specify
the mirror?

The second part  is not needed, you think is better to add it anyway?

Thanks so much for help.

> It also depends on how your maven 2 proxy is configure. In your case, it
> seems that
> you also have to add your corporate repository in your pom.xml in order to
> find your
> pom corporate (I assume that you pom corporate is in your inhouse
> repository) :
>
>   <repositories>
>     <repository>
>       <id>inhouse</id>
>       <name>Inhouse maven repository</name>
>       <url>url to your corporate repository</url>
>       <releases>
>         <enabled>true</enabled>
>       </releases>
>       <snapshots>
>         <enabled>false</enabled>
>       </snapshots>
>     </repository>
>   </repositories>
>
> This indicates to maven 2 to look at your inhouse repository to find your
> pom corporate in order to download it in your local repository.
>
> Rémy

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


Re: Cannot download parent pom from specified remote repository

Posted by Rémy Sanlaville <re...@gmail.com>.
Hi,

As I mentioned in my first post, try to add this in your setting.xml
  <mirrors>
    <mirror>
      <id>Corporate Proxy</id>
      <mirrorOf>central</mirrorOf>
      <name>my corporate repository</name>
      <url>url to your maven 2 proxy</url>
    </mirror>
  </mirrors>

This indicates to maven 2 to look at your maven 2 proxy instead of repo1.
Normally your proxy is configure in order to look at maven 2 repository if
needed

It also depends on how your maven 2 proxy is configure. In your case, it
seems that
you also have to add your corporate repository in your pom.xml in order to
find your
pom corporate (I assume that you pom corporate is in your inhouse
repository) :

  <repositories>
    <repository>
      <id>inhouse</id>
      <name>Inhouse maven repository</name>
      <url>url to your corporate repository</url>
      <releases>
        <enabled>true</enabled>
      </releases>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
    </repository>
  </repositories>

This indicates to maven 2 to look at your inhouse repository to find your
pom corporate in order to download it in your local repository.

Rémy

Re: Cannot download parent pom from specified remote repository

Posted by Daniele Dellafiore <il...@gmail.com>.
Here it is.

But I do not see the point: how is the mirror involved? It seems that
maven tries to download from repo1 and not from my company repo, where
it is supposed to try first.

Anyway, maybe I am missing some point here :)

Thanks.

On 7/10/07, R�my Sanlaville <re...@gmail.com> wrote:
> Can we see you setting.xml ?
> It seems that you have not a mirror of central.
>
> R�my
>

Re: Cannot download parent pom from specified remote repository

Posted by Rémy Sanlaville <re...@gmail.com>.
Can we see you setting.xml ?
It seems that you have not a mirror of central.

Rémy

Re: Cannot download parent pom from specified remote repository

Posted by Daniele Dellafiore <il...@gmail.com>.
On 7/10/07, Andrew Williams <an...@handyande.co.uk> wrote:
> You may have indeed identified a problem there, but I do not see
> information about which maven version
> you are using (please forgive me if I missed it).
> Are you on the latest (2.0.7)?

yes, 2.0.7

I will try tomorrow solutions proposed by Rémy.

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


Re: Cannot download parent pom from specified remote repository

Posted by Andrew Williams <an...@handyande.co.uk>.
You may have indeed identified a problem there, but I do not see  
information about which maven version
you are using (please forgive me if I missed it).
Are you on the latest (2.0.7)?

Andy

On 9 Jul 2007, at 14:55, Daniele Dellafiore wrote:

> I know, there are a lot of dependencies that are downloaded from my
> company repository that is specified in the child project pom.
> As you can see in my log, there is a incoherence that I am trying  
> to point out:
>
> Maven tries to download the parent pom just from repo1.maven.org:
>
> [INFO] Scanning for projects...
> Downloading: http://repo1.maven.org/maven2/com/sourcesense/alfresco/ 
> alfresco-base/1.0/alfresco-base-1.0.pom
> [INFO] -----------
>
> and then give the Fatal Error.
> But after it tells that it cannot found artifact in both repos:
>
> --
> from the specified remote repositories:
> central (http://repo1.maven.org/maven2),
> sourcesense (dav:https://dev.sourcesense.com/repos/dev/maven2)
> --
>
> I suspect that it does not even try to download the parent pom
> artifact from my company repo. All other artifact are correclty
> downloaded and normally the download sequence is: first, specified
> repo, later the default repo, in fact this is a typical sequence:
>
> Downloading: https://dev.sourcesense.com/repos/dev/maven2/axis/axis- 
> jaxrpc/1.4/axis-jaxrpc-1.4.pom
> Downloading: http://repo1.maven.org/maven2/axis/axis-jaxrpc/1.4/ 
> axis-jaxrpc-1.4.pom
> Downloading: https://dev.sourcesense.com/repos/dev/maven2/axis/axis- 
> saaj/1.4/axis-saaj-1.4.pom
> Downloading: http://repo1.maven.org/maven2/axis/axis-saaj/1.4/axis- 
> saaj-1.4.pom
>
> Finally: or I am missing something in configuration or there is a bug
> in the sequence: maven does not look for repositories defined in pom
> before looking for the parent project artifact.
> In fact if I already have the artifact in local repo, everything  
> works.
>
> On 7/9/07, Rémy Sanlaville <re...@gmail.com> wrote:
>> Hi,
>>
>> You parent pom is like any artifact and you have to indicate to  
>> maven 2
>> where to find it.
>>
>> Since you have a corporate repository (via a maven proxy) you have  
>> two
>> solutions :
>> 1. Either you add a reference to your corporate repository in your  
>> pom.xml
>>   <repositories>
>>     <repository>
>>       <id>inhouse</id>
>>       <name>Inhouse maven repository</name>
>>       <url>url to your corporate repository</url>
>>       <releases>
>>         <enabled>true</enabled>
>>       </releases>
>>       <snapshots>
>>         <enabled>false</enabled>
>>       </snapshots>
>>     </repository>
>>
>> 2. or by specifying your corporate repository to maven 2 in your  
>> setting.xml
>>   <mirrors>
>>     <mirror>
>>       <id>Corporate Proxy</id>
>>       <mirrorOf>central</mirrorOf>
>>       <name>my corporate repository</name>
>>       <url>url to your corporate repository</url>
>>     </mirror>
>> It's important to use the token central for the node mirrorOf.
>>
>> In general, the second solution is better when using a maven 2 proxy.
>>
>> HTH,
>>
>> Rémy
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>


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


Re: Cannot download parent pom from specified remote repository

Posted by Daniele Dellafiore <il...@gmail.com>.
I know, there are a lot of dependencies that are downloaded from my
company repository that is specified in the child project pom.
As you can see in my log, there is a incoherence that I am trying to point out:

Maven tries to download the parent pom just from repo1.maven.org:

[INFO] Scanning for projects...
Downloading: http://repo1.maven.org/maven2/com/sourcesense/alfresco/alfresco-base/1.0/alfresco-base-1.0.pom
[INFO] -----------

and then give the Fatal Error.
But after it tells that it cannot found artifact in both repos:

--
from the specified remote repositories:
 central (http://repo1.maven.org/maven2),
 sourcesense (dav:https://dev.sourcesense.com/repos/dev/maven2)
--

I suspect that it does not even try to download the parent pom
artifact from my company repo. All other artifact are correclty
downloaded and normally the download sequence is: first, specified
repo, later the default repo, in fact this is a typical sequence:

Downloading: https://dev.sourcesense.com/repos/dev/maven2/axis/axis-jaxrpc/1.4/axis-jaxrpc-1.4.pom
Downloading: http://repo1.maven.org/maven2/axis/axis-jaxrpc/1.4/axis-jaxrpc-1.4.pom
Downloading: https://dev.sourcesense.com/repos/dev/maven2/axis/axis-saaj/1.4/axis-saaj-1.4.pom
Downloading: http://repo1.maven.org/maven2/axis/axis-saaj/1.4/axis-saaj-1.4.pom

Finally: or I am missing something in configuration or there is a bug
in the sequence: maven does not look for repositories defined in pom
before looking for the parent project artifact.
In fact if I already have the artifact in local repo, everything works.

On 7/9/07, Rémy Sanlaville <re...@gmail.com> wrote:
> Hi,
>
> You parent pom is like any artifact and you have to indicate to maven 2
> where to find it.
>
> Since you have a corporate repository (via a maven proxy) you have two
> solutions :
> 1. Either you add a reference to your corporate repository in your pom.xml
>   <repositories>
>     <repository>
>       <id>inhouse</id>
>       <name>Inhouse maven repository</name>
>       <url>url to your corporate repository</url>
>       <releases>
>         <enabled>true</enabled>
>       </releases>
>       <snapshots>
>         <enabled>false</enabled>
>       </snapshots>
>     </repository>
>
> 2. or by specifying your corporate repository to maven 2 in your setting.xml
>   <mirrors>
>     <mirror>
>       <id>Corporate Proxy</id>
>       <mirrorOf>central</mirrorOf>
>       <name>my corporate repository</name>
>       <url>url to your corporate repository</url>
>     </mirror>
> It's important to use the token central for the node mirrorOf.
>
> In general, the second solution is better when using a maven 2 proxy.
>
> HTH,
>
> Rémy
>

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


Re: Cannot download parent pom from specified remote repository

Posted by Rémy Sanlaville <re...@gmail.com>.
Hi,

You parent pom is like any artifact and you have to indicate to maven 2
where to find it.

Since you have a corporate repository (via a maven proxy) you have two
solutions :
1. Either you add a reference to your corporate repository in your pom.xml
  <repositories>
    <repository>
      <id>inhouse</id>
      <name>Inhouse maven repository</name>
      <url>url to your corporate repository</url>
      <releases>
        <enabled>true</enabled>
      </releases>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
    </repository>

2. or by specifying your corporate repository to maven 2 in your setting.xml
  <mirrors>
    <mirror>
      <id>Corporate Proxy</id>
      <mirrorOf>central</mirrorOf>
      <name>my corporate repository</name>
      <url>url to your corporate repository</url>
    </mirror>
It's important to use the token central for the node mirrorOf.

In general, the second solution is better when using a maven 2 proxy.

HTH,

Rémy