ruby-maven 3.0.3.0.28.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (58) hide show
  1. data/LICENSE.txt +202 -0
  2. data/NOTICE.txt +23 -0
  3. data/README.txt +77 -0
  4. data/bin/gwt +59 -0
  5. data/bin/jetty-run +25 -0
  6. data/bin/m2.conf +7 -0
  7. data/bin/mvn +172 -0
  8. data/bin/mvn.bat +197 -0
  9. data/bin/mvnDebug +177 -0
  10. data/bin/mvnDebug.bat +200 -0
  11. data/bin/mvnyjp +193 -0
  12. data/bin/rmvn +9 -0
  13. data/bin/tomcat-run +25 -0
  14. data/boot/plexus-classworlds-2.4.jar +0 -0
  15. data/conf/settings.xml +257 -0
  16. data/lib/aether-api-1.11.jar +0 -0
  17. data/lib/aether-connector-wagon-1.11.jar +0 -0
  18. data/lib/aether-impl-1.11.jar +0 -0
  19. data/lib/aether-spi-1.11.jar +0 -0
  20. data/lib/aether-util-1.11.jar +0 -0
  21. data/lib/commons-cli-1.2.jar +0 -0
  22. data/lib/ext/README.txt +2 -0
  23. data/lib/maven-aether-provider-3.0.3.jar +0 -0
  24. data/lib/maven-artifact-3.0.3.jar +0 -0
  25. data/lib/maven-compat-3.0.3.jar +0 -0
  26. data/lib/maven-core-3.0.3.jar +0 -0
  27. data/lib/maven-embedder-3.0.3.jar +0 -0
  28. data/lib/maven-model-3.0.3.jar +0 -0
  29. data/lib/maven-model-builder-3.0.3.jar +0 -0
  30. data/lib/maven-plugin-api-3.0.3.jar +0 -0
  31. data/lib/maven-repository-metadata-3.0.3.jar +0 -0
  32. data/lib/maven-settings-3.0.3.jar +0 -0
  33. data/lib/maven-settings-builder-3.0.3.jar +0 -0
  34. data/lib/nekohtml-1.9.6.2.jar +0 -0
  35. data/lib/plexus-cipher-1.4.jar +0 -0
  36. data/lib/plexus-component-annotations-1.5.5.jar +0 -0
  37. data/lib/plexus-interpolation-1.14.jar +0 -0
  38. data/lib/plexus-sec-dispatcher-1.3.jar +0 -0
  39. data/lib/plexus-utils-2.0.6.jar +0 -0
  40. data/lib/ruby/maven/model/dependencies.rb +281 -0
  41. data/lib/ruby/maven/model/model.rb +490 -0
  42. data/lib/ruby/maven/model/model_utils.rb +322 -0
  43. data/lib/ruby/maven/tools/execute_in_phase.rb +9 -0
  44. data/lib/ruby/maven/tools/gem_project.rb +387 -0
  45. data/lib/ruby/maven/tools/gemfile_lock.rb +67 -0
  46. data/lib/ruby/maven/tools/pom_generator.rb +61 -0
  47. data/lib/ruby/maven/tools/rails_project.rb +147 -0
  48. data/lib/ruby/maven/tools/versions.rb +11 -0
  49. data/lib/ruby/ruby_maven.rb +206 -0
  50. data/lib/sisu-guice-2.9.4-no_aop.jar +0 -0
  51. data/lib/sisu-inject-bean-2.1.1.jar +0 -0
  52. data/lib/sisu-inject-plexus-2.1.1.jar +0 -0
  53. data/lib/wagon-file-1.0-beta-7.jar +0 -0
  54. data/lib/wagon-http-lightweight-1.0-beta-7.jar +0 -0
  55. data/lib/wagon-http-shared-1.0-beta-7.jar +0 -0
  56. data/lib/wagon-provider-api-1.0-beta-7.jar +0 -0
  57. data/lib/xercesMinimal-1.9.6.2.jar +0 -0
  58. metadata +128 -0
data/bin/mvn.bat ADDED
@@ -0,0 +1,197 @@
1
+ @REM ----------------------------------------------------------------------------
2
+ @REM Licensed to the Apache Software Foundation (ASF) under one
3
+ @REM or more contributor license agreements. See the NOTICE file
4
+ @REM distributed with this work for additional information
5
+ @REM regarding copyright ownership. The ASF licenses this file
6
+ @REM to you under the Apache License, Version 2.0 (the
7
+ @REM "License"); you may not use this file except in compliance
8
+ @REM with the License. You may obtain a copy of the License at
9
+ @REM
10
+ @REM http://www.apache.org/licenses/LICENSE-2.0
11
+ @REM
12
+ @REM Unless required by applicable law or agreed to in writing,
13
+ @REM software distributed under the License is distributed on an
14
+ @REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
+ @REM KIND, either express or implied. See the License for the
16
+ @REM specific language governing permissions and limitations
17
+ @REM under the License.
18
+ @REM ----------------------------------------------------------------------------
19
+
20
+ @REM ----------------------------------------------------------------------------
21
+ @REM Maven2 Start Up Batch script
22
+ @REM
23
+ @REM Required ENV vars:
24
+ @REM JAVA_HOME - location of a JDK home dir
25
+ @REM
26
+ @REM Optional ENV vars
27
+ @REM M2_HOME - location of maven2's installed home dir
28
+ @REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
29
+ @REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending
30
+ @REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
31
+ @REM e.g. to debug Maven itself, use
32
+ @REM set MAVEN_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
33
+ @REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
34
+ @REM ----------------------------------------------------------------------------
35
+
36
+ @REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
37
+ @echo off
38
+ @REM enable echoing my setting MAVEN_BATCH_ECHO to 'on'
39
+ @if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO%
40
+
41
+ @REM set %HOME% to equivalent of $HOME
42
+ if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
43
+
44
+ @REM Execute a user defined script before this one
45
+ if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
46
+ if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
47
+ :skipRcPre
48
+
49
+ set ERROR_CODE=0
50
+
51
+ @REM set local scope for the variables with windows NT shell
52
+ if "%OS%"=="Windows_NT" @setlocal
53
+ if "%OS%"=="WINNT" @setlocal
54
+
55
+ @REM ==== START VALIDATION ====
56
+ if not "%JAVA_HOME%" == "" goto OkJHome
57
+
58
+ echo.
59
+ echo ERROR: JAVA_HOME not found in your environment.
60
+ echo Please set the JAVA_HOME variable in your environment to match the
61
+ echo location of your Java installation
62
+ echo.
63
+ goto error
64
+
65
+ :OkJHome
66
+ if exist "%JAVA_HOME%\bin\java.exe" goto chkMHome
67
+
68
+ echo.
69
+ echo ERROR: JAVA_HOME is set to an invalid directory.
70
+ echo JAVA_HOME = "%JAVA_HOME%"
71
+ echo Please set the JAVA_HOME variable in your environment to match the
72
+ echo location of your Java installation
73
+ echo.
74
+ goto error
75
+
76
+ :chkMHome
77
+ if not "%M2_HOME%"=="" goto valMHome
78
+
79
+ if "%OS%"=="Windows_NT" SET "M2_HOME=%~dp0.."
80
+ if "%OS%"=="WINNT" SET "M2_HOME=%~dp0.."
81
+ if not "%M2_HOME%"=="" goto valMHome
82
+
83
+ echo.
84
+ echo ERROR: M2_HOME not found in your environment.
85
+ echo Please set the M2_HOME variable in your environment to match the
86
+ echo location of the Maven installation
87
+ echo.
88
+ goto error
89
+
90
+ :valMHome
91
+
92
+ :stripMHome
93
+ if not "_%M2_HOME:~-1%"=="_\" goto checkMBat
94
+ set "M2_HOME=%M2_HOME:~0,-1%"
95
+ goto stripMHome
96
+
97
+ :checkMBat
98
+ if exist "%M2_HOME%\bin\mvn.bat" goto init
99
+
100
+ echo.
101
+ echo ERROR: M2_HOME is set to an invalid directory.
102
+ echo M2_HOME = "%M2_HOME%"
103
+ echo Please set the M2_HOME variable in your environment to match the
104
+ echo location of the Maven installation
105
+ echo.
106
+ goto error
107
+ @REM ==== END VALIDATION ====
108
+
109
+ :init
110
+ @REM Decide how to startup depending on the version of windows
111
+
112
+ @REM -- Windows NT with Novell Login
113
+ if "%OS%"=="WINNT" goto WinNTNovell
114
+
115
+ @REM -- Win98ME
116
+ if NOT "%OS%"=="Windows_NT" goto Win9xArg
117
+
118
+ :WinNTNovell
119
+
120
+ @REM -- 4NT shell
121
+ if "%@eval[2+2]" == "4" goto 4NTArgs
122
+
123
+ @REM -- Regular WinNT shell
124
+ set MAVEN_CMD_LINE_ARGS=%*
125
+ goto endInit
126
+
127
+ @REM The 4NT Shell from jp software
128
+ :4NTArgs
129
+ set MAVEN_CMD_LINE_ARGS=%$
130
+ goto endInit
131
+
132
+ :Win9xArg
133
+ @REM Slurp the command line arguments. This loop allows for an unlimited number
134
+ @REM of agruments (up to the command line limit, anyway).
135
+ set MAVEN_CMD_LINE_ARGS=
136
+ :Win9xApp
137
+ if %1a==a goto endInit
138
+ set MAVEN_CMD_LINE_ARGS=%MAVEN_CMD_LINE_ARGS% %1
139
+ shift
140
+ goto Win9xApp
141
+
142
+ @REM Reaching here means variables are defined and arguments have been captured
143
+ :endInit
144
+ SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
145
+
146
+ @REM -- 4NT shell
147
+ if "%@eval[2+2]" == "4" goto 4NTCWJars
148
+
149
+ @REM -- Regular WinNT shell
150
+ for %%i in ("%M2_HOME%"\boot\plexus-classworlds-*) do set CLASSWORLDS_JAR="%%i"
151
+ goto runm2
152
+
153
+ @REM The 4NT Shell from jp software
154
+ :4NTCWJars
155
+ for %%i in ("%M2_HOME%\boot\plexus-classworlds-*") do set CLASSWORLDS_JAR="%%i"
156
+ goto runm2
157
+
158
+ @REM Start MAVEN2
159
+ :runm2
160
+ set CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
161
+ %MAVEN_JAVA_EXE% %MAVEN_OPTS% -classpath %CLASSWORLDS_JAR% "-Dclassworlds.conf=%M2_HOME%\bin\m2.conf" "-Dmaven.home=%M2_HOME%" %CLASSWORLDS_LAUNCHER% %MAVEN_CMD_LINE_ARGS%
162
+ if ERRORLEVEL 1 goto error
163
+ goto end
164
+
165
+ :error
166
+ if "%OS%"=="Windows_NT" @endlocal
167
+ if "%OS%"=="WINNT" @endlocal
168
+ set ERROR_CODE=1
169
+
170
+ :end
171
+ @REM set local scope for the variables with windows NT shell
172
+ if "%OS%"=="Windows_NT" goto endNT
173
+ if "%OS%"=="WINNT" goto endNT
174
+
175
+ @REM For old DOS remove the set variables from ENV - we assume they were not set
176
+ @REM before we started - at least we don't leave any baggage around
177
+ set MAVEN_JAVA_EXE=
178
+ set MAVEN_CMD_LINE_ARGS=
179
+ goto postExec
180
+
181
+ :endNT
182
+ @endlocal & set ERROR_CODE=%ERROR_CODE%
183
+
184
+ :postExec
185
+
186
+ if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost
187
+ if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
188
+ :skipRcPost
189
+
190
+ @REM pause the batch file if MAVEN_BATCH_PAUSE is set to 'on'
191
+ if "%MAVEN_BATCH_PAUSE%" == "on" pause
192
+
193
+ if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
194
+
195
+ cmd /C exit /B %ERROR_CODE%
196
+
197
+
data/bin/mvnDebug ADDED
@@ -0,0 +1,177 @@
1
+ #!/bin/sh
2
+ # ----------------------------------------------------------------------------
3
+ # Licensed to the Apache Software Foundation (ASF) under one
4
+ # or more contributor license agreements. See the NOTICE file
5
+ # distributed with this work for additional information
6
+ # regarding copyright ownership. The ASF licenses this file
7
+ # to you under the Apache License, Version 2.0 (the
8
+ # "License"); you may not use this file except in compliance
9
+ # with the License. You may obtain a copy of the License at
10
+ #
11
+ # http://www.apache.org/licenses/LICENSE-2.0
12
+ #
13
+ # Unless required by applicable law or agreed to in writing,
14
+ # software distributed under the License is distributed on an
15
+ # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16
+ # KIND, either express or implied. See the License for the
17
+ # specific language governing permissions and limitations
18
+ # under the License.
19
+ # ----------------------------------------------------------------------------
20
+
21
+ # ----------------------------------------------------------------------------
22
+ # Maven2 Start Up Batch script
23
+ #
24
+ # Required ENV vars:
25
+ # ------------------
26
+ # JAVA_HOME - location of a JDK home dir
27
+ #
28
+ # Optional ENV vars
29
+ # -----------------
30
+ # M2_HOME - location of maven2's installed home dir
31
+ # MAVEN_OPTS - parameters passed to the Java VM when running Maven
32
+ # e.g. to debug Maven itself, use
33
+ # set MAVEN_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
34
+ # MAVEN_SKIP_RC - flag to disable loading of mavenrc files
35
+ # ----------------------------------------------------------------------------
36
+
37
+ MAVEN_DEBUG_OPTS="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000"
38
+
39
+ echo Preparing to Execute Maven in Debug Mode
40
+
41
+ if [ -z "$MAVEN_SKIP_RC" ] ; then
42
+
43
+ if [ -f /etc/mavenrc ] ; then
44
+ . /etc/mavenrc
45
+ fi
46
+
47
+ if [ -f "$HOME/.mavenrc" ] ; then
48
+ . "$HOME/.mavenrc"
49
+ fi
50
+
51
+ fi
52
+
53
+ # OS specific support. $var _must_ be set to either true or false.
54
+ cygwin=false;
55
+ darwin=false;
56
+ mingw=false
57
+ case "`uname`" in
58
+ CYGWIN*) cygwin=true ;;
59
+ MINGW*) mingw=true;;
60
+ Darwin*) darwin=true
61
+ if [ -z "$JAVA_VERSION" ] ; then
62
+ JAVA_VERSION="CurrentJDK"
63
+ fi
64
+ if [ -z "$JAVA_HOME" ] ; then
65
+ JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/${JAVA_VERSION}/Home
66
+ fi
67
+ ;;
68
+ esac
69
+
70
+ if [ -z "$JAVA_HOME" ] ; then
71
+ if [ -r /etc/gentoo-release ] ; then
72
+ JAVA_HOME=`java-config --jre-home`
73
+ fi
74
+ fi
75
+
76
+ if [ -z "$M2_HOME" ] ; then
77
+ ## resolve links - $0 may be a link to maven's home
78
+ PRG="$0"
79
+
80
+ # need this for relative symlinks
81
+ while [ -h "$PRG" ] ; do
82
+ ls=`ls -ld "$PRG"`
83
+ link=`expr "$ls" : '.*-> \(.*\)$'`
84
+ if expr "$link" : '/.*' > /dev/null; then
85
+ PRG="$link"
86
+ else
87
+ PRG="`dirname "$PRG"`/$link"
88
+ fi
89
+ done
90
+
91
+ saveddir=`pwd`
92
+
93
+ M2_HOME=`dirname "$PRG"`/..
94
+
95
+ # make it fully qualified
96
+ M2_HOME=`cd "$M2_HOME" && pwd`
97
+
98
+ cd "$saveddir"
99
+ # echo Using m2 at $M2_HOME
100
+ fi
101
+
102
+ # For Cygwin, ensure paths are in UNIX format before anything is touched
103
+ if $cygwin ; then
104
+ [ -n "$M2_HOME" ] &&
105
+ M2_HOME=`cygpath --unix "$M2_HOME"`
106
+ [ -n "$JAVA_HOME" ] &&
107
+ JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
108
+ [ -n "$CLASSPATH" ] &&
109
+ CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
110
+ fi
111
+
112
+ # For Migwn, ensure paths are in UNIX format before anything is touched
113
+ if $mingw ; then
114
+ [ -n "$M2_HOME" ] &&
115
+ M2_HOME="`(cd "$M2_HOME"; pwd)`"
116
+ [ -n "$JAVA_HOME" ] &&
117
+ JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
118
+ # TODO classpath?
119
+ fi
120
+
121
+ if [ -z "$JAVA_HOME" ]; then
122
+ javaExecutable="`which javac`"
123
+ if [ -n "$javaExecutable" -a ! "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
124
+ # readlink(1) is not available as standard on Solaris 10.
125
+ readLink=`which readlink`
126
+ if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then
127
+ javaExecutable="`readlink -f \"$javaExecutable\"`"
128
+ javaHome="`dirname \"$javaExecutable\"`"
129
+ javaHome=`expr "$javaHome" : '\(.*\)/bin'`
130
+ JAVA_HOME="$javaHome"
131
+ export JAVA_HOME
132
+ fi
133
+ fi
134
+ fi
135
+
136
+ if [ -z "$JAVACMD" ] ; then
137
+ if [ -n "$JAVA_HOME" ] ; then
138
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
139
+ # IBM's JDK on AIX uses strange locations for the executables
140
+ JAVACMD="$JAVA_HOME/jre/sh/java"
141
+ else
142
+ JAVACMD="$JAVA_HOME/bin/java"
143
+ fi
144
+ else
145
+ JAVACMD="`which java`"
146
+ fi
147
+ fi
148
+
149
+ if [ ! -x "$JAVACMD" ] ; then
150
+ echo "Error: JAVA_HOME is not defined correctly."
151
+ echo " We cannot execute $JAVACMD"
152
+ exit 1
153
+ fi
154
+
155
+ if [ -z "$JAVA_HOME" ] ; then
156
+ echo "Warning: JAVA_HOME environment variable is not set."
157
+ fi
158
+
159
+ CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
160
+
161
+ # For Cygwin, switch paths to Windows format before running java
162
+ if $cygwin; then
163
+ [ -n "$M2_HOME" ] &&
164
+ M2_HOME=`cygpath --path --windows "$M2_HOME"`
165
+ [ -n "$JAVA_HOME" ] &&
166
+ JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
167
+ [ -n "$CLASSPATH" ] &&
168
+ CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
169
+ fi
170
+
171
+ exec "$JAVACMD" \
172
+ $MAVEN_OPTS \
173
+ $MAVEN_DEBUG_OPTS \
174
+ -classpath "${M2_HOME}"/boot/plexus-classworlds-*.jar \
175
+ "-Dclassworlds.conf=${M2_HOME}/bin/m2.conf" \
176
+ "-Dmaven.home=${M2_HOME}" \
177
+ ${CLASSWORLDS_LAUNCHER} "$@"
data/bin/mvnDebug.bat ADDED
@@ -0,0 +1,200 @@
1
+ @REM ----------------------------------------------------------------------------
2
+ @REM Licensed to the Apache Software Foundation (ASF) under one
3
+ @REM or more contributor license agreements. See the NOTICE file
4
+ @REM distributed with this work for additional information
5
+ @REM regarding copyright ownership. The ASF licenses this file
6
+ @REM to you under the Apache License, Version 2.0 (the
7
+ @REM "License"); you may not use this file except in compliance
8
+ @REM with the License. You may obtain a copy of the License at
9
+ @REM
10
+ @REM http://www.apache.org/licenses/LICENSE-2.0
11
+ @REM
12
+ @REM Unless required by applicable law or agreed to in writing,
13
+ @REM software distributed under the License is distributed on an
14
+ @REM "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15
+ @REM KIND, either express or implied. See the License for the
16
+ @REM specific language governing permissions and limitations
17
+ @REM under the License.
18
+ @REM ----------------------------------------------------------------------------
19
+
20
+ @REM ----------------------------------------------------------------------------
21
+ @REM Maven2 Start Up Batch script
22
+ @REM
23
+ @REM Required ENV vars:
24
+ @REM JAVA_HOME - location of a JDK home dir
25
+ @REM
26
+ @REM Optional ENV vars
27
+ @REM M2_HOME - location of maven2's installed home dir
28
+ @REM MAVEN_BATCH_ECHO - set to 'on' to enable the echoing of the batch commands
29
+ @REM MAVEN_BATCH_PAUSE - set to 'on' to wait for a key stroke before ending
30
+ @REM MAVEN_OPTS - parameters passed to the Java VM when running Maven
31
+ @REM e.g. to debug Maven itself, use
32
+ @REM set MAVEN_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
33
+ @REM MAVEN_SKIP_RC - flag to disable loading of mavenrc files
34
+ @REM ----------------------------------------------------------------------------
35
+
36
+ @REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
37
+ @echo off
38
+ @REM enable echoing my setting MAVEN_BATCH_ECHO to 'on'
39
+ @if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO%
40
+
41
+ @echo Preparing to Execute Maven in Debug Mode
42
+
43
+ @REM set %HOME% to equivalent of $HOME
44
+ if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
45
+
46
+ @REM Execute a user defined script before this one
47
+ if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
48
+ if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
49
+ :skipRcPre
50
+
51
+ set ERROR_CODE=0
52
+
53
+ @REM set local scope for the variables with windows NT shell
54
+ if "%OS%"=="Windows_NT" @setlocal
55
+ if "%OS%"=="WINNT" @setlocal
56
+
57
+ set MAVEN_DEBUG_OPTS=-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
58
+
59
+ @REM ==== START VALIDATION ====
60
+ if not "%JAVA_HOME%" == "" goto OkJHome
61
+
62
+ echo.
63
+ echo ERROR: JAVA_HOME not found in your environment.
64
+ echo Please set the JAVA_HOME variable in your environment to match the
65
+ echo location of your Java installation
66
+ echo.
67
+ goto error
68
+
69
+ :OkJHome
70
+ if exist "%JAVA_HOME%\bin\java.exe" goto chkMHome
71
+
72
+ echo.
73
+ echo ERROR: JAVA_HOME is set to an invalid directory.
74
+ echo JAVA_HOME = "%JAVA_HOME%"
75
+ echo Please set the JAVA_HOME variable in your environment to match the
76
+ echo location of your Java installation
77
+ echo.
78
+ goto error
79
+
80
+ :chkMHome
81
+ if not "%M2_HOME%"=="" goto valMHome
82
+
83
+ if "%OS%"=="Windows_NT" SET "M2_HOME=%~dp0.."
84
+ if "%OS%"=="WINNT" SET "M2_HOME=%~dp0.."
85
+ if not "%M2_HOME%"=="" goto valMHome
86
+
87
+ echo.
88
+ echo ERROR: M2_HOME not found in your environment.
89
+ echo Please set the M2_HOME variable in your environment to match the
90
+ echo location of the Maven installation
91
+ echo.
92
+ goto error
93
+
94
+ :valMHome
95
+
96
+ :stripMHome
97
+ if not "_%M2_HOME:~-1%"=="_\" goto checkMBat
98
+ set "M2_HOME=%M2_HOME:~0,-1%"
99
+ goto stripMHome
100
+
101
+ :checkMBat
102
+ if exist "%M2_HOME%\bin\mvn.bat" goto init
103
+
104
+ echo.
105
+ echo ERROR: M2_HOME is set to an invalid directory.
106
+ echo M2_HOME = "%M2_HOME%"
107
+ echo Please set the M2_HOME variable in your environment to match the
108
+ echo location of the Maven installation
109
+ echo.
110
+ goto error
111
+ @REM ==== END VALIDATION ====
112
+
113
+ :init
114
+ @REM Decide how to startup depending on the version of windows
115
+
116
+ @REM -- Windows NT with Novell Login
117
+ if "%OS%"=="WINNT" goto WinNTNovell
118
+
119
+ @REM -- Win98ME
120
+ if NOT "%OS%"=="Windows_NT" goto Win9xArg
121
+
122
+ :WinNTNovell
123
+
124
+ @REM -- 4NT shell
125
+ if "%@eval[2+2]" == "4" goto 4NTArgs
126
+
127
+ @REM -- Regular WinNT shell
128
+ set MAVEN_CMD_LINE_ARGS=%*
129
+ goto endInit
130
+
131
+ @REM The 4NT Shell from jp software
132
+ :4NTArgs
133
+ set MAVEN_CMD_LINE_ARGS=%$
134
+ goto endInit
135
+
136
+ :Win9xArg
137
+ @REM Slurp the command line arguments. This loop allows for an unlimited number
138
+ @REM of agruments (up to the command line limit, anyway).
139
+ set MAVEN_CMD_LINE_ARGS=
140
+ :Win9xApp
141
+ if %1a==a goto endInit
142
+ set MAVEN_CMD_LINE_ARGS=%MAVEN_CMD_LINE_ARGS% %1
143
+ shift
144
+ goto Win9xApp
145
+
146
+ @REM Reaching here means variables are defined and arguments have been captured
147
+ :endInit
148
+ SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
149
+
150
+ @REM -- 4NT shell
151
+ if "%@eval[2+2]" == "4" goto 4NTCWJars
152
+
153
+ @REM -- Regular WinNT shell
154
+ for %%i in ("%M2_HOME%"\boot\plexus-classworlds-*) do set CLASSWORLDS_JAR="%%i"
155
+ goto runm2
156
+
157
+ @REM The 4NT Shell from jp software
158
+ :4NTCWJars
159
+ for %%i in ("%M2_HOME%\boot\plexus-classworlds-*") do set CLASSWORLDS_JAR="%%i"
160
+ goto runm2
161
+
162
+ @REM Start MAVEN2
163
+ :runm2
164
+ set CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
165
+ %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%
166
+ if ERRORLEVEL 1 goto error
167
+ goto end
168
+
169
+ :error
170
+ if "%OS%"=="Windows_NT" @endlocal
171
+ if "%OS%"=="WINNT" @endlocal
172
+ set ERROR_CODE=1
173
+
174
+ :end
175
+ @REM set local scope for the variables with windows NT shell
176
+ if "%OS%"=="Windows_NT" goto endNT
177
+ if "%OS%"=="WINNT" goto endNT
178
+
179
+ @REM For old DOS remove the set variables from ENV - we assume they were not set
180
+ @REM before we started - at least we don't leave any baggage around
181
+ set MAVEN_JAVA_EXE=
182
+ set MAVEN_CMD_LINE_ARGS=
183
+ goto postExec
184
+
185
+ :endNT
186
+ @endlocal & set ERROR_CODE=%ERROR_CODE%
187
+
188
+ :postExec
189
+
190
+ if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost
191
+ if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
192
+ :skipRcPost
193
+
194
+ @REM pause the batch file if MAVEN_BATCH_PAUSE is set to 'on'
195
+ if "%MAVEN_BATCH_PAUSE%" == "on" pause
196
+
197
+ if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
198
+
199
+ exit /B %ERROR_CODE%
200
+