Possible Duplicate:
How to set order of repositories in Maven settings.xml
I'm using an internal maven repository for a project, and when I specify a dependency I'd like that maven looks this dependency only in the internal repository and not in the public repositories. Example:
<repositories>
...
<myrepository...>
<publicrepo...>
</repositories>
[..]
<dependency>
<groupId>imygroupid</groupId>
<artifactId>myartifactId</artifactId>
<version>1.0-SNAPSHOT</version>
</dependency>
If I build the maven project I can see that maven try to download the artifact myartifactId
from all public repository I specified in the pom.
Is there a way to specify that all artifacts with groupId
should be find in the internal repository and not in the other?
This will solve some performance problem during the build task.
I think the only way to do this is with repository managers like Nexus or Archiva
You may find some clues here : How to set order of repositories in Maven settings.xml
The order of repositories seems to be inverse order of declaration in settings.xml
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With