Hi Brett,
> do you have the property specified as true somewhere else? perhaps in
> ~/build.properties?
Nowhere.
> > The "maven -o jar:jar" works, but as for the others,
> > maven -Dmaven.mode.online=false jar:jar
> > set maven.mode.online to false in a property file
> > maven just goes on and downloads the SNAPSHOT jars. Is this intended
> > behaviour, or am I missing something?
It looks like the problem is in o.a.m.cli.App#initializeRootContext():
if ( getCli().hasOption( WORK_OFFLINE ) )
{
System.setProperty( MavenConstants.ONLINE, "false" );
}
else
{
System.setProperty( MavenConstants.ONLINE, "true" );
}
The "else" sets "maven.mode.online" to true if "-o" is not set,
overriding any previously set system properties. Looking at
o.a.m.MavenUtils#createContext(), the system properties dominates any
other source. This causes online mode to be true whatever you put in
any property file.
I think the "else" block should be taken away from App and the
"maven.mode.online=true" be put in the DEFAULTS_PROPERTIES.
# Should I comment on the JIRA issue? :)
Best regards,
-- Shinobu Kawai
--
Shinobu Kawai <[EMAIL PROTECTED], [EMAIL PROTECTED]>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]