How to use local repository in Maven?
How-To
Approach 1. Add localRepository tag in your settings.xml
1 2 3 4 5 6 7 8 | <settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:SchemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd"> <localRepository>C:\Users\albert\.m2</localRepository> </settings> |
Approach 2. Assign
1 | mvn -o -Dmaven.repo.local=”C:\Users\albert\.m2" clean install -Dmaven.test.skip=true -X |
Reference
[1] https://stackoverflow.com/questions/9123004/maven-is-it-possible-to-override-location-of-local-repository-via-the-use-of-co
No comments:
Post a Comment