Subject:
Re: [m2] What triggers attempt to download from:
http://cvs.apache.org/maven-snapshot-repository ?
Date:
Tue, 29 Jul 2008 20:38:41 -0700
To:
"Maven Users List" <[email protected]> <[email protected]>

On Tue, Jul 29, 2008 at 2:36 PM, Dan Rollo
<[EMAIL PROTECTED]><[EMAIL PROTECTED]>wrote:

> > 1. Why are only SOME downloads hitting:
> > http://cvs.apache.org/maven-snapshot-repository/
> > when those same items exist in the normal central repo (and when I never

> > define the cvs.apache.org repo anywhere)?
> >
> > 2. Any idea how I can workaround this issue to avoid these long download

> > delays?

Unfortunately, your dependencies can introduce repositories to your build.

You can use mirrors in your settings.xml, specifically the
<mirrorOf>*</mirrorOf> section, to prevent Maven contacting extra
repos that show up.  See if this helps:
http://maven.apache.org/guides/mini/guide-mirror-settings.html

(It's not coming from the Apache parent pom-- the section that was
quoted is actually from distributionManagement, which controls where
Maven publishes to, not where it retrieves from.  I can tell from the
scp:// url.)

-- Wendy


Hi Wendy,

I was afraid you'd say that. The problem with any workaround involving
settings.xml is it doesn't help when someone downloads my project source and
builds with maven. Adding a README snippet that says: "To avoid long delays
in downloading, muck with your settings.xml like so..." is really ugly, and
breaks the wonderful "It just works" experience of building a new project
with maven.

I'm a little surprised to see this "implicit repo" introduced, as my
dependencies list is pretty small (copied below from my original post).

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.3.1</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>javax.xml.soap</groupId>
            <artifactId>saaj-api</artifactId>
            <version>1.3</version>
            <!--<scope>system</scope>-->
            <!--<systemPath>${basedir}/lib/saaj-api.jar</systemPath>-->
        </dependency>

        <dependency>
            <groupId>com.sun.xml.messaging.saaj</groupId>
            <artifactId>saaj-impl</artifactId>
            <version>1.3</version>
            <scope>test</scope>
            <!--<scope>system</scope>-->
            <!--<systemPath>${basedir}/lib/saaj-impl.jar</systemPath>-->
            <!-- Note: "provided" also seems to work with jdk 1.5 -->
            <!--<scope>provided</scope> -->
        </dependency>

        <dependency>
            <groupId>javax.activation</groupId>
            <artifactId>activation</artifactId>
            <!-- The manifest of saaj-impl.jar lists activation.jar as
required (Class-Path: saaj-api.jar activation.jar),
            but jdbc4olap does not appear to require it at runtime. Try
adding this jar if you have problems at runtime. -->
            <optional>true</optional>
            <version>1.1.1</version>
            <scope>runtime</scope>
            <!--<version>1.0.2</version>-->
            <!--<scope>system</scope>-->
            <!--<systemPath>${basedir}/lib/activation.jar</systemPath>-->
        </dependency>


Also, the only repo I explicitly include in my pom.xml is:

    <repositories>
        <!-- Only required for Sun activation.jar (not hosted on ibiblio,
nor in maven2-repository.dev.java.net). -->
        <repository>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
            <id>java.net</id>
            <url>http://download.java.net/maven/1</url>
            <layout>legacy</layout>
        </repository>
    </repositories>


In the interest of trying to make things better (instead of just whining), I
dug into the pom.xml in my local .m2 repo of each of these deps looking for
added repos. I found none. Also, there are no transitive dependencies for
the above deps.

Do you suspect the "implicit" repo:
http://cvs.apache.org/maven-snapshot-repository/
is being added by the java.net maven1 repo somehow?
And if so, any idea how to fix it (w/out mucking with settings.xml)?
I'd like to understand what is really going on here, and exactly what is
introducing this attempt to download from an unlisted snapshot repo.

Thanks,
Dan

Reply via email to