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

Popular posts from this blog

Fail to load namespace Spring Security http://www.springframework.org/security/tags -

sql - MySQL query optimization using coalesce -

unity3d - Unity local avoidance in user created world -