You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@archiva.apache.org by Julian Dunn <Ju...@CBC.CA> on 2008/04/10 05:03:47 UTC

M2 project won't look in 'restricted' repository for artifacts

Hi again,

Sorry if this has been asked before, I'm not a Java developer but I'm
trying to help our folks use Archiva.

I have 2 repositories set up called "internal" (the default that comes
with Archiva) and "restricted" (one I have set up to host Sun restricted
license JARs and so on)

However, I cannot get M2 projects to try to consult this repo for
restricted license JARs. I have, in ~/.m2/settings.xml, the following:

<settings>
  <mirrors>
    <mirror>
      <id>archiva.default</id>
      <url>http://archiva.nm.cbc.ca/archiva/repository/internal/</url>
      <mirrorOf>*</mirrorOf>
    </mirror>
    <mirror>
      <id>archiva.restricted</id>
     
<url>http://archiva.nm.cbc.ca/archiva/repository/restricted/</url>
      <mirrorOf>restricted</mirrorOf>
    </mirror>
  </mirrors>
</settings>

But the build fails like this:

Downloading:
http://archiva.nm.cbc.ca/archiva/repository/internal//flexjson/flexjson/1.6/flexjson-1.6.jar
Downloading:
http://archiva.nm.cbc.ca/archiva/repository/internal//javax/transaction/jta/1.1B/jta-1.1B.jar
Downloading:
http://archiva.nm.cbc.ca/archiva/repository/internal//javax/jms/jms/1.1/jms-1.1.jar
[INFO]
------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Failed to resolve artifact.


What's wrong? Obviously, I have already uploaded those artifacts to
Archiva, just in the restricted repo, not internal.

- Julian

Re: M2 project won't look in 'restricted' repository for artifacts

Posted by Julian Dunn <Ju...@CBC.CA>.
Thanks for the quick response, Brett -- it works now!

- Julian (sysadmin masquerading as J2EE developer)

>>> "Brett Porter" <br...@gmail.com> 4/9/2008 11:11 PM >>>
You need a <repository> definition in the either pom.xml, or
settings.xml (under a profile), that uses the id "restricted".

See "Using Archiva as an additional repository" here:
http://maven.apache.org/archiva/docs/1.0.2/userguide/using-repository.html
-- 
Brett Porter
Blog: http://blogs.exist.com/bporter/

Re: M2 project won't look in 'restricted' repository for artifacts

Posted by Brett Porter <br...@gmail.com>.
You need a <repository> definition in the either pom.xml, or
settings.xml (under a profile), that uses the id "restricted".

See "Using Archiva as an additional repository" here:
http://maven.apache.org/archiva/docs/1.0.2/userguide/using-repository.html

On 10/04/2008, Julian Dunn <Ju...@cbc.ca> wrote:
> Hi again,
>
>  Sorry if this has been asked before, I'm not a Java developer but I'm
>  trying to help our folks use Archiva.
>
>  I have 2 repositories set up called "internal" (the default that comes
>  with Archiva) and "restricted" (one I have set up to host Sun restricted
>  license JARs and so on)
>
>  However, I cannot get M2 projects to try to consult this repo for
>  restricted license JARs. I have, in ~/.m2/settings.xml, the following:
>
>  <settings>
>   <mirrors>
>     <mirror>
>       <id>archiva.default</id>
>       <url>http://archiva.nm.cbc.ca/archiva/repository/internal/</url>
>       <mirrorOf>*</mirrorOf>
>     </mirror>
>     <mirror>
>       <id>archiva.restricted</id>
>
>  <url>http://archiva.nm.cbc.ca/archiva/repository/restricted/</url>
>       <mirrorOf>restricted</mirrorOf>
>     </mirror>
>   </mirrors>
>  </settings>
>
>  But the build fails like this:
>
>  Downloading:
>  http://archiva.nm.cbc.ca/archiva/repository/internal//flexjson/flexjson/1.6/flexjson-1.6.jar
>  Downloading:
>  http://archiva.nm.cbc.ca/archiva/repository/internal//javax/transaction/jta/1.1B/jta-1.1B.jar
>  Downloading:
>  http://archiva.nm.cbc.ca/archiva/repository/internal//javax/jms/jms/1.1/jms-1.1.jar
>  [INFO]
>  ------------------------------------------------------------------------
>  [ERROR] BUILD ERROR
>  [INFO]
>  ------------------------------------------------------------------------
>  [INFO] Failed to resolve artifact.
>
>
>  What's wrong? Obviously, I have already uploaded those artifacts to
>  Archiva, just in the restricted repo, not internal.
>
>
>  - Julian
>


-- 
Brett Porter
Blog: http://blogs.exist.com/bporter/