The following comment has been added to this issue:
Author: Shinobu Kawai
Created: Tue, 28 Sep 2004 11:40 PM
Body:
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, or system property.
I think the "else" block should be taken away from App and the
"maven.mode.online=true" be put in the DEFAULTS_PROPERTIES.
---------------------------------------------------------------------
View this comment:
http://jira.codehaus.org/browse/MAVEN-1439?page=comments#action_24724
---------------------------------------------------------------------
View the issue:
http://jira.codehaus.org/browse/MAVEN-1439
Here is an overview of the issue:
---------------------------------------------------------------------
Key: MAVEN-1439
Summary: -Dmaven.repo.online=false not equivalent to -o
Type: Bug
Status: Unassigned
Priority: Major
Original Estimate: Unknown
Time Spent: Unknown
Remaining: Unknown
Project: maven
Versions:
1.1
1.0
Assignee:
Reporter: Cameron Horn
Created: Wed, 8 Sep 2004 5:46 PM
Updated: Tue, 28 Sep 2004 11:40 PM
Environment: Solaris
Description:
Contrived builds follow:
maven -Dmaven.mode.online=false -Dmaven.repo.remote= multiproject:install-snapshot
<snip>
Attempting to download commons-logging-1.0.3.jar.
WARNING: Failed to download commons-logging-1.0.3.jar.
The build cannot continue because of the following unsatisfied dependency:
commons-logging-1.0.3.jar (try downloading from http://jakarta.apache.org/common
s/logging/)
</snip>
maven -o multiproject:install-snapshot
<snip>
The build cannot continue because of the following unsatisfied dependency:
commons-logging-1.0.3.jar (try downloading from http://jakarta.apache.org/common
s/logging/)
</snip>
Note that maven still attempts to download while maven.mode.online=false. This is
contrary to the User Guide, which specifies that they are equivalent.
---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]