Can I have multiple local repository for maven? -
in maven settings, there entity refers local repository:
<localrepository>~/.m2/repository</localrepository>
when add one, this:
<localrepository>~/another/place</localrepository>
it raises duplicated tag
error.
can have multiple local repository or maybe add direcotry local repository?
yes can have , can in pom.xml
itself. below example.
<project> ... <repositories> <repository> <id>firstrepo</id> <name>repo</name> <url>http://myrepo.my</url> </repository> <repository> <id>secondrepo</id> <name>repo2</name> <url>http://myrepo.yours</url> </repository> </repositories> ... </project>
second method creating profile
in settings.xml
for multiple local repositories can have multiple settings.xml
file. in command line specify alternate path using mvn -dmaven.repo.local=/path/to/repo
more information can check link. hope helps.
Comments
Post a Comment