maven repository mirrors -
normally, have following mirror configured in maven settings.xml
<mirror> <id>internal-repository</id> <url>http://build.idaho.local/wtp_repository</url> <mirrorof>*</mirrorof> </mirror>
my understanding mirror prevents maven downloading dependencies internet, i.e. them in internal repository.
however, whenever want add dependency isn't in internal repository, have comment out text above , add following project's pom.xml
<repository> <id>internal-repository</id> <url>http://build.idaho.local/wtp_repository</url> </repository>
when make these changes maven check dependencies in local repo, , if not found, download them internet local repo. once have dependencies need, change configuration back.
is there way behaviour want - check internal repo, public (internet) repos - without having add <repository>
every project's pom.xml
?
ideally specify repository once in settings.xml
, seems can configure mirrors there.
you try configure maven use mirror central repository or exclude repository identified id.
<mirror> <id>internal-mirror</id> <url>http://build.idaho.local/wtp_repository</url> <mirrorof>central</mirrorof> </mirror>
or
<mirror> <id>internal-mirror</id> <url>http://build.idaho.local/wtp_repository</url> <mirrorof>*,!internal-repository</mirrorof> </mirror>
the examples adapted maven settings , guide mirror settings.
Comments
Post a Comment