maven 0.8.pre.0-java
Sign up to get free protection for your applications and to get access to all the features.
- data/LICENSE.txt +202 -0
- data/NOTICE.txt +20 -0
- data/README.txt +77 -0
- data/bin/m2.conf +8 -0
- data/bin/maven +21 -0
- data/bin/mvn +164 -0
- data/bin/mvn.bat +190 -0
- data/bin/mvnDebug +169 -0
- data/bin/mvnDebug.bat +193 -0
- data/bin/mvnyjp +168 -0
- data/bin/translate +148 -0
- data/bin/translate.bat +190 -0
- data/bin/translate.conf +8 -0
- data/boot/plexus-classworlds-2.2.3.jar +0 -0
- data/conf/settings.xml +257 -0
- data/ext/jruby-complete-1.5.1.jar +0 -0
- data/ext/pmaven-jruby-0.8-SNAPSHOT.jar +0 -0
- data/lib/commons-cli-1.2.jar +0 -0
- data/lib/google-collections-1.0.jar +0 -0
- data/lib/maven-artifact-3.0-beta-1.jar +0 -0
- data/lib/maven-compat-3.0-beta-1.jar +0 -0
- data/lib/maven-core-3.0-beta-1.jar +0 -0
- data/lib/maven-embedder-3.0-beta-1.jar +0 -0
- data/lib/maven-model-3.0-beta-1.jar +0 -0
- data/lib/maven-model-builder-3.0-beta-1.jar +0 -0
- data/lib/maven-plugin-api-3.0-beta-1.jar +0 -0
- data/lib/maven-settings-3.0-beta-1.jar +0 -0
- data/lib/nekohtml-1.9.6.2.jar +0 -0
- data/lib/plexus-cipher-1.4.jar +0 -0
- data/lib/plexus-component-annotations-1.5.4.jar +0 -0
- data/lib/plexus-container-default-1.5.4.jar +0 -0
- data/lib/plexus-interpolation-1.11.jar +0 -0
- data/lib/plexus-sec-dispatcher-1.3.jar +0 -0
- data/lib/plexus-utils-2.0.3.jar +0 -0
- data/lib/pmaven-cli-0.8.pre.0.jar +0 -0
- data/lib/pmaven-common-0.8-SNAPSHOT.jar +0 -0
- data/lib/wagon-file-1.0-beta-6.jar +0 -0
- data/lib/wagon-http-lightweight-1.0-beta-6.jar +0 -0
- data/lib/wagon-http-shared-1.0-beta-6.jar +0 -0
- data/lib/wagon-provider-api-1.0-beta-6.jar +0 -0
- data/lib/xbean-reflect-3.4.jar +0 -0
- data/lib/xercesMinimal-1.9.6.2.jar +0 -0
- metadata +110 -0
data/bin/mvnyjp
ADDED
@@ -0,0 +1,168 @@
|
|
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
|
+
# ----------------------------------------------------------------------------
|
35
|
+
|
36
|
+
YJPLIB=/applications/YourKit.app/bin/mac/libyjpagent.jnilib
|
37
|
+
|
38
|
+
MAVEN_OPTS=-agentpath:$YJPLIB=onexit=snapshot,onexit=memory,tracing,onlylocal
|
39
|
+
|
40
|
+
QUOTED_ARGS=""
|
41
|
+
while [ "$1" != "" ] ; do
|
42
|
+
|
43
|
+
QUOTED_ARGS="$QUOTED_ARGS \"$1\""
|
44
|
+
shift
|
45
|
+
|
46
|
+
done
|
47
|
+
|
48
|
+
if [ -f /etc/mavenrc ] ; then
|
49
|
+
. /etc/mavenrc
|
50
|
+
fi
|
51
|
+
|
52
|
+
if [ -f "$HOME/.mavenrc" ] ; then
|
53
|
+
. "$HOME/.mavenrc"
|
54
|
+
fi
|
55
|
+
|
56
|
+
# OS specific support. $var _must_ be set to either true or false.
|
57
|
+
cygwin=false;
|
58
|
+
darwin=false;
|
59
|
+
mingw=false
|
60
|
+
case "`uname`" in
|
61
|
+
CYGWIN*) cygwin=true ;;
|
62
|
+
MINGW*) mingw=true;;
|
63
|
+
Darwin*) darwin=true
|
64
|
+
if [ -z "$JAVA_VERSION" ] ; then
|
65
|
+
JAVA_VERSION="CurrentJDK"
|
66
|
+
else
|
67
|
+
echo "Using Java version: $JAVA_VERSION"
|
68
|
+
fi
|
69
|
+
if [ -z "$JAVA_HOME" ] ; then
|
70
|
+
JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/${JAVA_VERSION}/Home
|
71
|
+
fi
|
72
|
+
;;
|
73
|
+
esac
|
74
|
+
|
75
|
+
if [ -z "$JAVA_HOME" ] ; then
|
76
|
+
if [ -r /etc/gentoo-release ] ; then
|
77
|
+
JAVA_HOME=`java-config --jre-home`
|
78
|
+
fi
|
79
|
+
fi
|
80
|
+
|
81
|
+
if [ -z "$M2_HOME" ] ; then
|
82
|
+
## resolve links - $0 may be a link to maven's home
|
83
|
+
PRG="$0"
|
84
|
+
|
85
|
+
# need this for relative symlinks
|
86
|
+
while [ -h "$PRG" ] ; do
|
87
|
+
ls=`ls -ld "$PRG"`
|
88
|
+
link=`expr "$ls" : '.*-> \(.*\)$'`
|
89
|
+
if expr "$link" : '/.*' > /dev/null; then
|
90
|
+
PRG="$link"
|
91
|
+
else
|
92
|
+
PRG="`dirname "$PRG"`/$link"
|
93
|
+
fi
|
94
|
+
done
|
95
|
+
|
96
|
+
saveddir=`pwd`
|
97
|
+
|
98
|
+
M2_HOME=`dirname "$PRG"`/..
|
99
|
+
|
100
|
+
# make it fully qualified
|
101
|
+
M2_HOME=`cd "$M2_HOME" && pwd`
|
102
|
+
|
103
|
+
cd "$saveddir"
|
104
|
+
# echo Using m2 at $M2_HOME
|
105
|
+
fi
|
106
|
+
|
107
|
+
# For Cygwin, ensure paths are in UNIX format before anything is touched
|
108
|
+
if $cygwin ; then
|
109
|
+
[ -n "$M2_HOME" ] &&
|
110
|
+
M2_HOME=`cygpath --unix "$M2_HOME"`
|
111
|
+
[ -n "$JAVA_HOME" ] &&
|
112
|
+
JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
|
113
|
+
[ -n "$CLASSPATH" ] &&
|
114
|
+
CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
|
115
|
+
fi
|
116
|
+
|
117
|
+
# For Migwn, ensure paths are in UNIX format before anything is touched
|
118
|
+
if $mingw ; then
|
119
|
+
[ -n "$M2_HOME" ] &&
|
120
|
+
M2_HOME="`(cd "$M2_HOME"; pwd)`"
|
121
|
+
[ -n "$JAVA_HOME" ] &&
|
122
|
+
JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
|
123
|
+
# TODO classpath?
|
124
|
+
fi
|
125
|
+
|
126
|
+
if [ -z "$JAVACMD" ] ; then
|
127
|
+
if [ -n "$JAVA_HOME" ] ; then
|
128
|
+
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
129
|
+
# IBM's JDK on AIX uses strange locations for the executables
|
130
|
+
JAVACMD="$JAVA_HOME/jre/sh/java"
|
131
|
+
else
|
132
|
+
JAVACMD="$JAVA_HOME/bin/java"
|
133
|
+
fi
|
134
|
+
else
|
135
|
+
JAVACMD="`which java`"
|
136
|
+
fi
|
137
|
+
fi
|
138
|
+
|
139
|
+
if [ ! -x "$JAVACMD" ] ; then
|
140
|
+
echo "Error: JAVA_HOME is not defined correctly."
|
141
|
+
echo " We cannot execute $JAVACMD"
|
142
|
+
exit 1
|
143
|
+
fi
|
144
|
+
|
145
|
+
if [ -z "$JAVA_HOME" ] ; then
|
146
|
+
echo "Warning: JAVA_HOME environment variable is not set."
|
147
|
+
fi
|
148
|
+
|
149
|
+
CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
|
150
|
+
|
151
|
+
# For Cygwin, switch paths to Windows format before running java
|
152
|
+
if $cygwin; then
|
153
|
+
[ -n "$M2_HOME" ] &&
|
154
|
+
M2_HOME=`cygpath --path --windows "$M2_HOME"`
|
155
|
+
[ -n "$JAVA_HOME" ] &&
|
156
|
+
JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
|
157
|
+
[ -n "$HOME" ] &&
|
158
|
+
HOME=`cygpath --path --windows "$HOME"`
|
159
|
+
fi
|
160
|
+
|
161
|
+
exec "$JAVACMD" \
|
162
|
+
$MAVEN_OPTS \
|
163
|
+
-classpath "${M2_HOME}"/boot/plexus-classworlds-*.jar \
|
164
|
+
"-Dclassworlds.conf=${M2_HOME}/bin/m2.conf" \
|
165
|
+
"-Dmaven.home=${M2_HOME}" \
|
166
|
+
${CLASSWORLDS_LAUNCHER} $QUOTED_ARGS
|
167
|
+
|
168
|
+
|
data/bin/translate
ADDED
@@ -0,0 +1,148 @@
|
|
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
|
+
# ----------------------------------------------------------------------------
|
35
|
+
|
36
|
+
# OS specific support. $var _must_ be set to either true or false.
|
37
|
+
cygwin=false;
|
38
|
+
darwin=false;
|
39
|
+
mingw=false
|
40
|
+
case "`uname`" in
|
41
|
+
CYGWIN*) cygwin=true ;;
|
42
|
+
MINGW*) mingw=true;;
|
43
|
+
Darwin*) darwin=true
|
44
|
+
if [ -z "$JAVA_VERSION" ] ; then
|
45
|
+
JAVA_VERSION="CurrentJDK"
|
46
|
+
else
|
47
|
+
echo "Using Java version: $JAVA_VERSION"
|
48
|
+
fi
|
49
|
+
if [ -z "$JAVA_HOME" ] ; then
|
50
|
+
JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/${JAVA_VERSION}/Home
|
51
|
+
fi
|
52
|
+
;;
|
53
|
+
esac
|
54
|
+
|
55
|
+
if [ -z "$JAVA_HOME" ] ; then
|
56
|
+
if [ -r /etc/gentoo-release ] ; then
|
57
|
+
JAVA_HOME=`java-config --jre-home`
|
58
|
+
fi
|
59
|
+
fi
|
60
|
+
|
61
|
+
if [ -z "$M2_HOME" ] ; then
|
62
|
+
## resolve links - $0 may be a link to maven's home
|
63
|
+
PRG="$0"
|
64
|
+
|
65
|
+
# need this for relative symlinks
|
66
|
+
while [ -h "$PRG" ] ; do
|
67
|
+
ls=`ls -ld "$PRG"`
|
68
|
+
link=`expr "$ls" : '.*-> \(.*\)$'`
|
69
|
+
if expr "$link" : '/.*' > /dev/null; then
|
70
|
+
PRG="$link"
|
71
|
+
else
|
72
|
+
PRG="`dirname "$PRG"`/$link"
|
73
|
+
fi
|
74
|
+
done
|
75
|
+
|
76
|
+
saveddir=`pwd`
|
77
|
+
|
78
|
+
M2_HOME=`dirname "$PRG"`/..
|
79
|
+
|
80
|
+
# make it fully qualified
|
81
|
+
M2_HOME=`cd "$M2_HOME" && pwd`
|
82
|
+
|
83
|
+
cd "$saveddir"
|
84
|
+
# echo Using m2 at $M2_HOME
|
85
|
+
fi
|
86
|
+
|
87
|
+
# For Cygwin, ensure paths are in UNIX format before anything is touched
|
88
|
+
if $cygwin ; then
|
89
|
+
[ -n "$M2_HOME" ] &&
|
90
|
+
M2_HOME=`cygpath --unix "$M2_HOME"`
|
91
|
+
[ -n "$JAVA_HOME" ] &&
|
92
|
+
JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
|
93
|
+
[ -n "$CLASSPATH" ] &&
|
94
|
+
CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
|
95
|
+
fi
|
96
|
+
|
97
|
+
# For Migwn, ensure paths are in UNIX format before anything is touched
|
98
|
+
if $mingw ; then
|
99
|
+
[ -n "$M2_HOME" ] &&
|
100
|
+
M2_HOME="`(cd "$M2_HOME"; pwd)`"
|
101
|
+
[ -n "$JAVA_HOME" ] &&
|
102
|
+
JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
|
103
|
+
# TODO classpath?
|
104
|
+
fi
|
105
|
+
|
106
|
+
if [ -z "$JAVACMD" ] ; then
|
107
|
+
if [ -n "$JAVA_HOME" ] ; then
|
108
|
+
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
109
|
+
# IBM's JDK on AIX uses strange locations for the executables
|
110
|
+
JAVACMD="$JAVA_HOME/jre/sh/java"
|
111
|
+
else
|
112
|
+
JAVACMD="$JAVA_HOME/bin/java"
|
113
|
+
fi
|
114
|
+
else
|
115
|
+
JAVACMD="`which java`"
|
116
|
+
fi
|
117
|
+
fi
|
118
|
+
|
119
|
+
if [ ! -x "$JAVACMD" ] ; then
|
120
|
+
echo "Error: JAVA_HOME is not defined correctly."
|
121
|
+
echo " We cannot execute $JAVACMD"
|
122
|
+
exit 1
|
123
|
+
fi
|
124
|
+
|
125
|
+
if [ -z "$JAVA_HOME" ] ; then
|
126
|
+
echo "Warning: JAVA_HOME environment variable is not set."
|
127
|
+
fi
|
128
|
+
|
129
|
+
CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
|
130
|
+
|
131
|
+
# For Cygwin, switch paths to Windows format before running java
|
132
|
+
if $cygwin; then
|
133
|
+
[ -n "$M2_HOME" ] &&
|
134
|
+
M2_HOME=`cygpath --path --windows "$M2_HOME"`
|
135
|
+
[ -n "$JAVA_HOME" ] &&
|
136
|
+
JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
|
137
|
+
[ -n "$HOME" ] &&
|
138
|
+
HOME=`cygpath --path --windows "$HOME"`
|
139
|
+
fi
|
140
|
+
|
141
|
+
exec "$JAVACMD" \
|
142
|
+
$MAVEN_OPTS \
|
143
|
+
-classpath "${M2_HOME}"/boot/plexus-classworlds-*.jar \
|
144
|
+
"-Dclassworlds.conf=${M2_HOME}/bin/translate.conf" \
|
145
|
+
"-Dmaven.home=${M2_HOME}" \
|
146
|
+
${CLASSWORLDS_LAUNCHER} "$@"
|
147
|
+
|
148
|
+
|
data/bin/translate.bat
ADDED
@@ -0,0 +1,190 @@
|
|
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 ----------------------------------------------------------------------------
|
34
|
+
|
35
|
+
@REM Begin all REM lines with '@' in case MAVEN_BATCH_ECHO is 'on'
|
36
|
+
@echo off
|
37
|
+
@REM enable echoing my setting MAVEN_BATCH_ECHO to 'on'
|
38
|
+
@if "%MAVEN_BATCH_ECHO%" == "on" echo %MAVEN_BATCH_ECHO%
|
39
|
+
|
40
|
+
@REM set %HOME% to equivalent of $HOME
|
41
|
+
if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
|
42
|
+
|
43
|
+
@REM Execute a user defined script before this one
|
44
|
+
if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
|
45
|
+
|
46
|
+
set ERROR_CODE=0
|
47
|
+
|
48
|
+
@REM set local scope for the variables with windows NT shell
|
49
|
+
if "%OS%"=="Windows_NT" @setlocal
|
50
|
+
if "%OS%"=="WINNT" @setlocal
|
51
|
+
|
52
|
+
@REM ==== START VALIDATION ====
|
53
|
+
if not "%JAVA_HOME%" == "" goto OkJHome
|
54
|
+
|
55
|
+
echo.
|
56
|
+
echo ERROR: JAVA_HOME not found in your environment.
|
57
|
+
echo Please set the JAVA_HOME variable in your environment to match the
|
58
|
+
echo location of your Java installation
|
59
|
+
echo.
|
60
|
+
goto error
|
61
|
+
|
62
|
+
:OkJHome
|
63
|
+
if exist "%JAVA_HOME%\bin\java.exe" goto chkMHome
|
64
|
+
|
65
|
+
echo.
|
66
|
+
echo ERROR: JAVA_HOME is set to an invalid directory.
|
67
|
+
echo JAVA_HOME = "%JAVA_HOME%"
|
68
|
+
echo Please set the JAVA_HOME variable in your environment to match the
|
69
|
+
echo location of your Java installation
|
70
|
+
echo.
|
71
|
+
goto error
|
72
|
+
|
73
|
+
:chkMHome
|
74
|
+
if not "%M2_HOME%"=="" goto valMHome
|
75
|
+
|
76
|
+
if "%OS%"=="Windows_NT" SET "M2_HOME=%~dp0.."
|
77
|
+
if "%OS%"=="WINNT" SET "M2_HOME=%~dp0.."
|
78
|
+
if not "%M2_HOME%"=="" goto valMHome
|
79
|
+
|
80
|
+
echo.
|
81
|
+
echo ERROR: M2_HOME not found in your environment.
|
82
|
+
echo Please set the M2_HOME variable in your environment to match the
|
83
|
+
echo location of the Maven installation
|
84
|
+
echo.
|
85
|
+
goto error
|
86
|
+
|
87
|
+
:valMHome
|
88
|
+
|
89
|
+
:stripMHome
|
90
|
+
if not "_%M2_HOME:~-1%"=="_\" goto checkMBat
|
91
|
+
set "M2_HOME=%M2_HOME:~0,-1%"
|
92
|
+
goto stripMHome
|
93
|
+
|
94
|
+
:checkMBat
|
95
|
+
if exist "%M2_HOME%\bin\translate.bat" goto init
|
96
|
+
|
97
|
+
echo.
|
98
|
+
echo ERROR: M2_HOME is set to an invalid directory.
|
99
|
+
echo M2_HOME = "%M2_HOME%"
|
100
|
+
echo Please set the M2_HOME variable in your environment to match the
|
101
|
+
echo location of the Maven installation
|
102
|
+
echo.
|
103
|
+
goto error
|
104
|
+
@REM ==== END VALIDATION ====
|
105
|
+
|
106
|
+
:init
|
107
|
+
@REM Decide how to startup depending on the version of windows
|
108
|
+
|
109
|
+
@REM -- Windows NT with Novell Login
|
110
|
+
if "%OS%"=="WINNT" goto WinNTNovell
|
111
|
+
|
112
|
+
@REM -- Win98ME
|
113
|
+
if NOT "%OS%"=="Windows_NT" goto Win9xArg
|
114
|
+
|
115
|
+
:WinNTNovell
|
116
|
+
|
117
|
+
@REM -- 4NT shell
|
118
|
+
if "%@eval[2+2]" == "4" goto 4NTArgs
|
119
|
+
|
120
|
+
@REM -- Regular WinNT shell
|
121
|
+
set MAVEN_CMD_LINE_ARGS=%*
|
122
|
+
goto endInit
|
123
|
+
|
124
|
+
@REM The 4NT Shell from jp software
|
125
|
+
:4NTArgs
|
126
|
+
set MAVEN_CMD_LINE_ARGS=%$
|
127
|
+
goto endInit
|
128
|
+
|
129
|
+
:Win9xArg
|
130
|
+
@REM Slurp the command line arguments. This loop allows for an unlimited number
|
131
|
+
@REM of agruments (up to the command line limit, anyway).
|
132
|
+
set MAVEN_CMD_LINE_ARGS=
|
133
|
+
:Win9xApp
|
134
|
+
if %1a==a goto endInit
|
135
|
+
set MAVEN_CMD_LINE_ARGS=%MAVEN_CMD_LINE_ARGS% %1
|
136
|
+
shift
|
137
|
+
goto Win9xApp
|
138
|
+
|
139
|
+
@REM Reaching here means variables are defined and arguments have been captured
|
140
|
+
:endInit
|
141
|
+
SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
|
142
|
+
|
143
|
+
@REM -- 4NT shell
|
144
|
+
if "%@eval[2+2]" == "4" goto 4NTCWJars
|
145
|
+
|
146
|
+
@REM -- Regular WinNT shell
|
147
|
+
for %%i in ("%M2_HOME%"\boot\plexus-classworlds-*) do set CLASSWORLDS_JAR="%%i"
|
148
|
+
goto runm2
|
149
|
+
|
150
|
+
@REM The 4NT Shell from jp software
|
151
|
+
:4NTCWJars
|
152
|
+
for %%i in ("%M2_HOME%\boot\plexus-classworlds-*") do set CLASSWORLDS_JAR="%%i"
|
153
|
+
goto runm2
|
154
|
+
|
155
|
+
@REM Start MAVEN2
|
156
|
+
:runm2
|
157
|
+
set CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
|
158
|
+
%MAVEN_JAVA_EXE% %MAVEN_OPTS% -classpath %CLASSWORLDS_JAR% "-Dclassworlds.conf=%M2_HOME%\bin\translate.conf" "-Dmaven.home=%M2_HOME%" %CLASSWORLDS_LAUNCHER% %MAVEN_CMD_LINE_ARGS%
|
159
|
+
if ERRORLEVEL 1 goto error
|
160
|
+
goto end
|
161
|
+
|
162
|
+
:error
|
163
|
+
if "%OS%"=="Windows_NT" @endlocal
|
164
|
+
if "%OS%"=="WINNT" @endlocal
|
165
|
+
set ERROR_CODE=1
|
166
|
+
|
167
|
+
:end
|
168
|
+
@REM set local scope for the variables with windows NT shell
|
169
|
+
if "%OS%"=="Windows_NT" goto endNT
|
170
|
+
if "%OS%"=="WINNT" goto endNT
|
171
|
+
|
172
|
+
@REM For old DOS remove the set variables from ENV - we assume they were not set
|
173
|
+
@REM before we started - at least we don't leave any baggage around
|
174
|
+
set MAVEN_JAVA_EXE=
|
175
|
+
set MAVEN_CMD_LINE_ARGS=
|
176
|
+
goto postExec
|
177
|
+
|
178
|
+
:endNT
|
179
|
+
@endlocal & set ERROR_CODE=%ERROR_CODE%
|
180
|
+
|
181
|
+
:postExec
|
182
|
+
if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
|
183
|
+
@REM pause the batch file if MAVEN_BATCH_PAUSE is set to 'on'
|
184
|
+
if "%MAVEN_BATCH_PAUSE%" == "on" pause
|
185
|
+
|
186
|
+
if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
|
187
|
+
|
188
|
+
cmd /C exit /B %ERROR_CODE%
|
189
|
+
|
190
|
+
|