You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Herve Boutemy (JIRA)" <ji...@codehaus.org> on 2012/11/17 18:29:14 UTC

[jira] (MNG-5166) settings.xml boolean values not be honored

     [ https://jira.codehaus.org/browse/MNG-5166?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Herve Boutemy updated MNG-5166:
-------------------------------

    Description: 
{noformat}$ 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 
{noformat}

  was:
$ 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 


    
> settings.xml boolean values not be honored
> ------------------------------------------
>
>                 Key: MNG-5166
>                 URL: https://jira.codehaus.org/browse/MNG-5166
>             Project: Maven 2 & 3
>          Issue Type: Bug
>          Components: Settings
>    Affects Versions: 3.0.3, 3.0.4
>         Environment: windows xp 64 bit cygwin sun/oracle jdk 1.6 64 bit
> java version "1.6.0_26"
> Java(TM) SE Runtime Environment (build 1.6.0_26-b03)
> Java HotSpot(TM) 64-Bit Server VM (build 20.1-b02, mixed mode)
> CYGWIN_NT-5.2-WOW64 black 1.7.9(0.237/5/3) 2011-03-29 10:10 i686 Cygwin
> Microsoft Windows [Version 5.2.3790]
>            Reporter: Jason Pyeron
>            Priority: Critical
>
> {noformat}$ 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 
> {noformat}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira