On 18/10/2010 14:54, Kevin Meyer - KMZ wrote:

My problem is that I am building from sources. My local repository is
*always* the same, if not newer, than any other. So why does maven
go looking elsewhere for Isis snapshots? ;)
Sorry for going round the loop on this, but what was the problem with using the -o (--offline) flag?


Am I correct in thinking that if I (locally) change the pom snapshot
repository to<enabled>false</enabled>  (or whatever the setting is),
then I can (locally) disable any non-local snapshot repositories ?

Just done a search on this, and it looks like that might work, see [1]. Would be a bit fiddly for you, though, and there's a risk of accidentally committing such locally made changes.

A better option might be to redefine the repository definition in a profile, and then enable using -P flag, something like:

<profiles>
<profile>
<id>offline</id>
<repository>
<id>apache.snapshots</id>
<name>Apache Snapshot Repository</name>
<url>http://repository.apache.org/snapshots</url>
<releases>
<enabled>false</enabled>
</releases>
<snapshots>
<enabled>false</enabled>
</snapshots>
</repository>
</profile>
</profiles>

You could then use "-P offline" to enable this profile.    This should work.

Cheers
Dan

[1] https://issues.onehippo.com/browse/HREPTWO-3499


Reply via email to