Skip to content
This repository was archived by the owner on May 31, 2022. It is now read-only.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 3b2e212

Browse files
committedMay 13, 2016
Add Maven wrapper for better stability of build
1 parent ea33572 commit 3b2e212

13 files changed

+784
-2
lines changed
 

‎.mvn/jvm.config

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
-Xmx1024m -XX:CICompilerCount=1 -XX:TieredStopAtLevel=1 -Djava.security.egd=file:/dev/./urandom

‎.mvn/maven.config

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
-DaltSnapshotDeploymentRepository=repo.spring.io::default::https://repo.spring.io/libs-snapshot-local -P spring

‎.mvn/wrapper/maven-wrapper.jar

48.3 KB
Binary file not shown.

‎.mvn/wrapper/maven-wrapper.properties

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.3.3/apache-maven-3.3.3-bin.zip

‎.travis.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ language: java
33
services:
44
- redis-server
55

6-
install: mvn -U install --quiet -DskipTests=true -P bootstrap
7-
script: mvn clean test -P bootstrap
6+
install: ./mvnw -U install --quiet -DskipTests=true -P bootstrap
7+
script: ./mvnw clean test -P bootstrap
88

99

‎mvnw

+243
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,243 @@
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 [ -z "$MAVEN_SKIP_RC" ] ; then
38+
39+
if [ -f /etc/mavenrc ] ; then
40+
. /etc/mavenrc
41+
fi
42+
43+
if [ -f "$HOME/.mavenrc" ] ; then
44+
. "$HOME/.mavenrc"
45+
fi
46+
47+
fi
48+
49+
VERSION=$(awk '/<parent/ {l=4}; (l-- > 0) {$0=$0} 1' `dirname $0`/pom.xml| grep '<version' | head -1 | sed -e 's/.*>\(.*\)<.*/\1/')
50+
if echo $VERSION | egrep -q 'M|RC'; then
51+
echo Activating \"milestone\" profile for version=\"$VERSION\"
52+
echo $MAVEN_ARGS | grep -q milestone || MAVEN_ARGS="$MAVEN_ARGS -Pmilestone"
53+
else
54+
echo Deactivating \"milestone\" profile for version=\"$VERSION\"
55+
echo $MAVEN_ARGS | grep -q milestone && MAVEN_ARGS=$(echo $MAVEN_ARGS | sed -e 's/-Pmilestone//')
56+
fi
57+
58+
# OS specific support. $var _must_ be set to either true or false.
59+
cygwin=false;
60+
darwin=false;
61+
mingw=false
62+
case "`uname`" in
63+
CYGWIN*) cygwin=true ;;
64+
MINGW*) mingw=true;;
65+
Darwin*) darwin=true
66+
#
67+
# Look for the Apple JDKs first to preserve the existing behaviour, and then look
68+
# for the new JDKs provided by Oracle.
69+
#
70+
if [ -z "$JAVA_HOME" ] && [ -L /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK ] ; then
71+
#
72+
# Apple JDKs
73+
#
74+
export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home
75+
fi
76+
77+
if [ -z "$JAVA_HOME" ] && [ -L /System/Library/Java/JavaVirtualMachines/CurrentJDK ] ; then
78+
#
79+
# Apple JDKs
80+
#
81+
export JAVA_HOME=/System/Library/Java/JavaVirtualMachines/CurrentJDK/Contents/Home
82+
fi
83+
84+
if [ -z "$JAVA_HOME" ] && [ -L "/Library/Java/JavaVirtualMachines/CurrentJDK" ] ; then
85+
#
86+
# Oracle JDKs
87+
#
88+
export JAVA_HOME=/Library/Java/JavaVirtualMachines/CurrentJDK/Contents/Home
89+
fi
90+
91+
if [ -z "$JAVA_HOME" ] && [ -x "/usr/libexec/java_home" ]; then
92+
#
93+
# Apple JDKs
94+
#
95+
export JAVA_HOME=`/usr/libexec/java_home`
96+
fi
97+
;;
98+
esac
99+
100+
if [ -z "$JAVA_HOME" ] ; then
101+
if [ -r /etc/gentoo-release ] ; then
102+
JAVA_HOME=`java-config --jre-home`
103+
fi
104+
fi
105+
106+
if [ -z "$M2_HOME" ] ; then
107+
## resolve links - $0 may be a link to maven's home
108+
PRG="$0"
109+
110+
# need this for relative symlinks
111+
while [ -h "$PRG" ] ; do
112+
ls=`ls -ld "$PRG"`
113+
link=`expr "$ls" : '.*-> \(.*\)$'`
114+
if expr "$link" : '/.*' > /dev/null; then
115+
PRG="$link"
116+
else
117+
PRG="`dirname "$PRG"`/$link"
118+
fi
119+
done
120+
121+
saveddir=`pwd`
122+
123+
M2_HOME=`dirname "$PRG"`/..
124+
125+
# make it fully qualified
126+
M2_HOME=`cd "$M2_HOME" && pwd`
127+
128+
cd "$saveddir"
129+
# echo Using m2 at $M2_HOME
130+
fi
131+
132+
# For Cygwin, ensure paths are in UNIX format before anything is touched
133+
if $cygwin ; then
134+
[ -n "$M2_HOME" ] &&
135+
M2_HOME=`cygpath --unix "$M2_HOME"`
136+
[ -n "$JAVA_HOME" ] &&
137+
JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
138+
[ -n "$CLASSPATH" ] &&
139+
CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
140+
fi
141+
142+
# For Migwn, ensure paths are in UNIX format before anything is touched
143+
if $mingw ; then
144+
[ -n "$M2_HOME" ] &&
145+
M2_HOME="`(cd "$M2_HOME"; pwd)`"
146+
[ -n "$JAVA_HOME" ] &&
147+
JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
148+
# TODO classpath?
149+
fi
150+
151+
if [ -z "$JAVA_HOME" ]; then
152+
javaExecutable="`which javac`"
153+
if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
154+
# readlink(1) is not available as standard on Solaris 10.
155+
readLink=`which readlink`
156+
if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then
157+
if $darwin ; then
158+
javaHome="`dirname \"$javaExecutable\"`"
159+
javaExecutable="`cd \"$javaHome\" && pwd -P`/javac"
160+
else
161+
javaExecutable="`readlink -f \"$javaExecutable\"`"
162+
fi
163+
javaHome="`dirname \"$javaExecutable\"`"
164+
javaHome=`expr "$javaHome" : '\(.*\)/bin'`
165+
JAVA_HOME="$javaHome"
166+
export JAVA_HOME
167+
fi
168+
fi
169+
fi
170+
171+
if [ -z "$JAVACMD" ] ; then
172+
if [ -n "$JAVA_HOME" ] ; then
173+
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
174+
# IBM's JDK on AIX uses strange locations for the executables
175+
JAVACMD="$JAVA_HOME/jre/sh/java"
176+
else
177+
JAVACMD="$JAVA_HOME/bin/java"
178+
fi
179+
else
180+
JAVACMD="`which java`"
181+
fi
182+
fi
183+
184+
if [ ! -x "$JAVACMD" ] ; then
185+
echo "Error: JAVA_HOME is not defined correctly." >&2
186+
echo " We cannot execute $JAVACMD" >&2
187+
exit 1
188+
fi
189+
190+
if [ -z "$JAVA_HOME" ] ; then
191+
echo "Warning: JAVA_HOME environment variable is not set."
192+
fi
193+
194+
CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
195+
196+
# For Cygwin, switch paths to Windows format before running java
197+
if $cygwin; then
198+
[ -n "$M2_HOME" ] &&
199+
M2_HOME=`cygpath --path --windows "$M2_HOME"`
200+
[ -n "$JAVA_HOME" ] &&
201+
JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
202+
[ -n "$CLASSPATH" ] &&
203+
CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
204+
fi
205+
206+
# traverses directory structure from process work directory to filesystem root
207+
# first directory with .mvn subdirectory is considered project base directory
208+
find_maven_basedir() {
209+
local basedir=$(pwd)
210+
local wdir=$(pwd)
211+
while [ "$wdir" != '/' ] ; do
212+
if [ -d "$wdir"/.mvn ] ; then
213+
basedir=$wdir
214+
break
215+
fi
216+
wdir=$(cd "$wdir/.."; pwd)
217+
done
218+
echo "${basedir}"
219+
}
220+
221+
# concatenates all lines of a file
222+
concat_lines() {
223+
if [ -f "$1" ]; then
224+
echo "$(tr -s '\n' ' ' < "$1")"
225+
fi
226+
}
227+
228+
export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-$(find_maven_basedir)}
229+
MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
230+
231+
# Provide a "standardized" way to retrieve the CLI args that will
232+
# work with both Windows and non-Windows executions.
233+
MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@"
234+
export MAVEN_CMD_LINE_ARGS
235+
236+
WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
237+
238+
exec "$JAVACMD" \
239+
$MAVEN_OPTS \
240+
-classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
241+
"-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
242+
${WRAPPER_LAUNCHER} ${MAVEN_ARGS} "$@"
243+

‎mvnw.cmd

+145
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
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 -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+
@REM check for pre script, once with legacy .bat ending and once with .cmd ending
47+
if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
48+
if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd"
49+
:skipRcPre
50+
51+
@setlocal
52+
53+
set ERROR_CODE=0
54+
55+
@REM To isolate internal variables from possible post scripts, we use another setlocal
56+
@setlocal
57+
58+
@REM ==== START VALIDATION ====
59+
if not "%JAVA_HOME%" == "" goto OkJHome
60+
61+
echo.
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
65+
echo.
66+
goto error
67+
68+
:OkJHome
69+
if exist "%JAVA_HOME%\bin\java.exe" goto init
70+
71+
echo.
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
76+
echo.
77+
goto error
78+
79+
@REM ==== END VALIDATION ====
80+
81+
:init
82+
83+
set MAVEN_CMD_LINE_ARGS=%*
84+
85+
@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
86+
@REM Fallback to current working directory if not found.
87+
88+
set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
89+
IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
90+
91+
set EXEC_DIR=%CD%
92+
set WDIR=%EXEC_DIR%
93+
:findBaseDir
94+
IF EXIST "%WDIR%"\.mvn goto baseDirFound
95+
cd ..
96+
IF "%WDIR%"=="%CD%" goto baseDirNotFound
97+
set WDIR=%CD%
98+
goto findBaseDir
99+
100+
:baseDirFound
101+
set MAVEN_PROJECTBASEDIR=%WDIR%
102+
cd "%EXEC_DIR%"
103+
goto endDetectBaseDir
104+
105+
:baseDirNotFound
106+
set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
107+
cd "%EXEC_DIR%"
108+
109+
:endDetectBaseDir
110+
111+
IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
112+
113+
@setlocal EnableExtensions EnableDelayedExpansion
114+
for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
115+
@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
116+
117+
:endReadAdditionalConfig
118+
119+
SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
120+
121+
set WRAPPER_JAR="".\.mvn\wrapper\maven-wrapper.jar""
122+
set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
123+
124+
%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CMD_LINE_ARGS%
125+
if ERRORLEVEL 1 goto error
126+
goto end
127+
128+
:error
129+
set ERROR_CODE=1
130+
131+
:end
132+
@endlocal & set ERROR_CODE=%ERROR_CODE%
133+
134+
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost
135+
@REM check for post script, once with legacy .bat ending and once with .cmd ending
136+
if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
137+
if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd"
138+
:skipRcPost
139+
140+
@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
141+
if "%MAVEN_BATCH_PAUSE%" == "on" pause
142+
143+
if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
144+
145+
exit /B %ERROR_CODE%

‎spring-security-jwt/.mvn/jvm.config

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
-Xmx1024m -XX:CICompilerCount=1 -XX:TieredStopAtLevel=1 -Djava.security.egd=file:/dev/./urandom

‎spring-security-jwt/.mvn/maven.config

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
-DaltSnapshotDeploymentRepository=repo.spring.io::default::https://repo.spring.io/libs-snapshot-local -P spring
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
distributionUrl=https://repo1.maven.org/maven2/org/apache/maven/apache-maven/3.3.3/apache-maven-3.3.3-bin.zip

‎spring-security-jwt/mvnw

+243
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,243 @@
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 [ -z "$MAVEN_SKIP_RC" ] ; then
38+
39+
if [ -f /etc/mavenrc ] ; then
40+
. /etc/mavenrc
41+
fi
42+
43+
if [ -f "$HOME/.mavenrc" ] ; then
44+
. "$HOME/.mavenrc"
45+
fi
46+
47+
fi
48+
49+
VERSION=$(awk '/<parent/ {l=4}; (l-- > 0) {$0=$0} 1' `dirname $0`/pom.xml| grep '<version' | head -1 | sed -e 's/.*>\(.*\)<.*/\1/')
50+
if echo $VERSION | egrep -q 'M|RC'; then
51+
echo Activating \"milestone\" profile for version=\"$VERSION\"
52+
echo $MAVEN_ARGS | grep -q milestone || MAVEN_ARGS="$MAVEN_ARGS -Pmilestone"
53+
else
54+
echo Deactivating \"milestone\" profile for version=\"$VERSION\"
55+
echo $MAVEN_ARGS | grep -q milestone && MAVEN_ARGS=$(echo $MAVEN_ARGS | sed -e 's/-Pmilestone//')
56+
fi
57+
58+
# OS specific support. $var _must_ be set to either true or false.
59+
cygwin=false;
60+
darwin=false;
61+
mingw=false
62+
case "`uname`" in
63+
CYGWIN*) cygwin=true ;;
64+
MINGW*) mingw=true;;
65+
Darwin*) darwin=true
66+
#
67+
# Look for the Apple JDKs first to preserve the existing behaviour, and then look
68+
# for the new JDKs provided by Oracle.
69+
#
70+
if [ -z "$JAVA_HOME" ] && [ -L /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK ] ; then
71+
#
72+
# Apple JDKs
73+
#
74+
export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home
75+
fi
76+
77+
if [ -z "$JAVA_HOME" ] && [ -L /System/Library/Java/JavaVirtualMachines/CurrentJDK ] ; then
78+
#
79+
# Apple JDKs
80+
#
81+
export JAVA_HOME=/System/Library/Java/JavaVirtualMachines/CurrentJDK/Contents/Home
82+
fi
83+
84+
if [ -z "$JAVA_HOME" ] && [ -L "/Library/Java/JavaVirtualMachines/CurrentJDK" ] ; then
85+
#
86+
# Oracle JDKs
87+
#
88+
export JAVA_HOME=/Library/Java/JavaVirtualMachines/CurrentJDK/Contents/Home
89+
fi
90+
91+
if [ -z "$JAVA_HOME" ] && [ -x "/usr/libexec/java_home" ]; then
92+
#
93+
# Apple JDKs
94+
#
95+
export JAVA_HOME=`/usr/libexec/java_home`
96+
fi
97+
;;
98+
esac
99+
100+
if [ -z "$JAVA_HOME" ] ; then
101+
if [ -r /etc/gentoo-release ] ; then
102+
JAVA_HOME=`java-config --jre-home`
103+
fi
104+
fi
105+
106+
if [ -z "$M2_HOME" ] ; then
107+
## resolve links - $0 may be a link to maven's home
108+
PRG="$0"
109+
110+
# need this for relative symlinks
111+
while [ -h "$PRG" ] ; do
112+
ls=`ls -ld "$PRG"`
113+
link=`expr "$ls" : '.*-> \(.*\)$'`
114+
if expr "$link" : '/.*' > /dev/null; then
115+
PRG="$link"
116+
else
117+
PRG="`dirname "$PRG"`/$link"
118+
fi
119+
done
120+
121+
saveddir=`pwd`
122+
123+
M2_HOME=`dirname "$PRG"`/..
124+
125+
# make it fully qualified
126+
M2_HOME=`cd "$M2_HOME" && pwd`
127+
128+
cd "$saveddir"
129+
# echo Using m2 at $M2_HOME
130+
fi
131+
132+
# For Cygwin, ensure paths are in UNIX format before anything is touched
133+
if $cygwin ; then
134+
[ -n "$M2_HOME" ] &&
135+
M2_HOME=`cygpath --unix "$M2_HOME"`
136+
[ -n "$JAVA_HOME" ] &&
137+
JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
138+
[ -n "$CLASSPATH" ] &&
139+
CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
140+
fi
141+
142+
# For Migwn, ensure paths are in UNIX format before anything is touched
143+
if $mingw ; then
144+
[ -n "$M2_HOME" ] &&
145+
M2_HOME="`(cd "$M2_HOME"; pwd)`"
146+
[ -n "$JAVA_HOME" ] &&
147+
JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
148+
# TODO classpath?
149+
fi
150+
151+
if [ -z "$JAVA_HOME" ]; then
152+
javaExecutable="`which javac`"
153+
if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
154+
# readlink(1) is not available as standard on Solaris 10.
155+
readLink=`which readlink`
156+
if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then
157+
if $darwin ; then
158+
javaHome="`dirname \"$javaExecutable\"`"
159+
javaExecutable="`cd \"$javaHome\" && pwd -P`/javac"
160+
else
161+
javaExecutable="`readlink -f \"$javaExecutable\"`"
162+
fi
163+
javaHome="`dirname \"$javaExecutable\"`"
164+
javaHome=`expr "$javaHome" : '\(.*\)/bin'`
165+
JAVA_HOME="$javaHome"
166+
export JAVA_HOME
167+
fi
168+
fi
169+
fi
170+
171+
if [ -z "$JAVACMD" ] ; then
172+
if [ -n "$JAVA_HOME" ] ; then
173+
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
174+
# IBM's JDK on AIX uses strange locations for the executables
175+
JAVACMD="$JAVA_HOME/jre/sh/java"
176+
else
177+
JAVACMD="$JAVA_HOME/bin/java"
178+
fi
179+
else
180+
JAVACMD="`which java`"
181+
fi
182+
fi
183+
184+
if [ ! -x "$JAVACMD" ] ; then
185+
echo "Error: JAVA_HOME is not defined correctly." >&2
186+
echo " We cannot execute $JAVACMD" >&2
187+
exit 1
188+
fi
189+
190+
if [ -z "$JAVA_HOME" ] ; then
191+
echo "Warning: JAVA_HOME environment variable is not set."
192+
fi
193+
194+
CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
195+
196+
# For Cygwin, switch paths to Windows format before running java
197+
if $cygwin; then
198+
[ -n "$M2_HOME" ] &&
199+
M2_HOME=`cygpath --path --windows "$M2_HOME"`
200+
[ -n "$JAVA_HOME" ] &&
201+
JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
202+
[ -n "$CLASSPATH" ] &&
203+
CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
204+
fi
205+
206+
# traverses directory structure from process work directory to filesystem root
207+
# first directory with .mvn subdirectory is considered project base directory
208+
find_maven_basedir() {
209+
local basedir=$(pwd)
210+
local wdir=$(pwd)
211+
while [ "$wdir" != '/' ] ; do
212+
if [ -d "$wdir"/.mvn ] ; then
213+
basedir=$wdir
214+
break
215+
fi
216+
wdir=$(cd "$wdir/.."; pwd)
217+
done
218+
echo "${basedir}"
219+
}
220+
221+
# concatenates all lines of a file
222+
concat_lines() {
223+
if [ -f "$1" ]; then
224+
echo "$(tr -s '\n' ' ' < "$1")"
225+
fi
226+
}
227+
228+
export MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-$(find_maven_basedir)}
229+
MAVEN_OPTS="$(concat_lines "$MAVEN_PROJECTBASEDIR/.mvn/jvm.config") $MAVEN_OPTS"
230+
231+
# Provide a "standardized" way to retrieve the CLI args that will
232+
# work with both Windows and non-Windows executions.
233+
MAVEN_CMD_LINE_ARGS="$MAVEN_CONFIG $@"
234+
export MAVEN_CMD_LINE_ARGS
235+
236+
WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
237+
238+
exec "$JAVACMD" \
239+
$MAVEN_OPTS \
240+
-classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
241+
"-Dmaven.home=${M2_HOME}" "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \
242+
${WRAPPER_LAUNCHER} ${MAVEN_ARGS} "$@"
243+

‎spring-security-jwt/mvnw.cmd

+145
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,145 @@
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 -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+
@REM check for pre script, once with legacy .bat ending and once with .cmd ending
47+
if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
48+
if exist "%HOME%\mavenrc_pre.cmd" call "%HOME%\mavenrc_pre.cmd"
49+
:skipRcPre
50+
51+
@setlocal
52+
53+
set ERROR_CODE=0
54+
55+
@REM To isolate internal variables from possible post scripts, we use another setlocal
56+
@setlocal
57+
58+
@REM ==== START VALIDATION ====
59+
if not "%JAVA_HOME%" == "" goto OkJHome
60+
61+
echo.
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
65+
echo.
66+
goto error
67+
68+
:OkJHome
69+
if exist "%JAVA_HOME%\bin\java.exe" goto init
70+
71+
echo.
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
76+
echo.
77+
goto error
78+
79+
@REM ==== END VALIDATION ====
80+
81+
:init
82+
83+
set MAVEN_CMD_LINE_ARGS=%*
84+
85+
@REM Find the project base dir, i.e. the directory that contains the folder ".mvn".
86+
@REM Fallback to current working directory if not found.
87+
88+
set MAVEN_PROJECTBASEDIR=%MAVEN_BASEDIR%
89+
IF NOT "%MAVEN_PROJECTBASEDIR%"=="" goto endDetectBaseDir
90+
91+
set EXEC_DIR=%CD%
92+
set WDIR=%EXEC_DIR%
93+
:findBaseDir
94+
IF EXIST "%WDIR%"\.mvn goto baseDirFound
95+
cd ..
96+
IF "%WDIR%"=="%CD%" goto baseDirNotFound
97+
set WDIR=%CD%
98+
goto findBaseDir
99+
100+
:baseDirFound
101+
set MAVEN_PROJECTBASEDIR=%WDIR%
102+
cd "%EXEC_DIR%"
103+
goto endDetectBaseDir
104+
105+
:baseDirNotFound
106+
set MAVEN_PROJECTBASEDIR=%EXEC_DIR%
107+
cd "%EXEC_DIR%"
108+
109+
:endDetectBaseDir
110+
111+
IF NOT EXIST "%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config" goto endReadAdditionalConfig
112+
113+
@setlocal EnableExtensions EnableDelayedExpansion
114+
for /F "usebackq delims=" %%a in ("%MAVEN_PROJECTBASEDIR%\.mvn\jvm.config") do set JVM_CONFIG_MAVEN_PROPS=!JVM_CONFIG_MAVEN_PROPS! %%a
115+
@endlocal & set JVM_CONFIG_MAVEN_PROPS=%JVM_CONFIG_MAVEN_PROPS%
116+
117+
:endReadAdditionalConfig
118+
119+
SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
120+
121+
set WRAPPER_JAR="".\.mvn\wrapper\maven-wrapper.jar""
122+
set WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
123+
124+
%MAVEN_JAVA_EXE% %JVM_CONFIG_MAVEN_PROPS% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %WRAPPER_JAR% "-Dmaven.multiModuleProjectDirectory=%MAVEN_PROJECTBASEDIR%" %WRAPPER_LAUNCHER% %MAVEN_CMD_LINE_ARGS%
125+
if ERRORLEVEL 1 goto error
126+
goto end
127+
128+
:error
129+
set ERROR_CODE=1
130+
131+
:end
132+
@endlocal & set ERROR_CODE=%ERROR_CODE%
133+
134+
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost
135+
@REM check for post script, once with legacy .bat ending and once with .cmd ending
136+
if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
137+
if exist "%HOME%\mavenrc_post.cmd" call "%HOME%\mavenrc_post.cmd"
138+
:skipRcPost
139+
140+
@REM pause the script if MAVEN_BATCH_PAUSE is set to 'on'
141+
if "%MAVEN_BATCH_PAUSE%" == "on" pause
142+
143+
if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
144+
145+
exit /B %ERROR_CODE%

0 commit comments

Comments
 (0)
This repository has been archived.