> -----Original Message-----
> From: Benson Margulies [mailto:[email protected]] 
> Sent: Thursday, August 25, 2011 18:21
> To: Maven Users List
> Subject: [maven] Re: settings.xml boolean values not be honored.
> 
> On Thu, Aug 25, 2011 at 6:10 PM, Jason Pyeron 
> <[email protected]> wrote:
> > When I set the values against the default and I do not have a user 
> > settings.xml, the system creates a "default" settings. This 
> in effect 
> > takes precedence, and since it cannot be determined if the 
> value was 
> > specified or was defaulted, the "default" user settings 
> clobbers the system settings.xml values.
> 
> I'm sorry to be dense, but I can't translate this to a set of 
> shell commands. Please append a repro that a 
> bear-of-little-brain can type in.

$ svn co http://svn.apache.org/repos/asf/maven/maven-3/trunk

$ LOCAL_REPO=`mktemp -d`

$ # this should fail as the local repo is empty

$ mvn -o -Dmaven.repo.local=$LOCAL_REPO validate 

$ GLOBAL_SETTINGS=` \
   mvn -o -X -Dmaven.repo.local=$LOCAL_REPO validate |\
   sed -n 's/\[DEBUG\] Reading global settings from \(.*\)/\1/p'` &&\
  LOCAL_SETTINGS=` \
   mvn -o -X -Dmaven.repo.local=$LOCAL_REPO validate |\
   sed -n 's/\[DEBUG\] Reading user settings from \(.*\)/\1/p'` &&\
  rm -f "$LOCAL_SETTINGS"

$ $EDITOR "$GLOBAL_SETTINGS" # set offline to true

$ # this will work but should fail since the repo is empty and the settings.xml
says offline

$ rm -rf $LOCAL_REPO && mkdir -p $LOCAL_REPO && mvn
-Dmaven.repo.local=$LOCAL_REPO validate 

$ mkdir -p "`dirname "$LOCAL_SETTINGS"`" && echo cp "$GLOBAL_SETTINGS"
"$LOCAL_SETTINGS"

$ # now that the user's settings.xml is the same as the system, it should fail
again as it is offline

$ rm -rf $LOCAL_REPO && mkdir -p $LOCAL_REPO && mvn
-Dmaven.repo.local=$LOCAL_REPO validate 


> 
> >
> > This is an issue on 3.0.3 and trunk as of today.
> >
> > I have tested with the offline value of "true" it does not 
> behave as 
> > offline as with the -o option.
> >
> > If I create a settings.xml in my home directory, and then set the 
> > value it works.
> >
> > Can I get confirmation on my observations before filing a bug?
> >
> > -Jason


--
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-                                                               -
- Jason Pyeron                      PD Inc. http://www.pdinc.us -
- Principal Consultant              10 West 24th Street #100    -
- +1 (443) 269-1555 x333            Baltimore, Maryland 21218   -
-                                                               -
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
This message is copyright PD Inc, subject to license 20080407P00.

 


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to