ruby-maven-libs 3.1.1 → 3.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (123) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +22 -0
  3. data/lib/maven.rb +44 -0
  4. data/maven-home/LICENSE +305 -0
  5. data/{NOTICE → maven-home/NOTICE} +1 -1
  6. data/{README.txt → maven-home/README.txt} +13 -11
  7. data/{bin → maven-home/bin}/m2.conf +1 -1
  8. data/{bin/mvnyjp → maven-home/bin/mvn} +49 -23
  9. data/{bin/mvn.bat → maven-home/bin/mvn.cmd} +62 -82
  10. data/maven-home/bin/mvnDebug +41 -0
  11. data/maven-home/bin/mvnDebug.cmd +31 -0
  12. data/maven-home/bin/mvnyjp +42 -0
  13. data/maven-home/boot/plexus-classworlds-2.5.2.jar +0 -0
  14. data/{conf → maven-home/conf}/logging/simplelogger.properties +0 -0
  15. data/{conf → maven-home/conf}/settings.xml +13 -13
  16. data/maven-home/conf/toolchains.xml +103 -0
  17. data/maven-home/lib/aether-api-1.0.2.v20150114.jar +0 -0
  18. data/{lib → maven-home/lib}/aether-api.license +0 -0
  19. data/maven-home/lib/aether-connector-basic-1.0.2.v20150114.jar +0 -0
  20. data/{lib/aether-connector-wagon.license → maven-home/lib/aether-connector-basic.license} +0 -0
  21. data/maven-home/lib/aether-impl-1.0.2.v20150114.jar +0 -0
  22. data/{lib → maven-home/lib}/aether-impl.license +0 -0
  23. data/maven-home/lib/aether-spi-1.0.2.v20150114.jar +0 -0
  24. data/{lib → maven-home/lib}/aether-spi.license +0 -0
  25. data/maven-home/lib/aether-transport-wagon-1.0.2.v20150114.jar +0 -0
  26. data/{lib/aether-util.license → maven-home/lib/aether-transport-wagon.license} +0 -0
  27. data/{lib/aether-util-0.9.0.M2.jar → maven-home/lib/aether-util-1.0.2.v20150114.jar} +0 -0
  28. data/{lib/org.eclipse.sisu.inject.license → maven-home/lib/aether-util.license} +0 -0
  29. data/{lib → maven-home/lib}/aopalliance-1.0.jar +0 -0
  30. data/{lib → maven-home/lib}/cdi-api-1.0.jar +0 -0
  31. data/maven-home/lib/cdi-api.license +389 -0
  32. data/{lib → maven-home/lib}/commons-cli-1.2.jar +0 -0
  33. data/maven-home/lib/commons-io-2.2.jar +0 -0
  34. data/maven-home/lib/commons-lang-2.6.jar +0 -0
  35. data/{lib → maven-home/lib}/ext/README.txt +0 -0
  36. data/maven-home/lib/guava-18.0.jar +0 -0
  37. data/{lib → maven-home/lib}/javax.inject-1.jar +0 -0
  38. data/maven-home/lib/jsoup-1.7.2.jar +0 -0
  39. data/maven-home/lib/jsoup.license +65 -0
  40. data/{lib → maven-home/lib}/jsr250-api-1.0.jar +0 -0
  41. data/{lib → maven-home/lib}/jsr250-api.license +0 -0
  42. data/maven-home/lib/maven-aether-provider-3.3.3.jar +0 -0
  43. data/{LICENSE → maven-home/lib/maven-aether-provider.license} +0 -49
  44. data/maven-home/lib/maven-artifact-3.3.3.jar +0 -0
  45. data/maven-home/lib/maven-artifact.license +202 -0
  46. data/maven-home/lib/maven-builder-support-3.3.3.jar +0 -0
  47. data/maven-home/lib/maven-builder-support.license +202 -0
  48. data/maven-home/lib/maven-compat-3.3.3.jar +0 -0
  49. data/maven-home/lib/maven-compat.license +202 -0
  50. data/maven-home/lib/maven-core-3.3.3.jar +0 -0
  51. data/maven-home/lib/maven-core.license +202 -0
  52. data/maven-home/lib/maven-embedder-3.3.3.jar +0 -0
  53. data/maven-home/lib/maven-embedder.license +202 -0
  54. data/maven-home/lib/maven-model-3.3.3.jar +0 -0
  55. data/maven-home/lib/maven-model-builder-3.3.3.jar +0 -0
  56. data/maven-home/lib/maven-model-builder.license +202 -0
  57. data/maven-home/lib/maven-model.license +202 -0
  58. data/maven-home/lib/maven-plugin-api-3.3.3.jar +0 -0
  59. data/maven-home/lib/maven-plugin-api.license +202 -0
  60. data/maven-home/lib/maven-repository-metadata-3.3.3.jar +0 -0
  61. data/maven-home/lib/maven-repository-metadata.license +202 -0
  62. data/maven-home/lib/maven-settings-3.3.3.jar +0 -0
  63. data/maven-home/lib/maven-settings-builder-3.3.3.jar +0 -0
  64. data/maven-home/lib/maven-settings-builder.license +202 -0
  65. data/maven-home/lib/maven-settings.license +202 -0
  66. data/maven-home/lib/org.eclipse.sisu.inject-0.3.0.jar +0 -0
  67. data/{lib/org.eclipse.sisu.plexus.license → maven-home/lib/org.eclipse.sisu.inject.license} +0 -0
  68. data/maven-home/lib/org.eclipse.sisu.plexus-0.3.0.jar +0 -0
  69. data/maven-home/lib/org.eclipse.sisu.plexus.license +261 -0
  70. data/{lib → maven-home/lib}/plexus-cipher-1.7.jar +0 -0
  71. data/maven-home/lib/plexus-cipher.license +389 -0
  72. data/{lib → maven-home/lib}/plexus-component-annotations-1.5.5.jar +0 -0
  73. data/{lib/plexus-interpolation-1.19.jar → maven-home/lib/plexus-interpolation-1.21.jar} +0 -0
  74. data/{lib → maven-home/lib}/plexus-sec-dispatcher-1.3.jar +0 -0
  75. data/maven-home/lib/plexus-sec-dispatcher.license +389 -0
  76. data/maven-home/lib/plexus-utils-3.0.20.jar +0 -0
  77. data/maven-home/lib/sisu-guice-3.2.5-no_aop.jar +0 -0
  78. data/{lib → maven-home/lib}/slf4j-api-1.7.5.jar +0 -0
  79. data/{lib → maven-home/lib}/slf4j-api.license +28 -10
  80. data/{lib → maven-home/lib}/slf4j-simple-1.7.5.jar +0 -0
  81. data/{lib → maven-home/lib}/slf4j-simple.license +28 -10
  82. data/maven-home/lib/wagon-file-2.9.jar +0 -0
  83. data/maven-home/lib/wagon-file.license +202 -0
  84. data/maven-home/lib/wagon-http-2.9-shaded.jar +0 -0
  85. data/maven-home/lib/wagon-http-shared-2.9.jar +0 -0
  86. data/maven-home/lib/wagon-http-shared.license +202 -0
  87. data/maven-home/lib/wagon-http.license +202 -0
  88. data/maven-home/lib/wagon-provider-api-2.9.jar +0 -0
  89. data/maven-home/lib/wagon-provider-api.license +202 -0
  90. metadata +96 -71
  91. data/bin/mvn +0 -190
  92. data/bin/mvnDebug +0 -195
  93. data/bin/mvnDebug.bat +0 -199
  94. data/boot/plexus-classworlds-2.5.1.jar +0 -0
  95. data/lib/aether-api-0.9.0.M2.jar +0 -0
  96. data/lib/aether-connector-wagon-0.9.0.M2.jar +0 -0
  97. data/lib/aether-impl-0.9.0.M2.jar +0 -0
  98. data/lib/aether-spi-0.9.0.M2.jar +0 -0
  99. data/lib/cdi-api.license +0 -427
  100. data/lib/guava-11.0.2.jar +0 -0
  101. data/lib/jsr305-1.3.9.jar +0 -0
  102. data/lib/maven-aether-provider-3.1.1.jar +0 -0
  103. data/lib/maven-artifact-3.1.1.jar +0 -0
  104. data/lib/maven-compat-3.1.1.jar +0 -0
  105. data/lib/maven-core-3.1.1.jar +0 -0
  106. data/lib/maven-embedder-3.1.1.jar +0 -0
  107. data/lib/maven-model-3.1.1.jar +0 -0
  108. data/lib/maven-model-builder-3.1.1.jar +0 -0
  109. data/lib/maven-plugin-api-3.1.1.jar +0 -0
  110. data/lib/maven-repository-metadata-3.1.1.jar +0 -0
  111. data/lib/maven-settings-3.1.1.jar +0 -0
  112. data/lib/maven-settings-builder-3.1.1.jar +0 -0
  113. data/lib/org.eclipse.sisu.inject-0.0.0.M5.jar +0 -0
  114. data/lib/org.eclipse.sisu.plexus-0.0.0.M5.jar +0 -0
  115. data/lib/plexus-cipher.license +0 -427
  116. data/lib/plexus-sec-dispatcher.license +0 -427
  117. data/lib/plexus-utils-3.0.15.jar +0 -0
  118. data/lib/sisu-guice-3.1.3-no_aop.jar +0 -0
  119. data/lib/wagon-file-2.4.jar +0 -0
  120. data/lib/wagon-http-2.4-shaded.jar +0 -0
  121. data/lib/wagon-provider-api-2.4.jar +0 -0
  122. data/ruby/maven.rb +0 -34
  123. data/ruby/maven.rb~ +0 -30
@@ -5,4 +5,4 @@ set maven.home default ${user.home}/m2
5
5
  [plexus.core]
6
6
  optionally ${maven.home}/lib/ext/*.jar
7
7
  load ${maven.home}/lib/*.jar
8
- load ${maven.home}/conf/logging
8
+ load ${maven.home}/conf/logging
@@ -34,14 +34,6 @@
34
34
  # MAVEN_SKIP_RC - flag to disable loading of mavenrc files
35
35
  # ----------------------------------------------------------------------------
36
36
 
37
- QUOTED_ARGS=""
38
- while [ "$1" != "" ] ; do
39
-
40
- QUOTED_ARGS="$QUOTED_ARGS \"$1\""
41
- shift
42
-
43
- done
44
-
45
37
  if [ -z "$MAVEN_SKIP_RC" ] ; then
46
38
 
47
39
  if [ -f /etc/mavenrc ] ; then
@@ -66,26 +58,33 @@ case "`uname`" in
66
58
  # Look for the Apple JDKs first to preserve the existing behaviour, and then look
67
59
  # for the new JDKs provided by Oracle.
68
60
  #
69
- if [[ -z "$JAVA_HOME" && -L /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK ]] ; then
61
+ if [ -z "$JAVA_HOME" ] && [ -L /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK ] ; then
70
62
  #
71
63
  # Apple JDKs
72
64
  #
73
65
  export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home
74
66
  fi
75
67
 
76
- if [[ -z "$JAVA_HOME" && -L /System/Library/Java/JavaVirtualMachines/CurrentJDK ]] ; then
68
+ if [ -z "$JAVA_HOME" ] && [ -L /System/Library/Java/JavaVirtualMachines/CurrentJDK ] ; then
77
69
  #
78
70
  # Apple JDKs
79
71
  #
80
72
  export JAVA_HOME=/System/Library/Java/JavaVirtualMachines/CurrentJDK/Contents/Home
81
73
  fi
82
74
 
83
- if [[ -z "$JAVA_HOME" && -L "/Library/Java/JavaVirtualMachines/CurrentJDK" ]] ; then
75
+ if [ -z "$JAVA_HOME" ] && [ -L "/Library/Java/JavaVirtualMachines/CurrentJDK" ] ; then
84
76
  #
85
77
  # Oracle JDKs
86
78
  #
87
79
  export JAVA_HOME=/Library/Java/JavaVirtualMachines/CurrentJDK/Contents/Home
88
80
  fi
81
+
82
+ if [ -z "$JAVA_HOME" ] && [ -x "/usr/libexec/java_home" ]; then
83
+ #
84
+ # Apple JDKs
85
+ #
86
+ export JAVA_HOME=`/usr/libexec/java_home`
87
+ fi
89
88
  ;;
90
89
  esac
91
90
 
@@ -142,11 +141,16 @@ fi
142
141
 
143
142
  if [ -z "$JAVA_HOME" ]; then
144
143
  javaExecutable="`which javac`"
145
- if [ -n "$javaExecutable" -a ! "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
144
+ if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
146
145
  # readlink(1) is not available as standard on Solaris 10.
147
146
  readLink=`which readlink`
148
147
  if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then
149
- javaExecutable="`readlink -f \"$javaExecutable\"`"
148
+ if $darwin ; then
149
+ javaHome="`dirname \"$javaExecutable\"`"
150
+ javaExecutable="`cd \"$javaHome\" && pwd -P`/javac"
151
+ else
152
+ javaExecutable="`readlink -f \"$javaExecutable\"`"
153
+ fi
150
154
  javaHome="`dirname \"$javaExecutable\"`"
151
155
  javaHome=`expr "$javaHome" : '\(.*\)/bin'`
152
156
  JAVA_HOME="$javaHome"
@@ -169,8 +173,8 @@ if [ -z "$JAVACMD" ] ; then
169
173
  fi
170
174
 
171
175
  if [ ! -x "$JAVACMD" ] ; then
172
- echo "Error: JAVA_HOME is not defined correctly."
173
- echo " We cannot execute $JAVACMD"
176
+ echo "Error: JAVA_HOME is not defined correctly." >&2
177
+ echo " We cannot execute $JAVACMD" >&2
174
178
  exit 1
175
179
  fi
176
180
 
@@ -190,17 +194,39 @@ if $cygwin; then
190
194
  CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
191
195
  fi
192
196
 
193
- if [ ! -f "$YJPLIB" ]; then
194
- echo "Unable to autodetect the YJP library location. Please set YJPLIB variable"
195
- exit 1
196
- fi
197
+ # traverses directory structure from process work directory to filesystem root
198
+ # first directory with .mvn subdirectory is considered project base directory
199
+ find_maven_basedir() {
200
+ local basedir=$(pwd)
201
+ local wdir=$(pwd)
202
+ while [ "$wdir" != '/' ] ; do
203
+ wdir=$(cd "$wdir/.."; pwd)
204
+ if [ -d "$wdir"/.mvn ] ; then
205
+ basedir=$wdir
206
+ break
207
+ fi
208
+ done
209
+ echo "${basedir}"
210
+ }
197
211
 
198
- MAVEN_OPTS="-agentpath:$YJPLIB=onexit=snapshot,onexit=memory,tracing,onlylocal $MAVEN_OPTS"
212
+ # concatenates all lines of a file
213
+ concat_lines() {
214
+ if [ -f "$1" ]; then
215
+ echo "$(tr -s '\n' ' ' < "$1")"
216
+ fi
217
+ }
218
+
219
+ export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-$(find_maven_basedir)}
220
+ MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
221
+
222
+ # Provide a "standardized" way to retrieve the CLI args that will
223
+ # work with both Windows and non-Windows executions.
224
+ MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@"
225
+ export MAVEN_CMD_LINE_ARGS
199
226
 
200
227
  exec "$JAVACMD" \
201
228
  $MAVEN_OPTS \
202
229
  -classpath "${M2_HOME}"/boot/plexus-classworlds-*.jar \
203
230
  "-Dclassworlds.conf=${M2_HOME}/bin/m2.conf" \
204
- "-Dmaven.home=${M2_HOME}" \
205
- ${CLASSWORLDS_LAUNCHER} $QUOTED_ARGS
206
-
231
+ "-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
232
+ ${CLASSWORLDS_LAUNCHER} "$@"
@@ -43,22 +43,25 @@ if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
43
43
 
44
44
  @REM Execute a user defined script before this one
45
45
  if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
46
+ @REM check for pre script, once with legacy .bat ending and once with .cmd ending
46
47
  if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
48
+ if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd"
47
49
  :skipRcPre
48
50
 
51
+ @setlocal
52
+
49
53
  set ERROR_CODE=0
50
54
 
51
- @REM set local scope for the variables with windows NT shell
52
- if "%OS%"=="Windows_NT" @setlocal
53
- if "%OS%"=="WINNT" @setlocal
55
+ @REM To isolate internal variables from possible post scripts, we use another setlocal
56
+ @setlocal
54
57
 
55
58
  @REM ==== START VALIDATION ====
56
59
  if not "%JAVA_HOME%" == "" goto OkJHome
57
60
 
58
61
  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 Error: JAVA_HOME not found in your environment. >&2
63
+ echo Please set the JAVA_HOME variable in your environment to match the >&2
64
+ echo location of your Java installation. >&2
62
65
  echo.
63
66
  goto error
64
67
 
@@ -66,131 +69,108 @@ goto error
66
69
  if exist "%JAVA_HOME%\bin\java.exe" goto chkMHome
67
70
 
68
71
  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
72
+ echo Error: JAVA_HOME is set to an invalid directory. >&2
73
+ echo JAVA_HOME = "%JAVA_HOME%" >&2
74
+ echo Please set the JAVA_HOME variable in your environment to match the >&2
75
+ echo location of your Java installation. >&2
73
76
  echo.
74
77
  goto error
75
78
 
76
79
  :chkMHome
77
80
  if not "%M2_HOME%"=="" goto valMHome
78
81
 
79
- if "%OS%"=="Windows_NT" SET "M2_HOME=%~dp0.."
80
- if "%OS%"=="WINNT" SET "M2_HOME=%~dp0.."
82
+ SET "M2_HOME=%~dp0.."
81
83
  if not "%M2_HOME%"=="" goto valMHome
82
84
 
83
85
  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
86
+ echo Error: M2_HOME not found in your environment. >&2
87
+ echo Please set the M2_HOME variable in your environment to match the >&2
88
+ echo location of the Maven installation. >&2
87
89
  echo.
88
90
  goto error
89
91
 
90
92
  :valMHome
91
93
 
92
94
  :stripMHome
93
- if not "_%M2_HOME:~-1%"=="_\" goto checkMBat
95
+ if not "_%M2_HOME:~-1%"=="_\" goto checkMCmd
94
96
  set "M2_HOME=%M2_HOME:~0,-1%"
95
97
  goto stripMHome
96
98
 
97
- :checkMBat
98
- if exist "%M2_HOME%\bin\mvn.bat" goto init
99
+ :checkMCmd
100
+ if exist "%M2_HOME%\bin\mvn.cmd" goto init
99
101
 
100
102
  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
103
+ echo Error: M2_HOME is set to an invalid directory. >&2
104
+ echo M2_HOME = "%M2_HOME%" >&2
105
+ echo Please set the M2_HOME variable in your environment to match the >&2
106
+ echo location of the Maven installation >&2
105
107
  echo.
106
108
  goto error
107
109
  @REM ==== END VALIDATION ====
108
110
 
109
111
  :init
110
- @REM Decide how to startup depending on the version of windows
111
112
 
112
- @REM -- Windows NT with Novell Login
113
- if "%OS%"=="WINNT" goto WinNTNovell
113
+ set MAVEN_CMD_LINE_ARGS=%*
114
114
 
115
- @REM -- Win98ME
116
- if NOT "%OS%"=="Windows_NT" goto Win9xArg
115
+ @REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
116
+ @REM Fallback to current working directory if not found.
117
117
 
118
- :WinNTNovell
118
+ set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
119
+ IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
119
120
 
120
- @REM -- 4NT shell
121
- if "%@eval[2+2]" == "4" goto 4NTArgs
121
+ set EXEC_DIR=%CD%
122
+ set WDIR=%EXEC_DIR%
123
+ :findBaseDir
124
+ IF EXIST "%WDIR%"\.mvn goto baseDirFound
125
+ cd ..
126
+ IF "%WDIR%"=="%CD%" goto baseDirNotFound
127
+ set WDIR=%CD%
128
+ goto findBaseDir
122
129
 
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"
130
+ :baseDirFound
131
+ set MAVEN_PROJECTBASEDIR=%WDIR%
132
+ cd "%EXEC_DIR%"
133
+ goto endDetectBaseDir
145
134
 
146
- @REM -- 4NT shell
147
- if "%@eval[2+2]" == "4" goto 4NTCWJars
135
+ :baseDirNotFound
136
+ set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
137
+ cd "%EXEC_DIR%"
148
138
 
149
- @REM -- Regular WinNT shell
150
- for %%i in ("%M2_HOME%"\boot\plexus-classworlds-*) do set CLASSWORLDS_JAR="%%i"
151
- goto runm2
139
+ :endDetectBaseDir
140
+
141
+ IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
142
+
143
+ @setlocal EnableExtensions EnableDelayedExpansion
144
+ for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
145
+ @endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
146
+
147
+ :endReadAdditionalConfig
152
148
 
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
149
+ SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
150
+
151
+ for %%i in ("%M2_HOME%"\boot\plexus-classworlds-*) do set CLASSWORLDS_JAR="%%i"
157
152
 
158
- @REM Start MAVEN2
159
- :runm2
160
153
  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%
154
+
155
+ %MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %CLASSWORLDS_JAR% "-Dclassworlds.conf=%M2_HOME%\bin\m2.conf" "-Dmaven.home=%M2_HOME%" "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %CLASSWORLDS_LAUNCHER% %MAVEN_CMD_LINE_ARGS%
162
156
  if ERRORLEVEL 1 goto error
163
157
  goto end
164
158
 
165
159
  :error
166
- if "%OS%"=="Windows_NT" @endlocal
167
- if "%OS%"=="WINNT" @endlocal
168
160
  set ERROR_CODE=1
169
161
 
170
162
  :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
163
  @endlocal & set ERROR_CODE=%ERROR_CODE%
183
164
 
184
- :postExec
185
-
186
165
  if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost
166
+ @REM check for post script, once with legacy .bat ending and once with .cmd ending
187
167
  if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
168
+ if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd"
188
169
  :skipRcPost
189
170
 
190
- @REM pause the batch file if MAVEN_BATCH_PAUSE is set to 'on'
171
+ @REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
191
172
  if "%MAVEN_BATCH_PAUSE%" == "on" pause
192
173
 
193
174
  if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
194
175
 
195
- cmd /C exit /B %ERROR_CODE%
196
-
176
+ exit /B %ERROR_CODE%
@@ -0,0 +1,41 @@
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 -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 -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000"
38
+
39
+ echo Preparing to Execute Maven in Debug Mode
40
+
41
+ env MAVEN_OPTS="$MAVEN_OPTS $MAVEN_DEBUG_OPTS" $(dirname $0)/mvn "$@"
@@ -0,0 +1,31 @@
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 to run mvn.cmd with the following additional
22
+ @REM Java VM settings:
23
+ @REM
24
+ @REM -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
25
+ @REM
26
+ @REM ----------------------------------------------------------------------------
27
+
28
+ @setlocal
29
+ @set MAVEN_DEBUG_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
30
+
31
+ @call "%~dp0"mvn.cmd %*
@@ -0,0 +1,42 @@
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 -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
34
+ # MAVEN_SKIP_RC - flag to disable loading of mavenrc files
35
+ # ----------------------------------------------------------------------------
36
+
37
+ if [ ! -f "$YJPLIB" ]; then
38
+ echo "Error: Unable to autodetect the YJP library location. Please set YJPLIB variable" >&2
39
+ exit 1
40
+ fi
41
+
42
+ env MAVEN_OPTS="-agentpath:$YJPLIB=onexit=snapshot,onexit=memory,tracing,onlylocal $MAVEN_OPTS" $(dirname $0)/mvn "$@"