maven-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jvan...@apache.org
Subject svn commit: r739771 [2/10] - in /maven/components/branches/MNG-3932: ./ apache-maven/ apache-maven/src/ apache-maven/src/.cd/ apache-maven/src/bin/ apache-maven/src/conf/ apache-maven/src/main/ apache-maven/src/main/assembly/ apache-maven/src/site/ apa...
Date Sun, 01 Feb 2009 14:59:40 GMT
Added: maven/components/branches/MNG-3932/apache-maven/src/bin/mvnDebug.bat
URL: http://svn.apache.org/viewvc/maven/components/branches/MNG-3932/apache-maven/src/bin/mvnDebug.bat?rev=739771&view=auto
==============================================================================
--- maven/components/branches/MNG-3932/apache-maven/src/bin/mvnDebug.bat (added)
+++ maven/components/branches/MNG-3932/apache-maven/src/bin/mvnDebug.bat Sun Feb  1 14:59:32 2009
@@ -0,0 +1,192 @@
+@REM ----------------------------------------------------------------------------
+@REM Licensed to the Apache Software Foundation (ASF) under one
+@REM or more contributor license agreements.  See the NOTICE file
+@REM distributed with this work for additional information
+@REM regarding copyright ownership.  The ASF licenses this file
+@REM to you under the Apache License, Version 2.0 (the
+@REM "License"); you may not use this file except in compliance
+@REM with the License.  You may obtain a copy of the License at
+@REM
+@REM    http://www.apache.org/licenses/LICENSE-2.0
+@REM
+@REM Unless required by applicable law or agreed to in writing,
+@REM software distributed under the License is distributed on an
+@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+@REM KIND, either express or implied.  See the License for the
+@REM specific language governing permissions and limitations
+@REM under the License.
+@REM ----------------------------------------------------------------------------
+
+@REM ----------------------------------------------------------------------------
+@REM Maven2 Start Up Batch script
+@REM
+@REM Required ENV vars:
+@REM JAVA_HOME - location of a JDK home dir
+@REM
+@REM Optional ENV vars
+@REM M2_HOME - location of maven2's installed home dir
+@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
+@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending
+@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
+@REM     e.g. to debug Maven itself, use
+@REM set MAVEN_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+@REM ----------------------------------------------------------------------------
+
+@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
+@echo off
+@REM enable echoing my setting MAVEN_BATCH_ECHO to 'on'
+@if "%MAVEN_BATCH_ECHO%" == "on"  echo %MAVEN_BATCH_ECHO%
+
+set MAVEN_DEBUG_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+@echo Preparing to Execute Maven in Debug Mode
+
+@REM set %HOME% to equivalent of $HOME
+if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
+
+@REM Execute a user defined script before this one
+if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
+
+set ERROR_CODE=0
+
+@REM set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" @setlocal
+if "%OS%"=="WINNT" @setlocal
+
+@REM ==== START VALIDATION ====
+if not "%JAVA_HOME%" == "" goto OkJHome
+
+echo.
+echo ERROR: JAVA_HOME not found in your environment.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation
+echo.
+goto error
+
+:OkJHome
+if exist "%JAVA_HOME%\bin\java.exe" goto chkMHome
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory.
+echo JAVA_HOME = "%JAVA_HOME%"
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation
+echo.
+goto error
+
+:chkMHome
+if not "%M2_HOME%"=="" goto valMHome
+
+if "%OS%"=="Windows_NT" SET "M2_HOME=%~dp0.."
+if "%OS%"=="WINNT" SET "M2_HOME=%~dp0.."
+if not "%M2_HOME%"=="" goto valMHome
+
+echo.
+echo ERROR: M2_HOME not found in your environment.
+echo Please set the M2_HOME variable in your environment to match the
+echo location of the Maven installation
+echo.
+goto error
+
+:valMHome
+
+:stripMHome
+if not "_%M2_HOME:~-1%"=="_\" goto checkMBat
+set "M2_HOME=%M2_HOME:~0,-1%"
+goto stripMHome
+
+:checkMBat
+if exist "%M2_HOME%\bin\mvn.bat" goto init
+
+echo.
+echo ERROR: M2_HOME is set to an invalid directory.
+echo M2_HOME = "%M2_HOME%"
+echo Please set the M2_HOME variable in your environment to match the
+echo location of the Maven installation
+echo.
+goto error
+@REM ==== END VALIDATION ====
+
+:init
+@REM Decide how to startup depending on the version of windows
+
+@REM -- Windows NT with Novell Login
+if "%OS%"=="WINNT" goto WinNTNovell
+
+@REM -- Win98ME
+if NOT "%OS%"=="Windows_NT" goto Win9xArg
+
+:WinNTNovell
+
+@REM -- 4NT shell
+if "%@eval[2+2]" == "4" goto 4NTArgs
+
+@REM -- Regular WinNT shell
+set MAVEN_CMD_LINE_ARGS=%*
+goto endInit
+
+@REM The 4NT Shell from jp software
+:4NTArgs
+set MAVEN_CMD_LINE_ARGS=%$
+goto endInit
+
+:Win9xArg
+@REM Slurp the command line arguments.  This loop allows for an unlimited number
+@REM of agruments (up to the command line limit, anyway).
+set MAVEN_CMD_LINE_ARGS=
+:Win9xApp
+if %1a==a goto endInit
+set MAVEN_CMD_LINE_ARGS=%MAVEN_CMD_LINE_ARGS% %1
+shift
+goto Win9xApp
+
+@REM Reaching here means variables are defined and arguments have been captured
+:endInit
+SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
+
+@REM -- 4NT shell
+if "%@eval[2+2]" == "4" goto 4NTCWJars
+
+@REM -- Regular WinNT shell
+for %%i in ("%M2_HOME%"\boot\plexus-classworlds-*) do set CLASSWORLDS_JAR="%%i"
+goto runm2
+
+@REM The 4NT Shell from jp software
+:4NTCWJars
+for %%i in ("%M2_HOME%\boot\plexus-classworlds-*") do set CLASSWORLDS_JAR="%%i"
+goto runm2
+
+@REM Start MAVEN2
+:runm2
+set CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
+%MAVEN_JAVA_EXE% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %CLASSWORLDS_JAR% "-Dclassworlds.conf=%M2_HOME%\bin\m2.conf" "-Dmaven.home=%M2_HOME%" %CLASSWORLDS_LAUNCHER% %MAVEN_CMD_LINE_ARGS%
+if ERRORLEVEL 1 goto error
+goto end
+
+:error
+if "%OS%"=="Windows_NT" @endlocal
+if "%OS%"=="WINNT" @endlocal
+set ERROR_CODE=1
+
+:end
+@REM set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" goto endNT
+if "%OS%"=="WINNT" goto endNT
+
+@REM For old DOS remove the set variables from ENV - we assume they were not set
+@REM before we started - at least we don't leave any baggage around
+set MAVEN_JAVA_EXE=
+set MAVEN_CMD_LINE_ARGS=
+goto postExec
+
+:endNT
+@endlocal & set ERROR_CODE=%ERROR_CODE%
+
+:postExec
+if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
+@REM pause the batch file if MAVEN_BATCH_PAUSE is set to 'on'
+if "%MAVEN_BATCH_PAUSE%" == "on" pause
+
+if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
+
+exit /B %ERROR_CODE%
+

Added: maven/components/branches/MNG-3932/apache-maven/src/bin/mvnUpdate
URL: http://svn.apache.org/viewvc/maven/components/branches/MNG-3932/apache-maven/src/bin/mvnUpdate?rev=739771&view=auto
==============================================================================
--- maven/components/branches/MNG-3932/apache-maven/src/bin/mvnUpdate (added)
+++ maven/components/branches/MNG-3932/apache-maven/src/bin/mvnUpdate Sun Feb  1 14:59:32 2009
@@ -0,0 +1,164 @@
+#!/bin/sh
+# ----------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+# ----------------------------------------------------------------------------
+
+# ----------------------------------------------------------------------------
+# Maven2 Update Up Batch script
+#
+# Required ENV vars:
+# ------------------
+#   JAVA_HOME - location of a JDK home dir
+#
+# Optional ENV vars
+# -----------------
+#   M2_HOME - location of maven2's installed home dir
+#   MAVEN_OPTS - parameters passed to the Java VM when running Maven
+#     e.g. to debug Maven Update itself, use
+#       set MAVEN_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+# ----------------------------------------------------------------------------
+
+QUOTED_ARGS=""
+while [ "$1" != "" ] ; do
+
+  QUOTED_ARGS="$QUOTED_ARGS \"$1\""
+  shift
+
+done
+
+if [ -f /etc/mavenrc ] ; then
+  . /etc/mavenrc
+fi
+
+if [ -f "$HOME/.mavenrc" ] ; then
+  . "$HOME/.mavenrc"
+fi
+
+# OS specific support.  $var _must_ be set to either true or false.
+cygwin=false;
+darwin=false;
+mingw=false
+case "`uname`" in
+  CYGWIN*) cygwin=true ;;
+  MINGW*) mingw=true;;
+  Darwin*) darwin=true 
+           if [ -z "$JAVA_VERSION" ] ; then
+             JAVA_VERSION="CurrentJDK"
+           else
+             echo "Using Java version: $JAVA_VERSION"
+           fi
+           if [ -z "$JAVA_HOME" ] ; then
+             JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/${JAVA_VERSION}/Home
+           fi
+           ;;
+esac
+
+if [ -z "$JAVA_HOME" ] ; then
+  if [ -r /etc/gentoo-release ] ; then
+    JAVA_HOME=`java-config --jre-home`
+  fi
+fi
+
+if [ -z "$M2_HOME" ] ; then
+  ## resolve links - $0 may be a link to maven's home
+  PRG="$0"
+
+  # need this for relative symlinks
+  while [ -h "$PRG" ] ; do
+    ls=`ls -ld "$PRG"`
+    link=`expr "$ls" : '.*-> \(.*\)$'`
+    if expr "$link" : '/.*' > /dev/null; then
+      PRG="$link"
+    else
+      PRG="`dirname "$PRG"`/$link"
+    fi
+  done
+
+  saveddir=`pwd`
+
+  M2_HOME=`dirname "$PRG"`/..
+
+  # make it fully qualified
+  M2_HOME=`cd "$M2_HOME" && pwd`
+
+  cd "$saveddir"
+  # echo Using m2 at $M2_HOME
+fi
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched
+if $cygwin ; then
+  [ -n "$M2_HOME" ] &&
+    M2_HOME=`cygpath --unix "$M2_HOME"`
+  [ -n "$JAVA_HOME" ] &&
+    JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+  [ -n "$CLASSPATH" ] &&
+    CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
+fi
+
+# For Migwn, ensure paths are in UNIX format before anything is touched
+if $mingw ; then
+  [ -n "$M2_HOME" ] &&
+    M2_HOME="`(cd "$M2_HOME"; pwd)`"
+  [ -n "$JAVA_HOME" ] &&
+    JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
+  # TODO classpath?
+fi
+
+if [ -z "$JAVACMD" ] ; then
+  if [ -n "$JAVA_HOME"  ] ; then
+    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+      # IBM's JDK on AIX uses strange locations for the executables
+      JAVACMD="$JAVA_HOME/jre/sh/java"
+    else
+      JAVACMD="$JAVA_HOME/bin/java"
+    fi
+  else
+    JAVACMD="`which java`"
+  fi
+fi
+
+if [ ! -x "$JAVACMD" ] ; then
+  echo "Error: JAVA_HOME is not defined correctly."
+  echo "  We cannot execute $JAVACMD"
+  exit 1
+fi
+
+if [ -z "$JAVA_HOME" ] ; then
+  echo "Warning: JAVA_HOME environment variable is not set."
+fi
+
+CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin; then
+  [ -n "$M2_HOME" ] &&
+    M2_HOME=`cygpath --path --windows "$M2_HOME"`
+  [ -n "$JAVA_HOME" ] &&
+    JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
+  [ -n "$HOME" ] &&
+    HOME=`cygpath --path --windows "$HOME"`
+fi
+
+exec "$JAVACMD" \
+  $MAVEN_OPTS \
+  -jar "${M2_HOME}"/bin/.cd/bin/*.jar \
+  -m "${M2_HOME}"  \
+  -r http://people.apache.org/~ogusakov/repos/versions \
+  $QUOTED_ARGS
+
+

Added: maven/components/branches/MNG-3932/apache-maven/src/bin/mvnUpdate.bat
URL: http://svn.apache.org/viewvc/maven/components/branches/MNG-3932/apache-maven/src/bin/mvnUpdate.bat?rev=739771&view=auto
==============================================================================
--- maven/components/branches/MNG-3932/apache-maven/src/bin/mvnUpdate.bat (added)
+++ maven/components/branches/MNG-3932/apache-maven/src/bin/mvnUpdate.bat Sun Feb  1 14:59:32 2009
@@ -0,0 +1,189 @@
+@REM ----------------------------------------------------------------------------
+@REM Licensed to the Apache Software Foundation (ASF) under one
+@REM or more contributor license agreements.  See the NOTICE file
+@REM distributed with this work for additional information
+@REM regarding copyright ownership.  The ASF licenses this file
+@REM to you under the Apache License, Version 2.0 (the
+@REM "License"); you may not use this file except in compliance
+@REM with the License.  You may obtain a copy of the License at
+@REM
+@REM    http://www.apache.org/licenses/LICENSE-2.0
+@REM
+@REM Unless required by applicable law or agreed to in writing,
+@REM software distributed under the License is distributed on an
+@REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+@REM KIND, either express or implied.  See the License for the
+@REM specific language governing permissions and limitations
+@REM under the License.
+@REM ----------------------------------------------------------------------------
+
+@REM ----------------------------------------------------------------------------
+@REM Maven2 Update Batch script
+@REM
+@REM Required ENV vars:
+@REM JAVA_HOME - location of a JDK home dir
+@REM
+@REM Optional ENV vars
+@REM M2_HOME - location of maven2's installed home dir
+@REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
+@REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending
+@REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
+@REM     e.g. to debug Maven Update itself, use
+@REM set MAVEN_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+@REM ----------------------------------------------------------------------------
+
+@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
+@echo off
+@REM enable echoing my setting MAVEN_BATCH_ECHO to 'on'
+@if "%MAVEN_BATCH_ECHO%" == "on"  echo %MAVEN_BATCH_ECHO%
+
+@REM set %HOME% to equivalent of $HOME
+if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
+
+@REM Execute a user defined script before this one
+if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
+
+set ERROR_CODE=0
+
+@REM set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" @setlocal
+if "%OS%"=="WINNT" @setlocal
+
+@REM ==== START VALIDATION ====
+if not "%JAVA_HOME%" == "" goto OkJHome
+
+echo.
+echo ERROR: JAVA_HOME not found in your environment.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation
+echo.
+goto error
+
+:OkJHome
+if exist "%JAVA_HOME%\bin\java.exe" goto chkMHome
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory.
+echo JAVA_HOME = "%JAVA_HOME%"
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation
+echo.
+goto error
+
+:chkMHome
+if not "%M2_HOME%"=="" goto valMHome
+
+if "%OS%"=="Windows_NT" SET "M2_HOME=%~dp0.."
+if "%OS%"=="WINNT" SET "M2_HOME=%~dp0.."
+if not "%M2_HOME%"=="" goto valMHome
+
+echo.
+echo ERROR: M2_HOME not found in your environment.
+echo Please set the M2_HOME variable in your environment to match the
+echo location of the Maven installation
+echo.
+goto error
+
+:valMHome
+
+:stripMHome
+if not "_%M2_HOME:~-1%"=="_\" goto checkMBat
+set "M2_HOME=%M2_HOME:~0,-1%"
+goto stripMHome
+
+:checkMBat
+if exist "%M2_HOME%\bin\mvn.bat" goto init
+
+echo.
+echo ERROR: M2_HOME is set to an invalid directory.
+echo M2_HOME = "%M2_HOME%"
+echo Please set the M2_HOME variable in your environment to match the
+echo location of the Maven installation
+echo.
+goto error
+@REM ==== END VALIDATION ====
+
+:init
+@REM Decide how to startup depending on the version of windows
+
+@REM -- Windows NT with Novell Login
+if "%OS%"=="WINNT" goto WinNTNovell
+
+@REM -- Win98ME
+if NOT "%OS%"=="Windows_NT" goto Win9xArg
+
+:WinNTNovell
+
+@REM -- 4NT shell
+if "%@eval[2+2]" == "4" goto 4NTArgs
+
+@REM -- Regular WinNT shell
+set MAVEN_CMD_LINE_ARGS=%*
+goto endInit
+
+@REM The 4NT Shell from jp software
+:4NTArgs
+set MAVEN_CMD_LINE_ARGS=%$
+goto endInit
+
+:Win9xArg
+@REM Slurp the command line arguments.  This loop allows for an unlimited number
+@REM of agruments (up to the command line limit, anyway).
+set MAVEN_CMD_LINE_ARGS=
+:Win9xApp
+if %1a==a goto endInit
+set MAVEN_CMD_LINE_ARGS=%MAVEN_CMD_LINE_ARGS% %1
+shift
+goto Win9xApp
+
+@REM Reaching here means variables are defined and arguments have been captured
+:endInit
+SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
+
+@REM -- 4NT shell
+if "%@eval[2+2]" == "4" goto 4NTCWJars
+
+@REM -- Regular WinNT shell
+for %%i in ("%M2_HOME%"\bin\.cd\bin\*.jar) do set UPDATE_JAR="%%i"
+goto runm2
+
+@REM The 4NT Shell from jp software
+:4NTCWJars
+for %%i in ("%M2_HOME%\.cd\bin\*.jar") do set UPDATE_JAR="%%i"
+goto runm2
+
+@REM Start MAVEN2
+:runm2
+%MAVEN_JAVA_EXE% %MAVEN_OPTS% -jar %UPDATE_JAR% -m "%M2_HOME%" -r http://people.apache.org/~ogusakov/repos/versions %MAVEN_CMD_LINE_ARGS%
+if ERRORLEVEL 1 goto error
+goto end
+
+:error
+if "%OS%"=="Windows_NT" @endlocal
+if "%OS%"=="WINNT" @endlocal
+set ERROR_CODE=1
+
+:end
+@REM set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" goto endNT
+if "%OS%"=="WINNT" goto endNT
+
+@REM For old DOS remove the set variables from ENV - we assume they were not set
+@REM before we started - at least we don't leave any baggage around
+set MAVEN_JAVA_EXE=
+set MAVEN_CMD_LINE_ARGS=
+goto postExec
+
+:endNT
+@endlocal & set ERROR_CODE=%ERROR_CODE%
+
+:postExec
+if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
+@REM pause the batch file if MAVEN_BATCH_PAUSE is set to 'on'
+if "%MAVEN_BATCH_PAUSE%" == "on" pause
+
+if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
+
+cmd /C exit /B %ERROR_CODE%
+
+

Added: maven/components/branches/MNG-3932/apache-maven/src/bin/mvnr
URL: http://svn.apache.org/viewvc/maven/components/branches/MNG-3932/apache-maven/src/bin/mvnr?rev=739771&view=auto
==============================================================================
--- maven/components/branches/MNG-3932/apache-maven/src/bin/mvnr (added)
+++ maven/components/branches/MNG-3932/apache-maven/src/bin/mvnr Sun Feb  1 14:59:32 2009
@@ -0,0 +1,24 @@
+#!/bin/sh
+# ----------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+# ----------------------------------------------------------------------------
+
+export M2_HOME=$HOME/m2
+export JRUBY_HOME=$HOME/jruby
+export CLASSPATH=$M2_HOME/lib/maven-embedder-2.1-SNAPSHOT-uber.jar
+$JRUBY_HOME/bin/jruby $M2_HOME/bin/mvnr.rb

Added: maven/components/branches/MNG-3932/apache-maven/src/bin/mvnr.rb
URL: http://svn.apache.org/viewvc/maven/components/branches/MNG-3932/apache-maven/src/bin/mvnr.rb?rev=739771&view=auto
==============================================================================
--- maven/components/branches/MNG-3932/apache-maven/src/bin/mvnr.rb (added)
+++ maven/components/branches/MNG-3932/apache-maven/src/bin/mvnr.rb Sun Feb  1 14:59:32 2009
@@ -0,0 +1,40 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#   http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+require 'java'
+
+class Maven
+  def initialize goals
+    @goals = goals
+  end
+
+  include_class 'java.io.File'
+  include_class 'org.apache.maven.embedder.MavenEmbedder'
+  include_class 'org.apache.maven.embedder.DefaultConfiguration'
+  include_class 'org.apache.maven.execution.DefaultMavenExecutionRequest'
+
+  def run        
+    configuration = DefaultConfiguration.new    
+    maven = MavenEmbedder.new(configuration)    
+    r = DefaultMavenExecutionRequest.new
+    r.setBaseDirectory( File.new( "." ) ) 
+    r.setGoals( @goals )                                                                                                                          
+    result = maven.execute( r );   
+  end
+end
+
+m = Maven.new( ["clean"] ).run

Added: maven/components/branches/MNG-3932/apache-maven/src/bin/mvnyjp
URL: http://svn.apache.org/viewvc/maven/components/branches/MNG-3932/apache-maven/src/bin/mvnyjp?rev=739771&view=auto
==============================================================================
--- maven/components/branches/MNG-3932/apache-maven/src/bin/mvnyjp (added)
+++ maven/components/branches/MNG-3932/apache-maven/src/bin/mvnyjp Sun Feb  1 14:59:32 2009
@@ -0,0 +1,168 @@
+#!/bin/sh
+# ----------------------------------------------------------------------------
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+# ----------------------------------------------------------------------------
+
+# ----------------------------------------------------------------------------
+# Maven2 Start Up Batch script
+#
+# Required ENV vars:
+# ------------------
+#   JAVA_HOME - location of a JDK home dir
+#
+# Optional ENV vars
+# -----------------
+#   M2_HOME - location of maven2's installed home dir
+#   MAVEN_OPTS - parameters passed to the Java VM when running Maven
+#     e.g. to debug Maven itself, use
+#       set MAVEN_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
+# ----------------------------------------------------------------------------
+
+YJPLIB=/applications/YourKit.app/bin/mac/libyjpagent.jnilib
+
+MAVEN_OPTS=-agentpath:$YJPLIB=onexit=snapshot,onexit=memory,tracing,onlylocal
+
+QUOTED_ARGS=""
+while [ "$1" != "" ] ; do
+
+  QUOTED_ARGS="$QUOTED_ARGS \"$1\""
+  shift
+
+done
+
+if [ -f /etc/mavenrc ] ; then
+  . /etc/mavenrc
+fi
+
+if [ -f "$HOME/.mavenrc" ] ; then
+  . "$HOME/.mavenrc"
+fi
+
+# OS specific support.  $var _must_ be set to either true or false.
+cygwin=false;
+darwin=false;
+mingw=false
+case "`uname`" in
+  CYGWIN*) cygwin=true ;;
+  MINGW*) mingw=true;;
+  Darwin*) darwin=true 
+           if [ -z "$JAVA_VERSION" ] ; then
+             JAVA_VERSION="CurrentJDK"
+           else
+             echo "Using Java version: $JAVA_VERSION"
+           fi
+           if [ -z "$JAVA_HOME" ] ; then
+             JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/${JAVA_VERSION}/Home
+           fi
+           ;;
+esac
+
+if [ -z "$JAVA_HOME" ] ; then
+  if [ -r /etc/gentoo-release ] ; then
+    JAVA_HOME=`java-config --jre-home`
+  fi
+fi
+
+if [ -z "$M2_HOME" ] ; then
+  ## resolve links - $0 may be a link to maven's home
+  PRG="$0"
+
+  # need this for relative symlinks
+  while [ -h "$PRG" ] ; do
+    ls=`ls -ld "$PRG"`
+    link=`expr "$ls" : '.*-> \(.*\)$'`
+    if expr "$link" : '/.*' > /dev/null; then
+      PRG="$link"
+    else
+      PRG="`dirname "$PRG"`/$link"
+    fi
+  done
+
+  saveddir=`pwd`
+
+  M2_HOME=`dirname "$PRG"`/..
+
+  # make it fully qualified
+  M2_HOME=`cd "$M2_HOME" && pwd`
+
+  cd "$saveddir"
+  # echo Using m2 at $M2_HOME
+fi
+
+# For Cygwin, ensure paths are in UNIX format before anything is touched
+if $cygwin ; then
+  [ -n "$M2_HOME" ] &&
+    M2_HOME=`cygpath --unix "$M2_HOME"`
+  [ -n "$JAVA_HOME" ] &&
+    JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
+  [ -n "$CLASSPATH" ] &&
+    CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
+fi
+
+# For Migwn, ensure paths are in UNIX format before anything is touched
+if $mingw ; then
+  [ -n "$M2_HOME" ] &&
+    M2_HOME="`(cd "$M2_HOME"; pwd)`"
+  [ -n "$JAVA_HOME" ] &&
+    JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
+  # TODO classpath?
+fi
+
+if [ -z "$JAVACMD" ] ; then
+  if [ -n "$JAVA_HOME"  ] ; then
+    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+      # IBM's JDK on AIX uses strange locations for the executables
+      JAVACMD="$JAVA_HOME/jre/sh/java"
+    else
+      JAVACMD="$JAVA_HOME/bin/java"
+    fi
+  else
+    JAVACMD="`which java`"
+  fi
+fi
+
+if [ ! -x "$JAVACMD" ] ; then
+  echo "Error: JAVA_HOME is not defined correctly."
+  echo "  We cannot execute $JAVACMD"
+  exit 1
+fi
+
+if [ -z "$JAVA_HOME" ] ; then
+  echo "Warning: JAVA_HOME environment variable is not set."
+fi
+
+CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin; then
+  [ -n "$M2_HOME" ] &&
+    M2_HOME=`cygpath --path --windows "$M2_HOME"`
+  [ -n "$JAVA_HOME" ] &&
+    JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
+  [ -n "$HOME" ] &&
+    HOME=`cygpath --path --windows "$HOME"`
+fi
+
+exec "$JAVACMD" \
+  $MAVEN_OPTS \
+  -classpath "${M2_HOME}"/boot/plexus-classworlds-*.jar \
+  "-Dclassworlds.conf=${M2_HOME}/bin/m2.conf" \
+  "-Dmaven.home=${M2_HOME}"  \
+  ${CLASSWORLDS_LAUNCHER} $QUOTED_ARGS
+
+

Added: maven/components/branches/MNG-3932/apache-maven/src/conf/settings.xml
URL: http://svn.apache.org/viewvc/maven/components/branches/MNG-3932/apache-maven/src/conf/settings.xml?rev=739771&view=auto
==============================================================================
--- maven/components/branches/MNG-3932/apache-maven/src/conf/settings.xml (added)
+++ maven/components/branches/MNG-3932/apache-maven/src/conf/settings.xml Sun Feb  1 14:59:32 2009
@@ -0,0 +1,257 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<!--
+ | This is the configuration file for Maven. It can be specified at two levels:
+ |
+ |  1. User Level. This settings.xml file provides configuration for a single user, 
+ |                 and is normally provided in ${user.home}/.m2/settings.xml.
+ |
+ |                 NOTE: This location can be overridden with the CLI option:
+ |
+ |                 -s /path/to/user/settings.xml
+ |
+ |  2. Global Level. This settings.xml file provides configuration for all Maven
+ |                 users on a machine (assuming they're all using the same Maven
+ |                 installation). It's normally provided in 
+ |                 ${maven.home}/conf/settings.xml.
+ |
+ |                 NOTE: This location can be overridden with the CLI option:
+ |
+ |                 -gs /path/to/global/settings.xml
+ |
+ | The sections in this sample file are intended to give you a running start at
+ | getting the most out of your Maven installation. Where appropriate, the default
+ | values (values used when the setting is not specified) are provided.
+ |
+ |-->
+<settings xmlns="http://maven.apache.org/settings/1.0.0" 
+          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
+          xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
+  <!-- localRepository
+   | The path to the local repository maven will use to store artifacts.
+   |
+   | Default: ~/.m2/repository
+  <localRepository>/path/to/local/repo</localRepository>
+  -->
+
+  <!-- interactiveMode
+   | This will determine whether maven prompts you when it needs input. If set to false,
+   | maven will use a sensible default value, perhaps based on some other setting, for
+   | the parameter in question.
+   |
+   | Default: true
+  <interactiveMode>true</interactiveMode>
+  -->
+
+  <!-- offline
+   | Determines whether maven should attempt to connect to the network when executing a build.
+   | This will have an effect on artifact downloads, artifact deployment, and others.
+   |
+   | Default: false
+  <offline>false</offline>
+  -->
+
+  <!-- pluginGroups
+   | This is a list of additional group identifiers that will be searched when resolving plugins by their prefix, i.e.
+   | when invoking a command line like "mvn prefix:goal". Maven will automatically add the group identifiers
+   | "org.apache.maven.plugins" and "org.codehaus.mojo" if these are not already contained in the list.
+   |-->
+  <pluginGroups>
+    <!-- pluginGroup
+     | Specifies a further group identifier to use for plugin lookup.
+    <pluginGroup>com.your.plugins</pluginGroup>
+    -->
+  </pluginGroups>
+
+  <!-- proxies
+   | This is a list of proxies which can be used on this machine to connect to the network.
+   | Unless otherwise specified (by system property or command-line switch), the first proxy
+   | specification in this list marked as active will be used.
+   |-->
+  <proxies>
+    <!-- proxy
+     | Specification for one proxy, to be used in connecting to the network.
+     |
+    <proxy>
+      <id>optional</id>
+      <active>true</active>
+      <protocol>http</protocol>
+      <username>proxyuser</username>
+      <password>proxypass</password>
+      <host>proxy.host.net</host>
+      <port>80</port>
+      <nonProxyHosts>local.net|some.host.com</nonProxyHosts>
+    </proxy>
+    -->
+  </proxies>
+
+  <!-- servers
+   | This is a list of authentication profiles, keyed by the server-id used within the system.
+   | Authentication profiles can be used whenever maven must make a connection to a remote server.
+   |-->
+  <servers>
+    <!-- server
+     | Specifies the authentication information to use when connecting to a particular server, identified by
+     | a unique name within the system (referred to by the 'id' attribute below).
+     | 
+     | NOTE: You should either specify username/password OR privateKey/passphrase, since these pairings are 
+     |       used together.
+     |
+    <server>
+      <id>deploymentRepo</id>
+      <username>repouser</username>
+      <password>repopwd</password>
+    </server>
+    -->
+    
+    <!-- Another sample, using keys to authenticate.
+    <server>
+      <id>siteServer</id>
+      <privateKey>/path/to/private/key</privateKey>
+      <passphrase>optional; leave empty if not used.</passphrase>
+    </server>
+    -->
+  </servers>
+
+  <!-- mirrors
+   | This is a list of mirrors to be used in downloading artifacts from remote repositories.
+   | 
+   | It works like this: a POM may declare a repository to use in resolving certain artifacts.
+   | However, this repository may have problems with heavy traffic at times, so people have mirrored
+   | it to several places.
+   |
+   | That repository definition will have a unique id, so we can create a mirror reference for that
+   | repository, to be used as an alternate download site. The mirror site will be the preferred 
+   | server for that repository.
+   |-->
+  <mirrors>
+    <!-- mirror
+     | Specifies a repository mirror site to use instead of a given repository. The repository that
+     | this mirror serves has an ID that matches the mirrorOf element of this mirror. IDs are used
+     | for inheritance and direct lookup purposes, and must be unique across the set of mirrors.
+     |
+    <mirror>
+      <id>mirrorId</id>
+      <mirrorOf>repositoryId</mirrorOf>
+      <name>Human Readable Name for this Mirror.</name>
+      <url>http://my.repository.com/repo/path</url>
+    </mirror>
+     -->
+  </mirrors>
+  
+  <!-- profiles
+   | This is a list of profiles which can be activated in a variety of ways, and which can modify
+   | the build process. Profiles provided in the settings.xml are intended to provide local machine-
+   | specific paths and repository locations which allow the build to work in the local environment.
+   |
+   | For example, if you have an integration testing plugin - like cactus - that needs to know where
+   | your Tomcat instance is installed, you can provide a variable here such that the variable is 
+   | dereferenced during the build process to configure the cactus plugin.
+   |
+   | As noted above, profiles can be activated in a variety of ways. One way - the activeProfiles
+   | section of this document (settings.xml) - will be discussed later. Another way essentially
+   | relies on the detection of a system property, either matching a particular value for the property,
+   | or merely testing its existence. Profiles can also be activated by JDK version prefix, where a 
+   | value of '1.4' might activate a profile when the build is executed on a JDK version of '1.4.2_07'.
+   | Finally, the list of active profiles can be specified directly from the command line.
+   |
+   | NOTE: For profiles defined in the settings.xml, you are restricted to specifying only artifact
+   |       repositories, plugin repositories, and free-form properties to be used as configuration
+   |       variables for plugins in the POM.
+   |
+   |-->
+  <profiles>
+    <!-- profile
+     | Specifies a set of introductions to the build process, to be activated using one or more of the
+     | mechanisms described above. For inheritance purposes, and to activate profiles via <activatedProfiles/>
+     | or the command line, profiles have to have an ID that is unique.
+     |
+     | An encouraged best practice for profile identification is to use a consistent naming convention
+     | for profiles, such as 'env-dev', 'env-test', 'env-production', 'user-jdcasey', 'user-brett', etc.
+     | This will make it more intuitive to understand what the set of introduced profiles is attempting
+     | to accomplish, particularly when you only have a list of profile id's for debug.
+     |
+     | This profile example uses the JDK version to trigger activation, and provides a JDK-specific repo.
+    <profile>
+      <id>jdk-1.4</id>
+
+      <activation>
+        <jdk>1.4</jdk>
+      </activation>
+
+      <repositories>
+        <repository>
+          <id>jdk14</id>
+          <name>Repository for JDK 1.4 builds</name>
+          <url>http://www.myhost.com/maven/jdk14</url>
+          <layout>default</layout>
+          <snapshotPolicy>always</snapshotPolicy>
+        </repository>
+      </repositories>
+    </profile>
+    -->
+
+    <!--
+     | Here is another profile, activated by the system property 'target-env' with a value of 'dev',
+     | which provides a specific path to the Tomcat instance. To use this, your plugin configuration
+     | might hypothetically look like:
+     |
+     | ...
+     | <plugin>
+     |   <groupId>org.myco.myplugins</groupId>
+     |   <artifactId>myplugin</artifactId>
+     |   
+     |   <configuration>
+     |     <tomcatLocation>${tomcatPath}</tomcatLocation>
+     |   </configuration>
+     | </plugin>
+     | ...
+     |
+     | NOTE: If you just wanted to inject this configuration whenever someone set 'target-env' to
+     |       anything, you could just leave off the <value/> inside the activation-property.
+     |
+    <profile>
+      <id>env-dev</id>
+
+      <activation>
+        <property>
+          <name>target-env</name>
+          <value>dev</value>
+        </property>
+      </activation>
+
+      <properties>
+        <tomcatPath>/path/to/tomcat/instance</tomcatPath>
+      </properties>
+    </profile>
+    -->
+  </profiles>
+
+  <!-- activeProfiles
+   | List of profiles that are active for all builds.
+   |
+  <activeProfiles>
+    <activeProfile>alwaysActiveProfile</activeProfile>
+    <activeProfile>anotherAlwaysActiveProfile</activeProfile>
+  </activeProfiles>
+  -->
+</settings>

Added: maven/components/branches/MNG-3932/apache-maven/src/main/assembly/bin.xml
URL: http://svn.apache.org/viewvc/maven/components/branches/MNG-3932/apache-maven/src/main/assembly/bin.xml?rev=739771&view=auto
==============================================================================
--- maven/components/branches/MNG-3932/apache-maven/src/main/assembly/bin.xml (added)
+++ maven/components/branches/MNG-3932/apache-maven/src/main/assembly/bin.xml Sun Feb  1 14:59:32 2009
@@ -0,0 +1,111 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<assembly>
+  <id>bin</id>
+  <formats>
+    <format>tar.gz</format>
+    <format>tar.bz2</format>
+    <format>zip</format>
+  </formats>
+  <dependencySets>
+    <dependencySet>
+      <outputDirectory>boot</outputDirectory>
+      <includes>
+        <include>org.codehaus.plexus:plexus-classworlds</include>
+      </includes>
+    </dependencySet>
+    <dependencySet>
+      <outputDirectory>lib</outputDirectory>
+      <excludes>
+        <exclude>org.codehaus.plexus:plexus-classworlds</exclude>
+        <exclude>org.codehaus.plexus:plexus-component-api</exclude>
+        <exclude>classworlds:classworlds</exclude>
+        <exclude>junit:junit</exclude>
+        <exclude>jmock:jmock</exclude>
+        <exclude>xml-apis:xml-apis</exclude>
+        <exclude>org.apache.maven:maven-artifact</exclude>
+        <exclude>org.apache.maven:maven-monitor</exclude>
+        <exclude>org.apache.maven:maven-plugin-descriptor</exclude>
+        <!-- NOTE: Excluding to avoid maven-model and maven-profile inclusions,
+             since we're not using the jdom modello stuff here.
+        -->
+        <exclude>jdom:jdom</exclude>
+        <!-- Stuff which will be culled or optional as we move toward 3.0 -->
+        <exclude>org.apache.maven:apache-maven</exclude>
+        <exclude>bouncycastle:bcprov-jdk15</exclude>
+        <exclude>bouncycastle:bcpg-jdk15</exclude>
+        <exclude>log4j:log4j</exclude>
+        <exclude>org.sonatype.mercury:mercury-mp3-cli</exclude>
+        <exclude>commons-logging:commons-logging-api</exclude>
+        <exclude>org.slf4j:slf4j-api</exclude>
+        <exclude>org.slf4j:slf4j-jdk14</exclude>
+        <exclude>org.apache.maven.mercury:mercury-crypto-api</exclude>
+        <exclude>org.apache.maven.mercury:mercury-crypto-basic</exclude>        
+      </excludes>
+    </dependencySet>
+    <dependencySet>
+      <outputDirectory>bin/.cd/bin</outputDirectory>
+      <includes>
+        <include>org.sonatype.mercury:mercury-mp3-cli</include>
+      </includes>
+    </dependencySet>
+  </dependencySets>
+  <fileSets>
+    <fileSet>
+      <includes>
+        <include>README*</include>
+        <include>LICENSE*</include>
+        <include>NOTICE*</include>
+      </includes>
+    </fileSet>
+    <fileSet>
+      <directory>src/bin</directory>
+      <outputDirectory>bin</outputDirectory>
+      <includes>
+        <include>*.bat</include>
+        <include>*.conf</include>
+      </includes>
+      <lineEnding>dos</lineEnding>
+    </fileSet>
+    <fileSet>
+      <directory>src/bin</directory>
+      <outputDirectory>bin</outputDirectory>
+      <includes>
+        <include>m2</include>
+        <include>mvn</include>
+        <include>mvnDebug</include>
+        <!-- This is so that CI systems can periodically run the profiler -->
+        <include>mvnyjp</include>
+        <!-- This is self-update CLI -->
+        <include>mvnUpdate</include>
+      </includes>
+      <lineEnding>unix</lineEnding>
+      <fileMode>0755</fileMode>
+    </fileSet>
+    <fileSet>
+      <directory>src/conf</directory>
+      <outputDirectory>conf</outputDirectory>
+    </fileSet>
+    <fileSet>
+      <directory>src/.cd</directory>
+      <outputDirectory>bin/.cd</outputDirectory>
+    </fileSet>
+  </fileSets>
+</assembly>

Added: maven/components/branches/MNG-3932/apache-maven/src/site/site.xml
URL: http://svn.apache.org/viewvc/maven/components/branches/MNG-3932/apache-maven/src/site/site.xml?rev=739771&view=auto
==============================================================================
--- maven/components/branches/MNG-3932/apache-maven/src/site/site.xml (added)
+++ maven/components/branches/MNG-3932/apache-maven/src/site/site.xml Sun Feb  1 14:59:32 2009
@@ -0,0 +1,6 @@
+<project>
+  <body>
+    <menu ref="parent"/>
+    <menu ref="reports"/>
+  </body>
+</project>
\ No newline at end of file

Propchange: maven/components/branches/MNG-3932/apache-maven/src/test/
------------------------------------------------------------------------------
    bugtraq:label = Enter issue ID:

Propchange: maven/components/branches/MNG-3932/apache-maven/src/test/
------------------------------------------------------------------------------
    bugtraq:message = Issue id: %BUGID%

Propchange: maven/components/branches/MNG-3932/apache-maven/src/test/
------------------------------------------------------------------------------
    bugtraq:number = false

Propchange: maven/components/branches/MNG-3932/apache-maven/src/test/
------------------------------------------------------------------------------
    bugtraq:url = http://jira.codehaus.org/browse/%BUGID%

Propchange: maven/components/branches/MNG-3932/apache-maven/src/test/java/
------------------------------------------------------------------------------
    bugtraq:label = Enter issue ID:

Propchange: maven/components/branches/MNG-3932/apache-maven/src/test/java/
------------------------------------------------------------------------------
    bugtraq:message = Issue id: %BUGID%

Propchange: maven/components/branches/MNG-3932/apache-maven/src/test/java/
------------------------------------------------------------------------------
    bugtraq:number = false

Propchange: maven/components/branches/MNG-3932/apache-maven/src/test/java/
------------------------------------------------------------------------------
    bugtraq:url = http://jira.codehaus.org/browse/%BUGID%

Propchange: maven/components/branches/MNG-3932/apache-maven/src/test/java/org/
------------------------------------------------------------------------------
    bugtraq:label = Enter issue ID:

Propchange: maven/components/branches/MNG-3932/apache-maven/src/test/java/org/
------------------------------------------------------------------------------
    bugtraq:message = Issue id: %BUGID%

Propchange: maven/components/branches/MNG-3932/apache-maven/src/test/java/org/
------------------------------------------------------------------------------
    bugtraq:number = false

Propchange: maven/components/branches/MNG-3932/apache-maven/src/test/java/org/
------------------------------------------------------------------------------
    bugtraq:url = http://jira.codehaus.org/browse/%BUGID%

Propchange: maven/components/branches/MNG-3932/apache-maven/src/test/java/org/apache/
------------------------------------------------------------------------------
    bugtraq:label = Enter issue ID:

Propchange: maven/components/branches/MNG-3932/apache-maven/src/test/java/org/apache/
------------------------------------------------------------------------------
    bugtraq:message = Issue id: %BUGID%

Propchange: maven/components/branches/MNG-3932/apache-maven/src/test/java/org/apache/
------------------------------------------------------------------------------
    bugtraq:number = false

Propchange: maven/components/branches/MNG-3932/apache-maven/src/test/java/org/apache/
------------------------------------------------------------------------------
    bugtraq:url = http://jira.codehaus.org/browse/%BUGID%

Propchange: maven/components/branches/MNG-3932/apache-maven/src/test/java/org/apache/maven/
------------------------------------------------------------------------------
    bugtraq:label = Enter issue ID:

Propchange: maven/components/branches/MNG-3932/apache-maven/src/test/java/org/apache/maven/
------------------------------------------------------------------------------
    bugtraq:message = Issue id: %BUGID%

Propchange: maven/components/branches/MNG-3932/apache-maven/src/test/java/org/apache/maven/
------------------------------------------------------------------------------
    bugtraq:number = false

Propchange: maven/components/branches/MNG-3932/apache-maven/src/test/java/org/apache/maven/
------------------------------------------------------------------------------
    bugtraq:url = http://jira.codehaus.org/browse/%BUGID%

Propchange: maven/components/branches/MNG-3932/apache-maven/src/test/java/org/apache/maven/settings/
------------------------------------------------------------------------------
    bugtraq:label = Enter issue ID:

Propchange: maven/components/branches/MNG-3932/apache-maven/src/test/java/org/apache/maven/settings/
------------------------------------------------------------------------------
    bugtraq:message = Issue id: %BUGID%

Propchange: maven/components/branches/MNG-3932/apache-maven/src/test/java/org/apache/maven/settings/
------------------------------------------------------------------------------
    bugtraq:number = false

Propchange: maven/components/branches/MNG-3932/apache-maven/src/test/java/org/apache/maven/settings/
------------------------------------------------------------------------------
    bugtraq:url = http://jira.codehaus.org/browse/%BUGID%

Added: maven/components/branches/MNG-3932/apache-maven/src/test/java/org/apache/maven/settings/GlobalSettingsTest.java
URL: http://svn.apache.org/viewvc/maven/components/branches/MNG-3932/apache-maven/src/test/java/org/apache/maven/settings/GlobalSettingsTest.java?rev=739771&view=auto
==============================================================================
--- maven/components/branches/MNG-3932/apache-maven/src/test/java/org/apache/maven/settings/GlobalSettingsTest.java (added)
+++ maven/components/branches/MNG-3932/apache-maven/src/test/java/org/apache/maven/settings/GlobalSettingsTest.java Sun Feb  1 14:59:32 2009
@@ -0,0 +1,60 @@
+package org.apache.maven.settings;
+
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.InputStreamReader;
+import java.io.Reader;
+
+import org.apache.maven.settings.io.xpp3.SettingsXpp3Reader;
+
+import junit.framework.TestCase;
+
+/**
+ * Tests that the global settings.xml shipped with the distribution is in good state.
+ * 
+ * @author Benjamin Bentmann
+ * @version $Id$
+ */
+public class GlobalSettingsTest
+    extends TestCase
+{
+
+    public void testValidGlobalSettings()
+        throws Exception
+    {
+        String basedir = System.getProperty( "basedir", System.getProperty( "user.dir" ) );
+
+        File globalSettingsFile = new File( basedir, "src/conf/settings.xml" );
+        assertTrue( globalSettingsFile.getAbsolutePath(), globalSettingsFile.isFile() );
+
+        Reader reader = new InputStreamReader( new FileInputStream( globalSettingsFile ), "UTF-8" );
+        try
+        {
+            new SettingsXpp3Reader().read( reader );
+        }
+        finally
+        {
+            reader.close();
+        }
+    }
+
+}

Added: maven/components/branches/MNG-3932/build-mercury.xml
URL: http://svn.apache.org/viewvc/maven/components/branches/MNG-3932/build-mercury.xml?rev=739771&view=auto
==============================================================================
--- maven/components/branches/MNG-3932/build-mercury.xml (added)
+++ maven/components/branches/MNG-3932/build-mercury.xml Sun Feb  1 14:59:32 2009
@@ -0,0 +1,232 @@
+<!--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements.  See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership.  The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License.  You may obtain a copy of the License at
+
+    http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied.  See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<!-- START SNIPPET: ant-bootstrap
+
+By default the bootstrap will use ~/.m2/repository as the integration repository but you can define the integration 
+repository by specifying a property on the command line:
+
+ant -Dmaven.repo.local=/my/integration/repository
+
+Those familiar with Maven will note this is the same way the local repository can be set from the command-line. 
+This facilitates having a set of builds converge on the same repository for integration purposes.
+
+END SNIPPET: ant-bootstrap -->
+
+<project default="all" basedir="." xmlns:mercury="urn:mercury-ant-tasks">
+  
+  <property name="it.workdir.version" value="3.0.x"/>
+
+  <target name="initTaskDefs">
+    <xmlproperty file="pom.xml" prefix="pom.xml" />
+    <path id="mercury-ant-tasks.classpath" path="mercury-ant-tasks-1.0.0-alpha-4-SNAPSHOT.jar"/>
+    <typedef resource="org/apache/maven/mercury/ant/tasks/antlib.xml" uri="urn:mercury-ant-tasks" classpathref="mercury-ant-tasks.classpath"/>
+  </target>
+
+  <target name="isMavenHomeSet" depends="initTaskDefs">
+    <property environment="env"/>
+    <condition property="maven.home" value="${env.M2_HOME}">
+      <isset property="env.M2_HOME"/>
+    </condition>
+    <fail message="You must set the M2_HOME environment variable or specify a maven.home property to this Ant script">
+      <condition>
+        <or>
+          <not>
+            <isset property="maven.home" />
+          </not>
+          <equals arg1="${maven.home}" arg2="" trim="true" />
+        </or>
+      </condition>
+    </fail>
+  </target>
+
+  <target name="init" depends="isMavenHomeSet">
+    <xmlproperty prefix="pom" file="pom.xml"/>    
+    <basename file="${maven.home}" property="maven.home.basename"/>
+    <dirname file="${maven.home}" property="maven.home.dirname"/>
+    <!-- Initialize properties -->
+    <property name="maven.home.basename.expected" value="apache-maven-${pom.project.version}"/>
+    <property name="maven.assembly" location="maven-distribution/target/${maven.home.basename.expected}-bin.zip"/>
+    <property name="maven.repo.local" value="${user.home}/.m2/repository"/>
+    <property name="surefire.useFile" value="true"/>    
+    <echo>maven.home = ${maven.home}</echo>
+  </target>
+
+  <target name="clean-bootstrap" description="cleans up generated bootstrap classes">
+    <delete dir="bootstrap"/>
+  </target>
+
+  <target name="pull" depends="init" unless="skip.pull">    
+    <property name="verbose" value="false"/>    
+    <!-- Pull the dependencies that Maven needs to build -->
+    <copy file="pom.xml" tofile="dependencies.xml"/>
+    <replace file="${basedir}/dependencies.xml" token="&lt;!--start--&gt;" value="&lt;!--"/>
+    <replace file="${basedir}/dependencies.xml" token="&lt;!--end--&gt;" value="--&gt;"/>
+    
+    <mercury:resolve-dependencies source="maven:pom.xml" id="pom">
+      <mercury:local-repository location="${maven.repo.local}"/>
+    </mercury:resolve-dependencies>
+    
+    <delete file="${basedir}/dependencies.xml"/>
+    
+    <!-- Pull the dependencies for Modello -->
+    <mercury:resolve-dependencies id="modello">
+      <mercury:local-repository location="${maven.repo.local}"/>
+      <mercury:dependency groupId="org.codehaus.modello" artifactId="modello-maven-plugin" version="${pom.properties.modelloVersion}"/>
+    </mercury:resolve-dependencies>
+    
+    <!-- Pull the dependencies for the MetadataGenerator CLI -->
+    <mercury:resolve-dependencies id="pmdg">
+      <mercury:local-repository path="${maven.repo.local}"/>       
+      <mercury:dependency groupId="org.codehaus.plexus" artifactId="plexus-component-metadata" version="${pom.properties.plexusVersion}"/>
+    </mercury:resolve-dependencies>              
+  </target>
+
+  <target name="process-classes" depends="pull" description="generates plexus component metadata.">
+    <mkdir dir="${basedir}/bootstrap/target"/>
+    <mkdir dir="${basedir}/bootstrap/target/classes"/>
+  	
+    <path id="maven.classpath">
+      <pathelement location="bootstrap/target/classes"/>
+      <path refid="sources"/>    	
+      <path refid="pom.pathid"/>
+      <path refid="pmdg.pathid"/>
+    </path>
+
+    <echo>Using plexus version ${pom.properties.plexusVersion}</echo> 
+    <java fork="fork" classname="org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli" failonerror="true">
+      <classpath refid="maven.classpath"/>
+      <!-- We need to generate component descriptors from the maven-artifact sources which use javadoc annotations. -->
+      <arg value="--source"/>
+      <arg value="${basedir}/maven-compat/src/main/java"/>
+      <!-- We have separated the artifact handlers and lifecycle mappings into a separate file. -->
+      <arg value="--descriptors"/>
+      <arg value="${basedir}/maven-core/src/main/resources/META-INF/plexus"/>
+      <!-- Search the classes for annotations that we've compiled. -->
+      <arg value="--classes"/>
+      <arg value="${basedir}/bootstrap/target/classes"/>
+      <!-- We'll make one big fat components descriptor. -->
+      <arg value="--output"/>
+      <arg value="${basedir}/bootstrap/target/classes/META-INF/plexus/components.xml"/>
+    </java>
+  </target>	
+	
+  <target name="generate-sources" depends="pull" description="generates Java sources from Modello mdo model files">
+    <mkdir dir="bootstrap/target"/>
+    <mkdir dir="bootstrap/target/generated-sources"/>
+
+    <macrodef name="modello-single-mode">
+      <attribute name="file"/>
+      <attribute name="mode"/>
+      <attribute name="version"/>
+      <sequential>
+        <java fork="fork" classname="org.codehaus.modello.ModelloCli" failonerror="true">
+          <classpath refid="modello.pathid"/>
+          <arg file="@{file}"/>
+          <arg value="@{mode}"/>
+          <arg file="bootstrap/target/generated-sources"/>
+          <arg value="@{version}"/>
+          <arg value="false"/>
+        </java>
+      </sequential>
+    </macrodef>
+
+    <macrodef name="modello">
+      <attribute name="file"/>
+      <attribute name="version" default="1.0.0"/>
+      <sequential>
+        <echo taskname="modello" message="Generating sources for @{file}"/>
+        <modello-single-mode file="@{file}" version="@{version}" mode="java"/>
+        <modello-single-mode file="@{file}" version="@{version}" mode="xpp3-reader"/>
+        <modello-single-mode file="@{file}" version="@{version}" mode="xpp3-writer"/>
+      </sequential>
+    </macrodef>
+
+    <modello file="maven-model/src/main/mdo/maven.mdo" version="4.0.0"/>
+    <modello file="maven-lifecycle/src/main/mdo/maven-lifecycle.mdo"/>
+    <modello file="maven-plugin-api/src/main/mdo/lifecycle.mdo"/>
+    <modello file="maven-project/src/main/mdo/profiles.mdo"/>
+    <modello file="maven-core/src/main/mdo/settings.mdo"/>
+    <modello file="maven-toolchain/src/main/mdo/toolchains.xml"/>
+    <modello file="maven-compat/src/main/mdo/metadata.mdo"/>
+  </target>
+
+  <target name="compile-boot" depends="generate-sources" description="compiles the bootstrap sources">
+    <path id="sources">
+      <dirset dir=".">
+        <include name="bootstrap/target/generated-sources"/>
+        <include name="*/src/main/*"/>
+      </dirset>
+    </path>
+
+    <mkdir dir="bootstrap/target/classes"/>
+    <javac destdir="bootstrap/target/classes" encoding="UTF-8" source="1.5" target="1.5" debug="true">
+      <src refid="sources"/>
+      <classpath refid="pom.pathid"/>
+    </javac>
+
+    <path id="maven.classpath">
+      <pathelement location="bootstrap/target/classes"/>
+      <pathelement location="maven-compat/src/main/resources"/>
+      <path refid="sources"/>
+      <path refid="pom.pathid"/>
+    </path>
+  </target>
+
+  <target name="maven-compile" depends="compile-boot,process-classes" description="compiles Maven using the bootstrap Maven, skipping automated tests">
+    <java fork="true" classname="org.apache.maven.cli.MavenCli" failonerror="true">
+      <classpath refid="maven.classpath"/>
+      <arg value="-e"/>      
+      <arg value="-B"/>
+      <arg value="clean"/>
+      <arg value="install"/>
+      <arg value="-Dmaven.repo.local=${maven.repo.local}"/>
+      <arg value="-Dsurefire.useFile=${surefire.useFile}"/>
+    </java>
+  </target>
+
+  <target name="maven-assembly" depends="maven-compile" description="generates the Maven installation assembly using the bootstrap Maven">              
+    <echo>
+    The new Maven distribution was created as part of the MAVEN-COMPILE step, above. 
+    This goal just validates the presence of that distribution.
+    </echo>
+    <condition property="build.failed">
+      <not>
+        <available file="${maven.assembly}"/>
+      </not>
+    </condition>
+    <fail if="build.failed" message="Assembly task seemed to succeed, but couldn't find assembly file: ${maven.assembly}"/>
+  </target>
+
+  <target name="extract-assembly" depends="init,maven-assembly" description="extracts the maven assembly into maven.home">
+    <echo>Extracting assembly to ${maven.home.dirname} ...</echo>
+    <!-- If we are starting from scratch make sure the directory is created -->
+    <delete dir="${maven.home}"/>
+    <mkdir dir="${maven.home}"/>
+    <unzip src="${maven.assembly}" dest="${maven.home.dirname}"/>
+    <chmod perm="+x">
+      <fileset dir="${maven.home}/bin">
+        <include name="mvn"/>
+      </fileset>
+    </chmod>
+  </target>
+  
+  <target name="all" depends="clean-bootstrap,init,extract-assembly"/>
+  
+</project>

Modified: maven/components/branches/MNG-3932/build.xml
URL: http://svn.apache.org/viewvc/maven/components/branches/MNG-3932/build.xml?rev=739771&r1=739770&r2=739771&view=diff
==============================================================================
--- maven/components/branches/MNG-3932/build.xml (original)
+++ maven/components/branches/MNG-3932/build.xml Sun Feb  1 14:59:32 2009
@@ -58,14 +58,14 @@
 
   <target name="init" depends="isMavenHomeSet">
     <xmlproperty prefix="pom" file="pom.xml"/>    
-    <basename file="${maven.home}" property="maven.home.basename"/>
     <dirname file="${maven.home}" property="maven.home.dirname"/>
     <!-- Initialize properties -->
     <property name="maven.home.basename.expected" value="apache-maven-${pom.project.version}"/>
-    <property name="maven.assembly" location="maven-distribution/target/${maven.home.basename.expected}-bin.zip"/>
+    <property name="maven.home.effective" location="${maven.home.dirname}/${maven.home.basename.expected}"/>
+    <property name="maven.assembly" location="apache-maven/target/${maven.home.basename.expected}-bin.zip"/>
     <property name="maven.repo.local" value="${user.home}/.m2/repository"/>
     <property name="surefire.useFile" value="true"/>    
-    <echo>maven.home = ${maven.home}</echo>
+    <echo>maven.home = ${maven.home.effective}</echo>
   </target>
 
   <target name="clean-bootstrap" description="cleans up generated bootstrap classes">
@@ -218,11 +218,11 @@
   <target name="extract-assembly" depends="init,maven-assembly" description="extracts the maven assembly into maven.home">
     <echo>Extracting assembly to ${maven.home.dirname} ...</echo>
     <!-- If we are starting from scratch make sure the directory is created -->
-    <delete dir="${maven.home}"/>
-    <mkdir dir="${maven.home}"/>
+    <delete dir="${maven.home.effective}"/>
+    <mkdir dir="${maven.home.effective}"/>
     <unzip src="${maven.assembly}" dest="${maven.home.dirname}"/>
     <chmod perm="+x">
-      <fileset dir="${maven.home}/bin">
+      <fileset dir="${maven.home.effective}/bin">
         <include name="mvn"/>
       </fileset>
     </chmod>

Modified: maven/components/branches/MNG-3932/maven-compat/compatibility.cfl
URL: http://svn.apache.org/viewvc/maven/components/branches/MNG-3932/maven-compat/compatibility.cfl?rev=739771&r1=739770&r2=739771&view=diff
==============================================================================
--- maven/components/branches/MNG-3932/maven-compat/compatibility.cfl (original)
+++ maven/components/branches/MNG-3932/maven-compat/compatibility.cfl Sun Feb  1 14:59:32 2009
@@ -46,6 +46,19 @@
 * org.apache.maven.artifact.resolver.transform.*
 * org.apache.maven.artifact.resolver.versioning.*
 
+h2. Settings
+
+The settings are historically a CLI-based mechanism for setting preferences. It should have never gone beyond the core into plugins
+or other tools. Unfortunately we allowed the ${settings} expression in plugins and from there it made its way into components like
+the release manager. The release manager in turn never evolved to decouple itself from the settings and it requires a recreation
+of the entire Maven environment to work and grabs the RuntimeInfo info class from the settings in order to do this. Other plugins
+may require this and we'll have to find them them and push them toward using the Invoker where the Maven environment is taken care
+of and restrict/forbid the use of settings in plugins. Everything required is in the exeution request and therefore the session and
+that's all plugins should need.
+
+The changes made relate to MNG-3954, where the RuntimeInfo class needed to be partially rescurrected in order to make the release
+plugin happy.
+
 h2. Changes to the CLI
 * Log file support has been added i.e mvn -l log.txt clean install
 * Plugin registry option has not been supported in the core and it lagged around in the CLI
\ No newline at end of file

Modified: maven/components/branches/MNG-3932/maven-compat/pom.xml
URL: http://svn.apache.org/viewvc/maven/components/branches/MNG-3932/maven-compat/pom.xml?rev=739771&r1=739770&r2=739771&view=diff
==============================================================================
--- maven/components/branches/MNG-3932/maven-compat/pom.xml (original)
+++ maven/components/branches/MNG-3932/maven-compat/pom.xml Sun Feb  1 14:59:32 2009
@@ -8,8 +8,7 @@
     WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language
     governing permissions and limitations under the License.
   -->
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-  xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
   <parent>
     <groupId>org.apache.maven</groupId>
     <artifactId>maven</artifactId>

Propchange: maven/components/branches/MNG-3932/maven-compat/pom.xml
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sun Feb  1 14:59:32 2009
@@ -1 +1 @@
-"Author Date Id Revision"
+Author Date Id Revision

Modified: maven/components/branches/MNG-3932/maven-compat/src/main/java/org/apache/maven/artifact/Artifact.java
URL: http://svn.apache.org/viewvc/maven/components/branches/MNG-3932/maven-compat/src/main/java/org/apache/maven/artifact/Artifact.java?rev=739771&r1=739770&r2=739771&view=diff
==============================================================================
--- maven/components/branches/MNG-3932/maven-compat/src/main/java/org/apache/maven/artifact/Artifact.java (original)
+++ maven/components/branches/MNG-3932/maven-compat/src/main/java/org/apache/maven/artifact/Artifact.java Sun Feb  1 14:59:32 2009
@@ -55,6 +55,8 @@
 
     String SCOPE_RUNTIME = ArtifactScopeEnum.runtime.toString();
 
+    String SCOPE_RUNTIME_PLUS_SYSTEM = ArtifactScopeEnum.runtime_plus_system.toString();
+
     String SCOPE_PROVIDED = ArtifactScopeEnum.provided.toString();
 
     String SCOPE_SYSTEM = ArtifactScopeEnum.system.toString();

Modified: maven/components/branches/MNG-3932/maven-compat/src/main/java/org/apache/maven/artifact/ArtifactScopeEnum.java
URL: http://svn.apache.org/viewvc/maven/components/branches/MNG-3932/maven-compat/src/main/java/org/apache/maven/artifact/ArtifactScopeEnum.java?rev=739771&r1=739770&r2=739771&view=diff
==============================================================================
--- maven/components/branches/MNG-3932/maven-compat/src/main/java/org/apache/maven/artifact/ArtifactScopeEnum.java (original)
+++ maven/components/branches/MNG-3932/maven-compat/src/main/java/org/apache/maven/artifact/ArtifactScopeEnum.java Sun Feb  1 14:59:32 2009
@@ -10,7 +10,7 @@
 
 public enum ArtifactScopeEnum
 {
-    compile( 1 ), test( 2 ), runtime( 3 ), provided( 4 ), system( 5 );
+    compile( 1 ), test( 2 ), runtime( 3 ), provided( 4 ), system( 5 ), runtime_plus_system( 6 );
 
     public static final ArtifactScopeEnum DEFAULT_SCOPE = compile;
 
@@ -21,7 +21,7 @@
     {
         this.id = id;
     }
-
+    
     int getId()
     {
         return id;
@@ -62,10 +62,14 @@
         {
             return Artifact.SCOPE_PROVIDED;
         }
-        else
+        else if ( id == 5 )
         {
             return Artifact.SCOPE_SYSTEM;
         }
+        else
+        {
+            return Artifact.SCOPE_RUNTIME_PLUS_SYSTEM;
+        }
     }
     
     private static final ArtifactScopeEnum [][][] _compliancySets = {

Modified: maven/components/branches/MNG-3932/maven-compat/src/main/java/org/apache/maven/artifact/manager/DefaultWagonManager.java
URL: http://svn.apache.org/viewvc/maven/components/branches/MNG-3932/maven-compat/src/main/java/org/apache/maven/artifact/manager/DefaultWagonManager.java?rev=739771&r1=739770&r2=739771&view=diff
==============================================================================
--- maven/components/branches/MNG-3932/maven-compat/src/main/java/org/apache/maven/artifact/manager/DefaultWagonManager.java (original)
+++ maven/components/branches/MNG-3932/maven-compat/src/main/java/org/apache/maven/artifact/manager/DefaultWagonManager.java Sun Feb  1 14:59:32 2009
@@ -76,9 +76,33 @@
 
     /** have to match the CHECKSUM_IDS */
     private static final String[] CHECKSUM_ALGORITHMS = {"MD5", "SHA-1"};
-    
+        
     private PlexusContainer container;
 
+    // TODO: proxies, authentication and mirrors are via settings, and should come in via an alternate method - perhaps
+    // attached to ArtifactRepository before the method is called (so AR would be composed of WR, not inherit it)
+    private Map<String,ProxyInfo> proxies = new HashMap<String,ProxyInfo>();
+
+    private static Map<String,AuthenticationInfo> authenticationInfoMap = new HashMap<String,AuthenticationInfo>();
+
+    private Map<String,RepositoryPermissions> serverPermissionsMap = new HashMap<String,RepositoryPermissions>();
+
+    //used LinkedMap to preserve the order.
+    private Map<String,ArtifactRepository> mirrors = new LinkedHashMap<String,ArtifactRepository>();
+
+    /** Map( String, XmlPlexusConfiguration ) with the repository id and the wagon configuration */
+    private Map<String,XmlPlexusConfiguration> serverConfigurationMap = new HashMap<String,XmlPlexusConfiguration>();
+
+    private TransferListener downloadMonitor;
+
+    private boolean online = true;
+
+    private boolean interactive = true;
+
+    private RepositoryPermissions defaultRepositoryPermissions;
+
+    // Components
+
     /** @plexus.requirement */
     private ArtifactRepositoryFactory repositoryFactory;
 
@@ -188,7 +212,9 @@
             {
                 Repository artifactRepository = new Repository( repository.getId(), repository.getUrl() );
 
-                wagon.connect( artifactRepository, getAuthenticationInfo( repository.getId() ), new ProxyInfoProvider()
+                AuthenticationInfo authenticationInfo = getAuthenticationInfo( repository.getId() ); 
+                                
+                wagon.connect( artifactRepository, authenticationInfo, new ProxyInfoProvider()
                 {
                     public ProxyInfo getProxyInfo( String protocol )
                     {
@@ -727,8 +753,9 @@
             // remove whitespaces at the end
             expectedChecksum = expectedChecksum.trim();
 
-            // check for 'MD5 (name) = CHECKSUM'
-            if ( expectedChecksum.startsWith( "MD5" ) )
+            // check for 'ALGO (name) = CHECKSUM' like used by openssl
+            if ( expectedChecksum.regionMatches( true, 0, "MD", 0, 2 )
+                || expectedChecksum.regionMatches( true, 0, "SHA", 0, 3 ) )
             {
                 int lastSpacePos = expectedChecksum.lastIndexOf( ' ' );
                 expectedChecksum = expectedChecksum.substring( lastSpacePos + 1 );
@@ -791,13 +818,278 @@
             getLogger().debug( "", e );
         }
     }
+    
+    public ProxyInfo getProxy( String protocol )
+    {
+        return proxies.get( protocol );
+    }
+
+    public AuthenticationInfo getAuthenticationInfo( String id )
+        throws CredentialsDataSourceException
+    {
+        return credentialsDataSource == null
+            ? authenticationInfoMap.get( id )
+            : credentialsDataSource.get( id );
+    }
+
+    /**
+     * This method finds a matching mirror for the selected repository. If there is an exact match, this will be used.
+     * If there is no exact match, then the list of mirrors is examined to see if a pattern applies.
+     *
+     * @param originalRepository See if there is a mirror for this repository.
+     * @return the selected mirror or null if none are found.
+     */
+    public ArtifactRepository getMirror( ArtifactRepository originalRepository )
+    {
+        ArtifactRepository selectedMirror = mirrors.get( originalRepository.getId() );
+        if ( null == selectedMirror )
+        {
+            // Process the patterns in order. First one that matches wins.
+            Set<String> keySet = mirrors.keySet();
+            if ( keySet != null )
+            {
+                for (String pattern : keySet) 
+                {
+                    if (matchPattern(originalRepository, pattern)) 
+                    {
+                        selectedMirror = mirrors.get(pattern);
+                        break;
+                    }
+                }
+            }
+
+        }
+        return selectedMirror;
+    }
+
+    /**
+     * This method checks if the pattern matches the originalRepository.
+     * Valid patterns:
+     * * = everything
+     * external:* = everything not on the localhost and not file based.
+     * repo,repo1 = repo or repo1
+     * *,!repo1 = everything except repo1
+     *
+     * @param originalRepository to compare for a match.
+     * @param pattern used for match. Currently only '*' is supported.
+     * @return true if the repository is a match to this pattern.
+     */
+    public boolean matchPattern( ArtifactRepository originalRepository, String pattern )
+    {
+        boolean result = false;
+        String originalId = originalRepository.getId();
+
+        // simple checks first to short circuit processing below.
+        if ( WILDCARD.equals( pattern ) || pattern.equals( originalId ) )
+        {
+            result = true;
+        }
+        else
+        {
+            // process the list
+            String[] repos = pattern.split( "," );
+            for (String repo : repos) {
+                // see if this is a negative match
+                if (repo.length() > 1 && repo.startsWith("!")) {
+                    if (originalId.equals(repo.substring(1))) {
+                        // explicitly exclude. Set result and stop processing.
+                        result = false;
+                        break;
+                    }
+                }
+                // check for exact match
+                else if (originalId.equals(repo)) {
+                    result = true;
+                    break;
+                }
+                // check for external:*
+                else if (EXTERNAL_WILDCARD.equals(repo) && isExternalRepo(originalRepository)) {
+                    result = true;
+                    // don't stop processing in case a future segment explicitly excludes this repo
+                } else if (WILDCARD.equals(repo)) {
+                    result = true;
+                    // don't stop processing in case a future segment explicitly excludes this repo
+                }
+            }
+        }
+        return result;
+    }
+
+    /**
+     * Checks the URL to see if this repository refers to an external repository
+     *
+     * @param originalRepository
+     * @return true if external.
+     */
+    public boolean isExternalRepo( ArtifactRepository originalRepository )
+    {
+        try
+        {
+            URL url = new URL( originalRepository.getUrl() );
+            return !( url.getHost().equals( "localhost" ) || url.getHost().equals( "127.0.0.1" ) || url.getProtocol().equals("file" ) );
+        }
+        catch ( MalformedURLException e )
+        {
+            // bad url just skip it here. It should have been validated already, but the wagon lookup will deal with it
+            return false;
+        }
+    }
 
-    public void contextualize( Context context )
-        throws ContextException
+    /**
+     * Set the proxy used for a particular protocol.
+     *
+     * @param protocol the protocol (required)
+     * @param host the proxy host name (required)
+     * @param port the proxy port (required)
+     * @param username the username for the proxy, or null if there is none
+     * @param password the password for the proxy, or null if there is none
+     * @param nonProxyHosts the set of hosts not to use the proxy for. Follows Java system property format:
+     *            <code>*.foo.com|localhost</code>.
+     * @todo [BP] would be nice to configure this via plexus in some way
+     */
+    public void addProxy( String protocol,
+                          String host,
+                          int port,
+                          String username,
+                          String password,
+                          String nonProxyHosts )
+    {
+        ProxyInfo proxyInfo = new ProxyInfo();
+        proxyInfo.setHost( host );
+        proxyInfo.setType( protocol );
+        proxyInfo.setPort( port );
+        proxyInfo.setNonProxyHosts( nonProxyHosts );
+        proxyInfo.setUserName( username );
+        proxyInfo.setPassword( password );
+
+        proxies.put( protocol, proxyInfo );
+    }
+
+    // We are leaving this method here so that we can attempt to use the new maven-artifact
+    // library from the 2.0.x code so that we aren't maintaining two lines of code
+    // for the artifact management.
+    public void addAuthenticationInfo( String repositoryId,
+                                       String username,
+                                       String password,
+                                       String privateKey,
+                                       String passphrase
+    )
+    {
+        AuthenticationInfo authInfo = new AuthenticationInfo();
+        authInfo.setUserName( username );
+        authInfo.setPassword( password );
+        authInfo.setPrivateKey( privateKey );
+        authInfo.setPassphrase( passphrase );
+
+        authenticationInfoMap.put( repositoryId, authInfo );
+    }
+
+    // This is the new way of handling authentication that will allow us to help users setup
+    // authentication requirements.
+    public void addAuthenticationCredentials( String repositoryId,
+                                              String username,
+                                              String password,
+                                              String privateKey,
+                                              String passphrase
+    )
+        throws CredentialsDataSourceException
+    {
+        AuthenticationInfo authInfo = new AuthenticationInfo();
+        authInfo.setUserName( username );
+        authInfo.setPassword( password );
+        authInfo.setPrivateKey( privateKey );
+        authInfo.setPassphrase( passphrase );
+
+        if ( credentialsDataSource == null )
+        {
+            authenticationInfoMap.put( repositoryId, authInfo );
+        }
+        else
+        {
+            credentialsDataSource.set( new CredentialsChangeRequest( repositoryId, authInfo, null ) );
+        }
+    }
+
+    public void addPermissionInfo( String repositoryId,
+                                   String filePermissions,
+                                   String directoryPermissions )
+    {
+        RepositoryPermissions permissions = new RepositoryPermissions();
+
+        boolean addPermissions = false;
+
+        if ( filePermissions != null )
+        {
+            permissions.setFileMode( filePermissions );
+            addPermissions = true;
+        }
+
+        if ( directoryPermissions != null )
+        {
+            permissions.setDirectoryMode( directoryPermissions );
+            addPermissions = true;
+        }
+
+        if ( addPermissions )
+        {
+            serverPermissionsMap.put( repositoryId, permissions );
+        }
+    }
+
+    public void addMirror( String id,
+                           String mirrorOf,
+                           String url )
+    {
+        if ( id == null )
+        {
+            id = "mirror-" + anonymousMirrorIdSeed++;
+            getLogger().warn( "You are using a mirror that doesn't declare an <id/> element. Using \'" + id + "\' instead:\nId: " + id + "\nmirrorOf: " + mirrorOf + "\nurl: " + url + "\n" );
+        }
+        
+        ArtifactRepository mirror = new DefaultArtifactRepository( id, url, null );
+
+        //to preserve first wins, don't add repeated mirrors.
+        if (!mirrors.containsKey( mirrorOf ))
+        {
+            mirrors.put( mirrorOf, mirror );
+        }
+    }
+
+    public void setOnline( boolean online )
+    {
+        this.online = online;
+    }
+
+    public boolean isOnline()
     {
-        container = (PlexusContainer) context.get( PlexusConstants.PLEXUS_KEY );
+        return online;
     }
 
+    public void setInteractive( boolean interactive )
+    {
+        this.interactive = interactive;
+    }
+
+    public void findAndRegisterWagons( PlexusContainer container )
+    {
+        try
+        {
+            Map wagons = container.lookupMap( Wagon.ROLE );
+
+            registerWagons( wagons.keySet(), container );
+        }
+        catch ( ComponentLookupException e )
+        {
+            // no wagons found in the extension
+        }
+    }
+
+    /** @deprecated Wagons are discovered in plugin and extension realms now. */
+    @Deprecated
+    public void registerWagons( Collection wagons,
+                                PlexusContainer extensionContainer )
+    {
+    }
 
     /**
      * Applies the server configuration to the wagon

Modified: maven/components/branches/MNG-3932/maven-compat/src/main/java/org/apache/maven/artifact/resolver/filter/ScopeArtifactFilter.java
URL: http://svn.apache.org/viewvc/maven/components/branches/MNG-3932/maven-compat/src/main/java/org/apache/maven/artifact/resolver/filter/ScopeArtifactFilter.java?rev=739771&r1=739770&r2=739771&view=diff
==============================================================================
--- maven/components/branches/MNG-3932/maven-compat/src/main/java/org/apache/maven/artifact/resolver/filter/ScopeArtifactFilter.java (original)
+++ maven/components/branches/MNG-3932/maven-compat/src/main/java/org/apache/maven/artifact/resolver/filter/ScopeArtifactFilter.java Sun Feb  1 14:59:32 2009
@@ -39,7 +39,7 @@
     private final boolean providedScope;
 
     private final boolean systemScope;
-
+    
     public ScopeArtifactFilter( String scope )
     {
         if ( Artifact.SCOPE_COMPILE.equals( scope ) )
@@ -58,6 +58,14 @@
             runtimeScope = true;
             testScope = false;
         }
+        else if ( Artifact.SCOPE_RUNTIME_PLUS_SYSTEM.equals( scope ) )
+        {
+            systemScope = true;
+            providedScope = false;
+            compileScope = true;
+            runtimeScope = true;
+            testScope = false;
+        }
         else if ( Artifact.SCOPE_TEST.equals( scope ) )
         {
             systemScope = true;

Propchange: maven/components/branches/MNG-3932/maven-compat/src/main/java/org/apache/maven/project/MissingRepositoryElementException.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sun Feb  1 14:59:32 2009
@@ -1 +1 @@
-"Author Date Id Revision"
+Author Date Id Revision

Modified: maven/components/branches/MNG-3932/maven-compat/src/main/java/org/apache/maven/project/ModelUtils.java
URL: http://svn.apache.org/viewvc/maven/components/branches/MNG-3932/maven-compat/src/main/java/org/apache/maven/project/ModelUtils.java?rev=739771&r1=739770&r2=739771&view=diff
==============================================================================
--- maven/components/branches/MNG-3932/maven-compat/src/main/java/org/apache/maven/project/ModelUtils.java (original)
+++ maven/components/branches/MNG-3932/maven-compat/src/main/java/org/apache/maven/project/ModelUtils.java Sun Feb  1 14:59:32 2009
@@ -350,7 +350,7 @@
 
     private static List mergeDependencyList( List child, List parent )
     {
-        Map depsMap = new HashMap();
+        Map depsMap = new LinkedHashMap();
 
         if ( parent != null )
         {

Propchange: maven/components/branches/MNG-3932/maven-compat/src/main/java/org/apache/maven/project/ProjectUtils.java
------------------------------------------------------------------------------
--- svn:keywords (original)
+++ svn:keywords Sun Feb  1 14:59:32 2009
@@ -1 +1 @@
-"Author Date Id Revision"
+Author Date Id Revision

Modified: maven/components/branches/MNG-3932/maven-compat/src/main/java/org/apache/maven/project/path/DefaultPathTranslator.java
URL: http://svn.apache.org/viewvc/maven/components/branches/MNG-3932/maven-compat/src/main/java/org/apache/maven/project/path/DefaultPathTranslator.java?rev=739771&r1=739770&r2=739771&view=diff
==============================================================================
--- maven/components/branches/MNG-3932/maven-compat/src/main/java/org/apache/maven/project/path/DefaultPathTranslator.java (original)
+++ maven/components/branches/MNG-3932/maven-compat/src/main/java/org/apache/maven/project/path/DefaultPathTranslator.java Sun Feb  1 14:59:32 2009
@@ -35,8 +35,6 @@
 {
     private static final String[] BASEDIR_EXPRESSIONS = {"${basedir}", "${pom.basedir}", "${project.basedir}"};
 
-    private String FILE_SEPARATOR = "/";
-
     public void alignToBaseDirectory( Model model, File basedir )
     {
         Build build = model.getBuild();
@@ -83,10 +81,27 @@
 
     public String alignToBaseDirectory( String path, File basedir )
     {
+        if ( path == null )
+        {
+            return null;
+        }
+
         String s = stripBasedirToken( path );
 
-        if ( requiresBaseDirectoryAlignment( s ) )
+        File file = new File( s );
+        if ( file.isAbsolute() )
+        {
+            // path was already absolute, just normalize file separator and we're done
+            s = file.getPath();
+        }
+        else if ( file.getPath().startsWith( File.separator ) )
+        {
+            // drive-relative Windows path, don't align with project directory but with drive root
+            s = file.getAbsolutePath();
+        }
+        else
         {
+            // an ordinary relative path, align with project directory
             s = new File( new File( basedir, s ).toURI().normalize() ).getAbsolutePath();
         }
 
@@ -147,25 +162,6 @@
         return path;
     }
 
-    private boolean requiresBaseDirectoryAlignment( String s )
-    {
-        if ( s != null )
-        {
-            File f = new File( s );
-
-            if ( s.startsWith( FILE_SEPARATOR ) || f.isAbsolute() )
-            {
-                return false;
-            }
-            else
-            {
-                return true;
-            }
-        }
-
-        return false;
-    }
-
     public void unalignFromBaseDirectory( Model model, File basedir )
     {
         Build build = model.getBuild();



Mime
View raw message