You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Charles Brown <ch...@sensis.com> on 2010/07/15 15:58:30 UTC

maven claims to try a repo, but doesn't

All,

I have two maven 2 repos, internal and external.  internal holds my 
releases, while external holds artifacts mirrored from central.  When I 
compile, maven try to download one of my internal artifacts and fails, 
printing this;

Downloading: 
http://path/to/my/repository/external//path/to/my/artifact/version/....pom
[INFO] Unable to find resource 'path:to:my:artifact:version' in 
repository external (http://path/to/my/repository/external/)
Downloading: 
http://path/to/my/repository/external//path/to/my/artifact/version/....pom
[INFO] Unable to find resource 'path:to:my:artifact:version' in 
repository internal (http://path/to/my/repository/internal/)

When I build a URL from the printed information, my artifact is indeed 
in the internal repository at;

http://path/to/my/repository/internal//path/to/my/artifact/version/....pom

That is, maven claims to have tried internal, but it didn't, really. It 
hit external twice.

My repository configuration is detailed below. What am I doing wrong?

   My maven is

       Apache Maven 2.2.1 (rdebian-1)
       Java version: 1.6.0_20

   My settings.xml has

<mirrors>
<mirror>
<id>external</id>
<url>http://path/to/my/repository/external/</url>
<mirrorOf>external:*</mirrorOf>
</mirror>
</mirrors>

<profiles>
<profile>
<id>default</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<repositories>
<repository>
<id>external</id>
<name>External/Remote Repositories</name>
<url>http://path/to/my/repository/external/</url>
                     ...
</repository>
<repository>
<id>internal</id>
<name>Internal/CM Repository</name>
<url>http://path/to/my/repository/internal/</url>
                     ...
</repository>
</repositories>
</profile>
</profiles>

My pom.xml has

<project ...>
     ...
<distributionManagement>
<repository>
<id>internal</id>
<url>http://path/to/my/repository/internal/</url>
</repository>
</distributionManagement>

</project>
-
This message is intended only for the addressee and may contain information that is company confidential or privileged.  Any technical data in this message may be exported only in accordance with the U.S. International Traffic in Arms Regulations (22 CFR Parts 120-130) or the Export Administration Regulations (15 CFR Parts 730-774). Unauthorized use is strictly prohibited and may be unlawful. If you are not the intended recipient, or the person responsible for delivering to the intended recipient, you should not read, copy, disclose or otherwise use this message. If you have received this email in error, please delete it, and advise the sender immediately. 
-                                                                                                                                                                                                                                                       

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


Re: maven claims to try a repo, but doesn't

Posted by Brett Porter <br...@apache.org>.
On 15/07/2010, at 11:58 PM, Charles Brown wrote:

> That is, maven claims to have tried internal, but it didn't, really. It hit external twice.
> 
> My repository configuration is detailed below. What am I doing wrong?
> 
>  My maven is
> 
>      Apache Maven 2.2.1 (rdebian-1)
>      Java version: 1.6.0_20
> 
>  My settings.xml has
> 
> <mirrors>
> <mirror>
> <id>external</id>
> <url>http://path/to/my/repository/external/</url>
> <mirrorOf>external:*</mirrorOf>
> </mirror>
> </mirrors>

You've mapped all repositories to external here. Note that "external:*" doesn't have any correlation to your IDs, it just means "any that aren't file://...".

try <mirrorOf>external:*,!internal</mirrorOf> instead, or set up a repository manager at the mirror location and have it manage requests between the two.

- Brett

--
Brett Porter
brett@apache.org
http://brettporter.wordpress.com/





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


Re: maven claims to try a repo, but doesn't

Posted by Ron Wheeler <rw...@artifact-software.com>.
  I would suggest moving to the free version of Nexus.

This will greatly simplify your management of Maven.
It only takes a couple of hours to get set up for a small development team.

Ron

On 15/07/2010 9:58 AM, Charles Brown wrote:
> All,
>
> I have two maven 2 repos, internal and external.  internal holds my 
> releases, while external holds artifacts mirrored from central.  When 
> I compile, maven try to download one of my internal artifacts and 
> fails, printing this;
>
> Downloading: 
> http://path/to/my/repository/external//path/to/my/artifact/version/....pom
> [INFO] Unable to find resource 'path:to:my:artifact:version' in 
> repository external (http://path/to/my/repository/external/)
> Downloading: 
> http://path/to/my/repository/external//path/to/my/artifact/version/....pom
> [INFO] Unable to find resource 'path:to:my:artifact:version' in 
> repository internal (http://path/to/my/repository/internal/)
>
> When I build a URL from the printed information, my artifact is indeed 
> in the internal repository at;
>
> http://path/to/my/repository/internal//path/to/my/artifact/version/....pom 
>
>
> That is, maven claims to have tried internal, but it didn't, really. 
> It hit external twice.
>
> My repository configuration is detailed below. What am I doing wrong?
>
>   My maven is
>
>       Apache Maven 2.2.1 (rdebian-1)
>       Java version: 1.6.0_20
>
>   My settings.xml has
>
> <mirrors>
> <mirror>
> <id>external</id>
> <url>http://path/to/my/repository/external/</url>
> <mirrorOf>external:*</mirrorOf>
> </mirror>
> </mirrors>
>
> <profiles>
> <profile>
> <id>default</id>
> <activation>
> <activeByDefault>true</activeByDefault>
> </activation>
> <repositories>
> <repository>
> <id>external</id>
> <name>External/Remote Repositories</name>
> <url>http://path/to/my/repository/external/</url>
>                     ...
> </repository>
> <repository>
> <id>internal</id>
> <name>Internal/CM Repository</name>
> <url>http://path/to/my/repository/internal/</url>
>                     ...
> </repository>
> </repositories>
> </profile>
> </profiles>
>
> My pom.xml has
>
> <project ...>
>     ...
> <distributionManagement>
> <repository>
> <id>internal</id>
> <url>http://path/to/my/repository/internal/</url>
> </repository>
> </distributionManagement>
>
> </project>
> -
> This message is intended only for the addressee and may contain 
> information that is company confidential or privileged.  Any technical 
> data in this message may be exported only in accordance with the U.S. 
> International Traffic in Arms Regulations (22 CFR Parts 120-130) or 
> the Export Administration Regulations (15 CFR Parts 730-774). 
> Unauthorized use is strictly prohibited and may be unlawful. If you 
> are not the intended recipient, or the person responsible for 
> delivering to the intended recipient, you should not read, copy, 
> disclose or otherwise use this message. If you have received this 
> email in error, please delete it, and advise the sender immediately. -
> ---------------------------------------------------------------------
> 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