maven-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From andrew <lis...@pyroboy.com.au>
Subject [m2] multiple repository confusion
Date Wed, 28 Sep 2005 02:45:14 GMT
Maven version: 2.0-beta-2

Hi,

I am having some trouble getting m2 repositories to work as I expect.
Not sure if the problem is with my configuration, or my expectation :)

I can download plugins and dependencies from the main maven/ibiblio
repositories to my local (~/.m2/repository) repository without any hassle.

I can also install artefacts to my local repository (via install or
install:install-file) and deploy them to my deployment repository[1].

Where I am having trouble is if I have a dependency that is not
available on the central maven/ibiblio repository, or my local
repository, but is available on my deployment repository. For example,
when a colleague deploys a project that I do not have locally.

m2 appears to try my local repository, then the central repository, then
gives up.

I have tried adding a repository element to my ~/.m2/settings.xml[2] but
this doesn't appear to make any difference.

Is my expectation of m2 that it can draw dependencies from multiple
repositories correct? If so, can anyone let me know what may be wrong
with my configuration?

Also, in previous m2 releases, when a dependency is not found m2 would
provide a pre-filled-in command line snippet for install:install-file.
         A nice hint so you could easily add it to your local
repository. It no longer appears to do this. Is this by design?

Thanks,
...andrew

Listing 1:

<project>
  ...
  <distributionManagement>
    <repository>
      <id>myrepo</id>
      <url>file:///path/to/myrepo</url>
    </repository>
  </distributionManagement>
  ...
</project>

Listing 2:

<settings>
  ...
  <profiles>
    <profile>
      <repositories>
        <repository>
          <id>myrepo</id>
            <url>file:///path/to/myrepo</url>
        </repository>
      </repositories>
    </profile>
  </profiles>
  ...
</settings>

--

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


Mime
View raw message