Uploaded image for project: 'Maven'
  1. Maven
  2. MNG-5166

settings.xml boolean values not be honored

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Critical
    • Resolution: Incomplete
    • 3.0.3, 3.0.4
    • None
    • Settings
    • None

    Description

      $ 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 
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              jpyeron Jason Pyeron
              Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: