Skip to content

Commit 6843c6f

Browse files
authored
Merge pull request #21 from hazendaz/master
Update maven wrapper and mybatis-parent
2 parents 85125b0 + e8af3e7 commit 6843c6f

File tree

5 files changed

+66
-122
lines changed

5 files changed

+66
-122
lines changed

.mvn/wrapper/maven-wrapper.jar

-1.85 KB
Binary file not shown.

.mvn/wrapper/maven-wrapper.properties

Lines changed: 1 addition & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1 @@
1-
#
2-
# Copyright 2015-2016 the original author or authors.
3-
#
4-
# Licensed under the Apache License, Version 2.0 (the "License");
5-
# you may not use this file except in compliance with the License.
6-
# You may obtain a copy of the License at
7-
#
8-
# https://www.apache.org/licenses/LICENSE-2.0
9-
#
10-
# Unless required by applicable law or agreed to in writing, software
11-
# distributed under the License is distributed on an "AS IS" BASIS,
12-
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
# See the License for the specific language governing permissions and
14-
# limitations under the License.
15-
#
16-
17-
distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.3.9/apache-maven-3.3.9-bin.zip
1+
distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.5.0/apache-maven-3.5.0-bin.zip

mvnw

Lines changed: 45 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
# "License"); you may not use this file except in compliance
99
# with the License. You may obtain a copy of the License at
1010
#
11-
# https://www.apache.org/licenses/LICENSE-2.0
11+
# http://www.apache.org/licenses/LICENSE-2.0
1212
#
1313
# Unless required by applicable law or agreed to in writing,
1414
# software distributed under the License is distributed on an
@@ -54,38 +54,16 @@ case "`uname`" in
5454
CYGWIN*) cygwin=true ;;
5555
MINGW*) mingw=true;;
5656
Darwin*) darwin=true
57-
#
58-
# Look for the Apple JDKs first to preserve the existing behaviour, and then look
59-
# for the new JDKs provided by Oracle.
60-
#
61-
if [ -z "$JAVA_HOME" ] && [ -L /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK ] ; then
62-
#
63-
# Apple JDKs
64-
#
65-
export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home
66-
fi
67-
68-
if [ -z "$JAVA_HOME" ] && [ -L /System/Library/Java/JavaVirtualMachines/CurrentJDK ] ; then
69-
#
70-
# Apple JDKs
71-
#
72-
export JAVA_HOME=/System/Library/Java/JavaVirtualMachines/CurrentJDK/Contents/Home
73-
fi
74-
75-
if [ -z "$JAVA_HOME" ] && [ -L "/Library/Java/JavaVirtualMachines/CurrentJDK" ] ; then
76-
#
77-
# Oracle JDKs
78-
#
79-
export JAVA_HOME=/Library/Java/JavaVirtualMachines/CurrentJDK/Contents/Home
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
88-
;;
57+
# Use /usr/libexec/java_home if available, otherwise fall back to /Library/Java/Home
58+
# See https://developer.apple.com/library/mac/qa/qa1170/_index.html
59+
if [ -z "$JAVA_HOME" ]; then
60+
if [ -x "/usr/libexec/java_home" ]; then
61+
export JAVA_HOME="`/usr/libexec/java_home`"
62+
else
63+
export JAVA_HOME="/Library/Java/Home"
64+
fi
65+
fi
66+
;;
8967
esac
9068

9169
if [ -z "$JAVA_HOME" ] ; then
@@ -184,27 +162,28 @@ fi
184162

185163
CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
186164

187-
# For Cygwin, switch paths to Windows format before running java
188-
if $cygwin; then
189-
[ -n "$M2_HOME" ] &&
190-
M2_HOME=`cygpath --path --windows "$M2_HOME"`
191-
[ -n "$JAVA_HOME" ] &&
192-
JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
193-
[ -n "$CLASSPATH" ] &&
194-
CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
195-
fi
196-
197165
# traverses directory structure from process work directory to filesystem root
198166
# first directory with .mvn subdirectory is considered project base directory
199167
find_maven_basedir() {
200-
local basedir=$(pwd)
201-
local wdir=$(pwd)
168+
169+
if [ -z "$1" ]
170+
then
171+
echo "Path not specified to find_maven_basedir"
172+
return 1
173+
fi
174+
175+
basedir="$1"
176+
wdir="$1"
202177
while [ "$wdir" != '/' ] ; do
203-
wdir=$(cd "$wdir/.."; pwd)
204178
if [ -d "$wdir"/.mvn ] ; then
205179
basedir=$wdir
206180
break
207181
fi
182+
# workaround for JBEAP-8937 (on Solaris 10/Sparc)
183+
if [ -d "${wdir}" ]; then
184+
wdir=`cd "$wdir/.."; pwd`
185+
fi
186+
# end of workaround
208187
done
209188
echo "${basedir}"
210189
}
@@ -216,19 +195,31 @@ concat_lines() {
216195
fi
217196
}
218197

219-
export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-$(find_maven_basedir)}
198+
BASE_DIR=`find_maven_basedir "$(pwd)"`
199+
if [ -z "$BASE_DIR" ]; then
200+
exit 1;
201+
fi
202+
203+
export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}
204+
echo $MAVEN_PROJECTBASEDIR
220205
MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
221206

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
207+
# For Cygwin, switch paths to Windows format before running java
208+
if $cygwin; then
209+
[ -n "$M2_HOME" ] &&
210+
M2_HOME=`cygpath --path --windows "$M2_HOME"`
211+
[ -n "$JAVA_HOME" ] &&
212+
JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
213+
[ -n "$CLASSPATH" ] &&
214+
CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
215+
[ -n "$MAVEN_PROJECTBASEDIR" ] &&
216+
MAVEN_PROJECTBASEDIR=`cygpath --path --windows "$MAVEN_PROJECTBASEDIR"`
217+
fi
226218

227219
WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
228220

229221
exec "$JAVACMD" \
230222
$MAVEN_OPTS \
231-
-classpath "./.mvn/wrapper/maven-wrapper.jar" \
223+
-classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
232224
"-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
233-
${WRAPPER_LAUNCHER} "$@"
234-
225+
${WRAPPER_LAUNCHER} $MAVEN_CONFIG "$@"

mvnw.bat renamed to mvnw.cmd

Lines changed: 19 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
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
19
@REM
2-
@REM Copyright 2015-2016 the original author or authors.
3-
@REM
4-
@REM Licensed under the Apache License, Version 2.0 (the "License");
5-
@REM you may not use this file except in compliance with the License.
6-
@REM You may obtain a copy of the License at
7-
@REM
8-
@REM https://www.apache.org/licenses/LICENSE-2.0
9-
@REM
10-
@REM Unless required by applicable law or agreed to in writing, software
11-
@REM distributed under the License is distributed on an "AS IS" BASIS,
12-
@REM WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13-
@REM See the License for the specific language governing permissions and
14-
@REM limitations under the License.
10+
@REM http://www.apache.org/licenses/LICENSE-2.0
1511
@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 ----------------------------------------------------------------------------
1619

1720
@REM ----------------------------------------------------------------------------
1821
@REM Maven2 Start Up Batch script
@@ -63,7 +66,7 @@ echo.
6366
goto error
6467

6568
:OkJHome
66-
if exist "%JAVA_HOME%\bin\java.exe" goto chkMHome
69+
if exist "%JAVA_HOME%\bin\java.exe" goto init
6770

6871
echo.
6972
echo Error: JAVA_HOME is set to an invalid directory. >&2
@@ -73,42 +76,10 @@ echo location of your Java installation. >&2
7376
echo.
7477
goto error
7578

76-
:chkMHome
77-
if not "%M2_HOME%"=="" goto valMHome
78-
79-
SET "M2_HOME=%~dp0.."
80-
if not "%M2_HOME%"=="" goto valMHome
81-
82-
echo.
83-
echo Error: M2_HOME not found in your environment. >&2
84-
echo Please set the M2_HOME variable in your environment to match the >&2
85-
echo location of the Maven installation. >&2
86-
echo.
87-
goto error
88-
89-
:valMHome
90-
91-
:stripMHome
92-
if not "_%M2_HOME:~-1%"=="_\" goto checkMCmd
93-
set "M2_HOME=%M2_HOME:~0,-1%"
94-
goto stripMHome
95-
96-
:checkMCmd
97-
if exist "%M2_HOME%\bin\mvn.cmd" goto init
98-
99-
echo.
100-
echo Error: M2_HOME is set to an invalid directory. >&2
101-
echo M2_HOME = "%M2_HOME%" >&2
102-
echo Please set the M2_HOME variable in your environment to match the >&2
103-
echo location of the Maven installation >&2
104-
echo.
105-
goto error
10679
@REM ==== END VALIDATION ====
10780

10881
:init
10982

110-
set MAVEN_CMD_LINE_ARGS=%*
111-
11283
@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
11384
@REM Fallback to current working directory if not found.
11485

@@ -145,12 +116,10 @@ for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do s
145116

146117
SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
147118

148-
for %%i in ("%M2_HOME%"\boot\plexus-classworlds-*) do set CLASSWORLDS_JAR="%%i"
149-
150-
set WRAPPER_JAR="".\.mvn\wrapper\maven-wrapper.jar""
119+
set WRAPPER_JAR="%MAVEN_PROJECTBASEDIR%\.mvn\wrapper\maven-wrapper.jar"
151120
set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
152121

153-
%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.home=%M2_HOME%" "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CMD_LINE_ARGS%
122+
%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CONFIG% %*
154123
if ERRORLEVEL 1 goto error
155124
goto end
156125

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
<parent>
2323
<groupId>org.mybatis</groupId>
2424
<artifactId>mybatis-parent</artifactId>
25-
<version>28</version>
25+
<version>29-SNAPSHOT</version>
2626
<relativePath />
2727
</parent>
2828

0 commit comments

Comments
 (0)