This may well have been asked before (so apologies in advance if it has been - I just haven't found the right question yet!)
I'm working on a project with two Maven repositories: a local one (on my machine) and an internal one (on a central server). There are quite a few projects kicking around, and one parent project that uses all of them. When we're done working on a particular project, we install it to the central repository for everyone else to use.
When I build the parent project for local testing, I'd like to use the most up to date versions of each project:
What I'm seeing is the build completely ignoring my local repository and just grabbing everything from the internal one. Have I missed a setting somewhere obvious? Or is this just the way things work?
mvn -o
will take you into offline mode so nothing is downloaded.
Or in your settings.xml set the update policy to not always for snapshots or releases. See here and relevant section below
<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">
...
<profiles>
<profile>
...
<repositories>
<repository>
<id>codehausSnapshots</id>
<name>Codehaus Snapshots</name>
<releases>
<enabled>false</enabled>
<updatePolicy>always</updatePolicy>
<checksumPolicy>warn</checksumPolicy>
</releases>
<snapshots>
<enabled>true</enabled>
<updatePolicy>never</updatePolicy>
<checksumPolicy>fail</checksumPolicy>
</snapshots>
<url>http://snapshots.maven.codehaus.org/maven2</url>
<layout>default</layout>
</repository>
</repositories>
<pluginRepositories>
...
</pluginRepositories>
...
</profile>
</profiles>
...
</settings>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With