Reputation: 4498
I have a local repository on my machine. I need to add it to maven's settings.xml. All the examples I've found online look like this:
<settings>
<profiles>
<profile>
<id>myprofile</id>
<repositories>
<repository>
<id>androidsupport</id>
<name>Android Support</name>
<url>http://www.whatever.com/maven2/</url>
</repository>
</repositories>
</profile>
<activeProfiles>
<activeProfile>myprofile</activeProfile>
</activeProfiles>
</profiles>
</settings>
I need to point it to a local repo. How can I do that?
Upvotes: 7
Views: 47074
Reputation: 3684
I think you can do it via adding into settings.xml
this:
<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:/MyLocalRepository</localRepository>
</settings>
More details you can find there.
To add more internal repositories you can use:
<project>
...
<repositories>
<repository>
<id>my-internal-site</id>
<url>file:///C:/MyLocalRepository</url>
</repository>
</repositories>
...
</project>
More details you can find there.
Upvotes: 16