You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@archiva.apache.org by cbrown <ch...@sensis.com> on 2007/11/07 17:24:22 UTC

Problem caching an external Maven 1 repo .jar to Archiva internal repository

Hello,

    Archiva Beta 3, plexus standalone, Fedora Core 5, jdk1.5.0_09

    A user asked me to cache http://download.java.net/maven/1, a Maven 1
repo.  I configured a proxy connector to cache it into the Archiva
'internal' maven 2 repository.

    The user has the following in his settings.xml;

      <mirror>
        <mirrorOf>*</mirrorOf>
        <name>Archiva Mirror Repository</name>
        <url>http://m2repo.atsdev.sensis.com:8280/archiva/repository/internal</url>
        <id>internal</id>
      </mirror>

   On doing his build, maven hit archiva and got the
http://m2repo.atsdev.sensis.com:8280/archiva/repository/internal/com/sun
/tools/xjc/maven2/maven-jaxb-plugin/1.1/maven-jaxb-plugin-1.1.pom

   However, it failed to get the associated .jar file.

   We twiddled a bunch of different settings, and determined that when
he configures the external repo as a pluginRepository, and ignores the
Archiva, he gets the .jar just fine.

    Finally, we manually downloaded the .jar, .jar.sha1 and .jar.md5 and
dropped them into the Archive repo folder next to the pom Archiva
downloaded.

    After that, the user could build just fine.

   So, is there something wrong in my archiva configuration, the maven
configuration, or is it a bug that Archiva would fetch and cache the POM
but not the JAR?

   Thanks.

--CB

Re: Problem caching an external Maven 1 repo .jar to Archiva internal repository

Posted by Brett Porter <br...@gmail.com>.
I was able to reproduce it. The problem is that this looks like a
maven1 plugin, coming from a maven1 repository, so it translates to
/plugins/ which doesn't exist.

Manually installing is a reasonable workaround. You can file an issue
if you like - though the only way I could think to fix it is for the
proxy connector to have an option to say "don't translate maven1
plugins", or to somehow retry failures for m1 plugins and look in
jars.

This is the edgiest of edge cases, and something I wish the jaxb team
would fix by putting their m2 plugins in an m2 repository :)

Cheers,
Brett

On 08/11/2007, cbrown <ch...@sensis.com> wrote:
> Hello,
>
>     Archiva Beta 3, plexus standalone, Fedora Core 5, jdk1.5.0_09
>
>     A user asked me to cache http://download.java.net/maven/1, a Maven 1
> repo.  I configured a proxy connector to cache it into the Archiva
> 'internal' maven 2 repository.
>
>     The user has the following in his settings.xml;
>
>       <mirror>
>         <mirrorOf>*</mirrorOf>
>         <name>Archiva Mirror Repository</name>
>         <url>http://m2repo.atsdev.sensis.com:8280/archiva/repository/internal</url>
>         <id>internal</id>
>       </mirror>
>
>    On doing his build, maven hit archiva and got the
> http://m2repo.atsdev.sensis.com:8280/archiva/repository/internal/com/sun
> /tools/xjc/maven2/maven-jaxb-plugin/1.1/maven-jaxb-plugin-1.1.pom
>
>    However, it failed to get the associated .jar file.
>
>    We twiddled a bunch of different settings, and determined that when
> he configures the external repo as a pluginRepository, and ignores the
> Archiva, he gets the .jar just fine.
>
>     Finally, we manually downloaded the .jar, .jar.sha1 and .jar.md5 and
> dropped them into the Archive repo folder next to the pom Archiva
> downloaded.
>
>     After that, the user could build just fine.
>
>    So, is there something wrong in my archiva configuration, the maven
> configuration, or is it a bug that Archiva would fetch and cache the POM
> but not the JAR?
>
>    Thanks.
>
> --CB
>


-- 
Brett Porter
Blog: http://www.devzuz.org/blogs/bporter/