Lines Matching +full:maven +full:- +full:bin
1 #!/bin/sh
2 # ----------------------------------------------------------------------------
11 # http://www.apache.org/licenses/LICENSE-2.0
19 # ----------------------------------------------------------------------------
21 # ----------------------------------------------------------------------------
22 # Apache Maven Wrapper startup batch script, version 3.2.0
25 # ------------------
26 # JAVA_HOME - location of a JDK home dir
29 # -----------------
30 # MAVEN_OPTS - parameters passed to the Java VM when running Maven
31 # e.g. to debug Maven itself, use
32 # set MAVEN_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
33 # MAVEN_SKIP_RC - flag to disable loading of mavenrc files
34 # ----------------------------------------------------------------------------
36 if [ -z "$MAVEN_SKIP_RC" ] ; then
38 if [ -f /usr/local/etc/mavenrc ] ; then
42 if [ -f /etc/mavenrc ] ; then
46 if [ -f "$HOME/.mavenrc" ] ; then
62 if [ -z "$JAVA_HOME" ]; then
63 if [ -x "/usr/libexec/java_home" ]; then
72 if [ -z "$JAVA_HOME" ] ; then
73 if [ -r /etc/gentoo-release ] ; then
74 JAVA_HOME=$(java-config --jre-home)
80 [ -n "$JAVA_HOME" ] &&
81 JAVA_HOME=$(cygpath --unix "$JAVA_HOME")
82 [ -n "$CLASSPATH" ] &&
83 CLASSPATH=$(cygpath --path --unix "$CLASSPATH")
88 [ -n "$JAVA_HOME" ] && [ -d "$JAVA_HOME" ] &&
92 if [ -z "$JAVA_HOME" ]; then
94 if [ -n "$javaExecutable" ] && ! [ "$(expr "\"$javaExecutable\"" : '\([^ ]*\)')" = "no" ]; then
100 javaExecutable="$(cd "\"$javaHome\"" && pwd -P)/javac"
102 javaExecutable="$(readlink -f "\"$javaExecutable\"")"
105 javaHome=$(expr "$javaHome" : '\(.*\)/bin')
112 if [ -z "$JAVACMD" ] ; then
113 if [ -n "$JAVA_HOME" ] ; then
114 if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
118 JAVACMD="$JAVA_HOME/bin/java"
121 JAVACMD="$(\unset -f command 2>/dev/null; \command -v java)"
125 if [ ! -x "$JAVACMD" ] ; then
131 if [ -z "$JAVA_HOME" ] ; then
138 if [ -z "$1" ]
147 if [ -d "$wdir"/.mvn ] ; then
151 # workaround for JBEAP-8937 (on Solaris 10/Sparc)
152 if [ -d "${wdir}" ]; then
162 if [ -f "$1" ]; then
166 # \r\n and produce $'-Xarg\r' rather than -Xarg due to word
168 tr -s '\r\n' ' ' < "$1"
179 if [ -z "$BASE_DIR" ]; then
183 MAVEN_PROJECTBASEDIR=${MAVEN_BASEDIR:-"$BASE_DIR"}; export MAVEN_PROJECTBASEDIR
187 # Extension to allow automatically downloading the maven-wrapper.jar from Maven-central
188 # This allows using the maven wrapper in projects that prohibit checking in binary data.
190 wrapperJarPath="$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar"
191 if [ -r "$wrapperJarPath" ]; then
196 if [ -n "$MVNW_REPOURL" ]; then
197 … wrapperUrl="$MVNW_REPOURL/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar"
199 …wrapperUrl="https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/mave…
201 while IFS="=" read -r key value; do
203 safeValue=$(echo "$value" | tr -d '\r')
206 done < "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.properties"
210 wrapperJarPath=$(cygpath --path --windows "$wrapperJarPath")
213 if command -v wget > /dev/null; then
215 [ "$MVNW_VERBOSE" = true ] && QUIET="" || QUIET="--quiet"
216 if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
217 wget $QUIET "$wrapperUrl" -O "$wrapperJarPath" || rm -f "$wrapperJarPath"
219 …wget $QUIET --http-user="$MVNW_USERNAME" --http-password="$MVNW_PASSWORD" "$wrapperUrl" -O "$wrapp…
221 elif command -v curl > /dev/null; then
223 [ "$MVNW_VERBOSE" = true ] && QUIET="" || QUIET="--silent"
224 if [ -z "$MVNW_USERNAME" ] || [ -z "$MVNW_PASSWORD" ]; then
225 curl $QUIET -o "$wrapperJarPath" "$wrapperUrl" -f -L || rm -f "$wrapperJarPath"
227 …curl $QUIET --user "$MVNW_USERNAME:$MVNW_PASSWORD" -o "$wrapperJarPath" "$wrapperUrl" -f -L || rm …
235 javaSource=$(cygpath --path --windows "$javaSource")
236 javaClass=$(cygpath --path --windows "$javaClass")
238 if [ -e "$javaSource" ]; then
239 if [ ! -e "$javaClass" ]; then
240 log " - Compiling MavenWrapperDownloader.java ..."
241 ("$JAVA_HOME/bin/javac" "$javaSource")
243 if [ -e "$javaClass" ]; then
244 log " - Running MavenWrapperDownloader.java ..."
245 …("$JAVA_HOME/bin/java" -cp .mvn/wrapper MavenWrapperDownloader "$wrapperUrl" "$wrapperJarPath") ||…
254 # If specified, validate the SHA-256 sum of the Maven wrapper jar file
256 while IFS="=" read -r key value; do
259 done < "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.properties"
260 if [ -n "$wrapperSha256Sum" ]; then
262 if command -v sha256sum > /dev/null; then
263 if echo "$wrapperSha256Sum $wrapperJarPath" | sha256sum -c > /dev/null 2>&1; then
266 elif command -v shasum > /dev/null; then
267 if echo "$wrapperSha256Sum $wrapperJarPath" | shasum -a 256 -c > /dev/null 2>&1; then
272 … command, or disable validation by removing 'wrapperSha256Sum' from your maven-wrapper.properties."
276 …echo "Error: Failed to validate Maven wrapper SHA-256, your Maven wrapper might be compromised." >…
278 …echo "If you updated your Maven version, you need to update the specified wrapperSha256Sum propert…
287 [ -n "$JAVA_HOME" ] &&
288 JAVA_HOME=$(cygpath --path --windows "$JAVA_HOME")
289 [ -n "$CLASSPATH" ] &&
290 CLASSPATH=$(cygpath --path --windows "$CLASSPATH")
291 [ -n "$MAVEN_PROJECTBASEDIR" ] &&
292 MAVEN_PROJECTBASEDIR=$(cygpath --path --windows "$MAVEN_PROJECTBASEDIR")
296 # work with both Windows and non-Windows executions.
300 WRAPPER_LAUNCHER=org.apache.maven.wrapper.MavenWrapperMain
306 -classpath "$MAVEN_PROJECTBASEDIR/.mvn/wrapper/maven-wrapper.jar" \
307 "-Dmaven.multiModuleProjectDirectory=${MAVEN_PROJECTBASEDIR}" \