tetra 0.46.0 → 0.48.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.rubocop.yml +6 -0
- data/README.md +5 -12
- data/SPECIAL_CASES.md +3 -74
- data/integration-tests/build-commons.sh +5 -8
- data/lib/template/kit/CONTENTS +4 -3
- data/lib/template/kit/apache-ant-1.9.4/INSTALL +2 -0
- data/lib/template/kit/apache-ant-1.9.4/KEYS +1497 -0
- data/lib/template/kit/apache-ant-1.9.4/LICENSE +272 -0
- data/lib/template/kit/apache-ant-1.9.4/NOTICE +9 -0
- data/lib/template/kit/apache-ant-1.9.4/README +97 -0
- data/lib/template/kit/apache-ant-1.9.4/WHATSNEW +6108 -0
- data/lib/template/kit/apache-ant-1.9.4/bin/ant +336 -0
- data/lib/template/kit/apache-ant-1.9.4/bin/ant.bat +218 -0
- data/lib/template/kit/apache-ant-1.9.4/bin/ant.cmd +93 -0
- data/lib/template/kit/apache-ant-1.9.4/bin/antRun +24 -0
- data/lib/template/kit/apache-ant-1.9.4/bin/antRun.bat +50 -0
- data/lib/template/kit/apache-ant-1.9.4/bin/antRun.pl +66 -0
- data/lib/template/kit/apache-ant-1.9.4/bin/antenv.cmd +98 -0
- data/lib/template/kit/apache-ant-1.9.4/bin/complete-ant-cmd.pl +114 -0
- data/lib/template/kit/apache-ant-1.9.4/bin/envset.cmd +131 -0
- data/lib/template/kit/apache-ant-1.9.4/bin/lcp.bat +31 -0
- data/lib/template/kit/apache-ant-1.9.4/bin/runant.pl +153 -0
- data/lib/template/kit/apache-ant-1.9.4/bin/runant.py +102 -0
- data/lib/template/kit/apache-ant-1.9.4/bin/runrc.cmd +60 -0
- data/lib/template/kit/apache-ant-1.9.4/etc/ant-bootstrap.jar +0 -0
- data/lib/template/kit/apache-ant-1.9.4/etc/changelog.xsl +148 -0
- data/lib/template/kit/apache-ant-1.9.4/etc/checkstyle/checkstyle-frames.xsl +299 -0
- data/lib/template/kit/apache-ant-1.9.4/etc/checkstyle/checkstyle-text.xsl +34 -0
- data/lib/template/kit/apache-ant-1.9.4/etc/checkstyle/checkstyle-xdoc.xsl +130 -0
- data/lib/template/kit/apache-ant-1.9.4/etc/coverage-frames.xsl +489 -0
- data/lib/template/kit/apache-ant-1.9.4/etc/jdepend-frames.xsl +487 -0
- data/lib/template/kit/apache-ant-1.9.4/etc/jdepend.xsl +276 -0
- data/lib/template/kit/apache-ant-1.9.4/etc/junit-frames-xalan1.xsl +745 -0
- data/lib/template/kit/apache-ant-1.9.4/etc/junit-frames.xsl +955 -0
- data/lib/template/kit/apache-ant-1.9.4/etc/junit-noframes.xsl +496 -0
- data/lib/template/kit/apache-ant-1.9.4/etc/log.xsl +203 -0
- data/lib/template/kit/apache-ant-1.9.4/etc/maudit-frames.xsl +503 -0
- data/lib/template/kit/apache-ant-1.9.4/etc/mmetrics-frames.xsl +1026 -0
- data/lib/template/kit/apache-ant-1.9.4/etc/tagdiff.xsl +179 -0
- data/lib/template/kit/apache-ant-1.9.4/fetch.xml +335 -0
- data/lib/template/kit/apache-ant-1.9.4/get-m2.xml +121 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/README +3 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-antlr.jar +0 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-antlr.pom +75 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-apache-bcel.jar +0 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-apache-bcel.pom +71 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-apache-bsf.jar +0 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-apache-bsf.pom +74 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-apache-log4j.jar +0 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-apache-log4j.pom +69 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-apache-oro.jar +0 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-apache-oro.pom +74 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-apache-regexp.jar +0 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-apache-regexp.pom +70 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-apache-resolver.jar +0 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-apache-resolver.pom +69 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-apache-xalan2.jar +0 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-apache-xalan2.pom +94 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-commons-logging.jar +0 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-commons-logging.pom +70 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-commons-net.jar +0 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-commons-net.pom +75 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-jai.jar +0 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-jai.pom +85 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-javamail.jar +0 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-javamail.pom +78 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-jdepend.jar +0 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-jdepend.pom +72 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-jmf.jar +0 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-jmf.pom +65 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-jsch.jar +0 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-jsch.pom +74 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-junit.jar +0 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-junit.pom +101 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-junit4.jar +0 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-junit4.pom +71 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-launcher.jar +0 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-launcher.pom +57 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-netrexx.jar +0 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-netrexx.pom +98 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-parent.pom +151 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-swing.jar +0 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-swing.pom +66 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-testutil.jar +0 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant-testutil.pom +74 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant.jar +0 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/ant.pom +225 -0
- data/lib/template/kit/apache-ant-1.9.4/lib/libraries.properties +65 -0
- data/lib/template/kit/apache-maven-3.2.5/LICENSE +302 -0
- data/lib/template/kit/apache-maven-3.2.5/NOTICE +8 -0
- data/lib/template/kit/apache-maven-3.2.5/README.txt +77 -0
- data/lib/template/kit/apache-maven-3.2.5/bin/m2.conf +8 -0
- data/lib/template/kit/apache-maven-3.2.5/bin/mvn +202 -0
- data/lib/template/kit/apache-maven-3.2.5/bin/mvn.bat +197 -0
- data/lib/template/kit/apache-maven-3.2.5/bin/mvnDebug +200 -0
- data/lib/template/kit/apache-maven-3.2.5/bin/mvnDebug.bat +200 -0
- data/lib/template/kit/apache-maven-3.2.5/bin/mvnyjp +207 -0
- data/lib/template/kit/apache-maven-3.2.5/boot/plexus-classworlds-2.5.2.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/conf/logging/simplelogger.properties +25 -0
- data/lib/template/kit/apache-maven-3.2.5/conf/settings.xml +257 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/aether-api-1.0.0.v20140518.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/aether-api.license +261 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/aether-connector-basic-1.0.0.v20140518.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/aether-connector-basic.license +261 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/aether-impl-1.0.0.v20140518.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/aether-impl.license +261 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/aether-spi-1.0.0.v20140518.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/aether-spi.license +261 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/aether-transport-wagon-1.0.0.v20140518.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/aether-transport-wagon.license +261 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/aether-util-1.0.0.v20140518.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/aether-util.license +261 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/aopalliance-1.0.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/cdi-api-1.0.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/cdi-api.license +445 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/commons-cli-1.2.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/commons-io-2.2.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/commons-lang-2.6.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/ext/README.txt +2 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/guava-18.0.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/javax.inject-1.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/jsoup-1.7.2.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/jsoup.license +66 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/jsr250-api-1.0.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/jsr250-api.license +406 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/maven-aether-provider-3.2.5.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/maven-aether-provider.license +202 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/maven-artifact-3.2.5.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/maven-artifact.license +202 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/maven-compat-3.2.5.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/maven-compat.license +202 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/maven-core-3.2.5.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/maven-core.license +202 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/maven-embedder-3.2.5.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/maven-embedder.license +202 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/maven-model-3.2.5.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/maven-model-builder-3.2.5.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/maven-model-builder.license +202 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/maven-model.license +202 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/maven-plugin-api-3.2.5.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/maven-plugin-api.license +202 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/maven-repository-metadata-3.2.5.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/maven-repository-metadata.license +202 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/maven-settings-3.2.5.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/maven-settings-builder-3.2.5.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/maven-settings-builder.license +202 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/maven-settings.license +202 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/org.eclipse.sisu.inject-0.3.0.M1.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/org.eclipse.sisu.inject.license +261 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/org.eclipse.sisu.plexus-0.3.0.M1.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/org.eclipse.sisu.plexus.license +261 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/plexus-cipher-1.7.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/plexus-cipher.license +445 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/plexus-component-annotations-1.5.5.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/plexus-interpolation-1.21.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/plexus-sec-dispatcher-1.3.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/plexus-sec-dispatcher.license +445 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/plexus-utils-3.0.20.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/sisu-guice-3.2.3-no_aop.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/slf4j-api-1.7.5.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/slf4j-api.license +190 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/slf4j-simple-1.7.5.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/slf4j-simple.license +190 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/wagon-file-2.8.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/wagon-file.license +202 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/wagon-http-2.8-shaded.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/wagon-http-shared-2.8.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/wagon-http-shared.license +202 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/wagon-http.license +202 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/wagon-provider-api-2.8.jar +0 -0
- data/lib/template/kit/apache-maven-3.2.5/lib/wagon-provider-api.license +202 -0
- data/lib/tetra.rb +30 -29
- data/lib/tetra/facades/ant.rb +27 -0
- data/lib/tetra/{git.rb → facades/git.rb} +29 -24
- data/lib/tetra/facades/mvn.rb +44 -0
- data/lib/tetra/facades/process_runner.rb +65 -0
- data/lib/tetra/facades/tar.rb +20 -0
- data/lib/tetra/{kit_runner.rb → kit.rb} +3 -10
- data/lib/tetra/main.rb +12 -36
- data/lib/tetra/maven_website.rb +1 -1
- data/lib/tetra/packages/archivable.rb +3 -11
- data/lib/tetra/packages/{kit.rb → kit_package.rb} +1 -1
- data/lib/tetra/packages/{built_package.rb → package.rb} +2 -2
- data/lib/tetra/packages/scriptable.rb +27 -15
- data/lib/tetra/project.rb +18 -14
- data/lib/tetra/{commands/ant.rb → ui/ant_subcommand.rb} +5 -5
- data/lib/tetra/ui/dry_run_subcommand.rb +44 -0
- data/lib/tetra/{commands/generate_all.rb → ui/generate_all_subcommand.rb} +5 -5
- data/lib/tetra/{commands/generate_archive.rb → ui/generate_archive_subcommand.rb} +2 -2
- data/lib/tetra/{commands/generate_kit.rb → ui/generate_kit_subcommand.rb} +2 -2
- data/lib/tetra/{commands/generate_script.rb → ui/generate_script_subcommand.rb} +2 -2
- data/lib/tetra/{commands/generate_spec.rb → ui/generate_spec_subcommand.rb} +2 -2
- data/lib/tetra/{commands/get_pom.rb → ui/get_pom_subcommand.rb} +1 -1
- data/lib/tetra/{commands/init.rb → ui/init_subcommand.rb} +1 -1
- data/lib/tetra/{commands/move_jars_to_kit.rb → ui/move_jars_to_kit_subcommand.rb} +1 -1
- data/lib/tetra/{commands/mvn.rb → ui/mvn_subcommand.rb} +5 -5
- data/lib/tetra/{commands/base.rb → ui/subcommand.rb} +19 -6
- data/lib/tetra/version.rb +1 -1
- data/spec/lib/ant_spec.rb +36 -0
- data/spec/lib/archivable_spec.rb +1 -1
- data/spec/lib/built_package_spec.rb +6 -6
- data/spec/lib/kit_package_spec.rb +47 -0
- data/spec/lib/kit_spec.rb +8 -28
- data/spec/lib/mvn_spec.rb +47 -0
- data/spec/lib/project_spec.rb +11 -11
- data/spec/lib/scriptable_spec.rb +8 -16
- data/spec/spec_helper.rb +13 -4
- data/tetra.gemspec +1 -0
- metadata +207 -31
- data/lib/tetra/ant_runner.rb +0 -27
- data/lib/tetra/commands/download_maven_source_jars.rb +0 -29
- data/lib/tetra/commands/dry_run.rb +0 -17
- data/lib/tetra/commands/finish.rb +0 -22
- data/lib/tetra/commands/get_source.rb +0 -30
- data/lib/tetra/commands/list_kit_missing_sources.rb +0 -21
- data/lib/tetra/kit_checker.rb +0 -104
- data/lib/tetra/maven_runner.rb +0 -43
- data/lib/tetra/source_getter.rb +0 -41
- data/spec/lib/ant_runner_spec.rb +0 -45
- data/spec/lib/kit_checker_spec.rb +0 -119
- data/spec/lib/maven_runner_spec.rb +0 -68
- data/spec/lib/source_getter_spec.rb +0 -36
- data/spec/support/kit_runner_examples.rb +0 -15
@@ -0,0 +1,200 @@
|
|
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
|
+
if [ -z "$MAVEN_SKIP_RC" ] ; then
|
42
|
+
|
43
|
+
if [ -f /etc/mavenrc ] ; then
|
44
|
+
. /etc/mavenrc
|
45
|
+
fi
|
46
|
+
|
47
|
+
if [ -f "$HOME/.mavenrc" ] ; then
|
48
|
+
. "$HOME/.mavenrc"
|
49
|
+
fi
|
50
|
+
|
51
|
+
fi
|
52
|
+
|
53
|
+
# OS specific support. $var _must_ be set to either true or false.
|
54
|
+
cygwin=false;
|
55
|
+
darwin=false;
|
56
|
+
mingw=false
|
57
|
+
case "`uname`" in
|
58
|
+
CYGWIN*) cygwin=true ;;
|
59
|
+
MINGW*) mingw=true;;
|
60
|
+
Darwin*) darwin=true
|
61
|
+
#
|
62
|
+
# Look for the Apple JDKs first to preserve the existing behaviour, and then look
|
63
|
+
# for the new JDKs provided by Oracle.
|
64
|
+
#
|
65
|
+
if [ -z "$JAVA_HOME" ] && [ -L /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK ] ; then
|
66
|
+
#
|
67
|
+
# Apple JDKs
|
68
|
+
#
|
69
|
+
export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home
|
70
|
+
fi
|
71
|
+
|
72
|
+
if [ -z "$JAVA_HOME" ] && [ -L /System/Library/Java/JavaVirtualMachines/CurrentJDK ] ; then
|
73
|
+
#
|
74
|
+
# Apple JDKs
|
75
|
+
#
|
76
|
+
export JAVA_HOME=/System/Library/Java/JavaVirtualMachines/CurrentJDK/Contents/Home
|
77
|
+
fi
|
78
|
+
|
79
|
+
if [ -z "$JAVA_HOME" ] && [ -L "/Library/Java/JavaVirtualMachines/CurrentJDK" ] ; then
|
80
|
+
#
|
81
|
+
# Oracle JDKs
|
82
|
+
#
|
83
|
+
export JAVA_HOME=/Library/Java/JavaVirtualMachines/CurrentJDK/Contents/Home
|
84
|
+
fi
|
85
|
+
;;
|
86
|
+
esac
|
87
|
+
|
88
|
+
if [ -z "$JAVA_HOME" ] ; then
|
89
|
+
if [ -r /etc/gentoo-release ] ; then
|
90
|
+
JAVA_HOME=`java-config --jre-home`
|
91
|
+
fi
|
92
|
+
fi
|
93
|
+
|
94
|
+
if [ -z "$M2_HOME" ] ; then
|
95
|
+
## resolve links - $0 may be a link to maven's home
|
96
|
+
PRG="$0"
|
97
|
+
|
98
|
+
# need this for relative symlinks
|
99
|
+
while [ -h "$PRG" ] ; do
|
100
|
+
ls=`ls -ld "$PRG"`
|
101
|
+
link=`expr "$ls" : '.*-> \(.*\)$'`
|
102
|
+
if expr "$link" : '/.*' > /dev/null; then
|
103
|
+
PRG="$link"
|
104
|
+
else
|
105
|
+
PRG="`dirname "$PRG"`/$link"
|
106
|
+
fi
|
107
|
+
done
|
108
|
+
|
109
|
+
saveddir=`pwd`
|
110
|
+
|
111
|
+
M2_HOME=`dirname "$PRG"`/..
|
112
|
+
|
113
|
+
# make it fully qualified
|
114
|
+
M2_HOME=`cd "$M2_HOME" && pwd`
|
115
|
+
|
116
|
+
cd "$saveddir"
|
117
|
+
# echo Using m2 at $M2_HOME
|
118
|
+
fi
|
119
|
+
|
120
|
+
# For Cygwin, ensure paths are in UNIX format before anything is touched
|
121
|
+
if $cygwin ; then
|
122
|
+
[ -n "$M2_HOME" ] &&
|
123
|
+
M2_HOME=`cygpath --unix "$M2_HOME"`
|
124
|
+
[ -n "$JAVA_HOME" ] &&
|
125
|
+
JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
|
126
|
+
[ -n "$CLASSPATH" ] &&
|
127
|
+
CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
|
128
|
+
fi
|
129
|
+
|
130
|
+
# For Migwn, ensure paths are in UNIX format before anything is touched
|
131
|
+
if $mingw ; then
|
132
|
+
[ -n "$M2_HOME" ] &&
|
133
|
+
M2_HOME="`(cd "$M2_HOME"; pwd)`"
|
134
|
+
[ -n "$JAVA_HOME" ] &&
|
135
|
+
JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
|
136
|
+
# TODO classpath?
|
137
|
+
fi
|
138
|
+
|
139
|
+
if [ -z "$JAVA_HOME" ]; then
|
140
|
+
javaExecutable="`which javac`"
|
141
|
+
if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
|
142
|
+
# readlink(1) is not available as standard on Solaris 10.
|
143
|
+
readLink=`which readlink`
|
144
|
+
if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then
|
145
|
+
javaExecutable="`readlink -f \"$javaExecutable\"`"
|
146
|
+
javaHome="`dirname \"$javaExecutable\"`"
|
147
|
+
javaHome=`expr "$javaHome" : '\(.*\)/bin'`
|
148
|
+
JAVA_HOME="$javaHome"
|
149
|
+
export JAVA_HOME
|
150
|
+
fi
|
151
|
+
fi
|
152
|
+
fi
|
153
|
+
|
154
|
+
if [ -z "$JAVACMD" ] ; then
|
155
|
+
if [ -n "$JAVA_HOME" ] ; then
|
156
|
+
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
157
|
+
# IBM's JDK on AIX uses strange locations for the executables
|
158
|
+
JAVACMD="$JAVA_HOME/jre/sh/java"
|
159
|
+
else
|
160
|
+
JAVACMD="$JAVA_HOME/bin/java"
|
161
|
+
fi
|
162
|
+
else
|
163
|
+
JAVACMD="`which java`"
|
164
|
+
fi
|
165
|
+
fi
|
166
|
+
|
167
|
+
if [ ! -x "$JAVACMD" ] ; then
|
168
|
+
echo "Error: JAVA_HOME is not defined correctly." >&2
|
169
|
+
echo " We cannot execute $JAVACMD" >&2
|
170
|
+
exit 1
|
171
|
+
fi
|
172
|
+
|
173
|
+
if [ -z "$JAVA_HOME" ] ; then
|
174
|
+
echo "Warning: JAVA_HOME environment variable is not set."
|
175
|
+
fi
|
176
|
+
|
177
|
+
CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
|
178
|
+
|
179
|
+
# For Cygwin, switch paths to Windows format before running java
|
180
|
+
if $cygwin; then
|
181
|
+
[ -n "$M2_HOME" ] &&
|
182
|
+
M2_HOME=`cygpath --path --windows "$M2_HOME"`
|
183
|
+
[ -n "$JAVA_HOME" ] &&
|
184
|
+
JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
|
185
|
+
[ -n "$CLASSPATH" ] &&
|
186
|
+
CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
|
187
|
+
fi
|
188
|
+
|
189
|
+
# Provide a "standardized" way to retrieve the CLI args that will
|
190
|
+
# work with both Windows and non-Windows executions.
|
191
|
+
MAVEN_CMD_LINE_ARGS="$@"
|
192
|
+
export MAVEN_CMD_LINE_ARGS
|
193
|
+
|
194
|
+
exec "$JAVACMD" \
|
195
|
+
$MAVEN_OPTS \
|
196
|
+
$MAVEN_DEBUG_OPTS \
|
197
|
+
-classpath "${M2_HOME}"/boot/plexus-classworlds-*.jar \
|
198
|
+
"-Dclassworlds.conf=${M2_HOME}/bin/m2.conf" \
|
199
|
+
"-Dmaven.home=${M2_HOME}" \
|
200
|
+
${CLASSWORLDS_LAUNCHER} "$@"
|
@@ -0,0 +1,200 @@
|
|
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
|
+
@echo Preparing to Execute Maven in Debug Mode
|
42
|
+
|
43
|
+
@REM set %HOME% to equivalent of $HOME
|
44
|
+
if "%HOME%" == "" (set "HOME=%HOMEDRIVE%%HOMEPATH%")
|
45
|
+
|
46
|
+
@REM Execute a user defined script before this one
|
47
|
+
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPre
|
48
|
+
if exist "%HOME%\mavenrc_pre.bat" call "%HOME%\mavenrc_pre.bat"
|
49
|
+
:skipRcPre
|
50
|
+
|
51
|
+
set ERROR_CODE=0
|
52
|
+
|
53
|
+
@REM set local scope for the variables with windows NT shell
|
54
|
+
if "%OS%"=="Windows_NT" @setlocal
|
55
|
+
if "%OS%"=="WINNT" @setlocal
|
56
|
+
|
57
|
+
set MAVEN_DEBUG_OPTS=-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000
|
58
|
+
|
59
|
+
@REM ==== START VALIDATION ====
|
60
|
+
if not "%JAVA_HOME%" == "" goto OkJHome
|
61
|
+
|
62
|
+
echo.
|
63
|
+
echo Error: JAVA_HOME not found in your environment. >&2
|
64
|
+
echo Please set the JAVA_HOME variable in your environment to match the >&2
|
65
|
+
echo location of your Java installation >&2
|
66
|
+
echo.
|
67
|
+
goto error
|
68
|
+
|
69
|
+
:OkJHome
|
70
|
+
if exist "%JAVA_HOME%\bin\java.exe" goto chkMHome
|
71
|
+
|
72
|
+
echo.
|
73
|
+
echo Error: JAVA_HOME is set to an invalid directory. >&2
|
74
|
+
echo JAVA_HOME = "%JAVA_HOME%" >&2
|
75
|
+
echo Please set the JAVA_HOME variable in your environment to match the >&2
|
76
|
+
echo location of your Java installation >&2
|
77
|
+
echo.
|
78
|
+
goto error
|
79
|
+
|
80
|
+
:chkMHome
|
81
|
+
if not "%M2_HOME%"=="" goto valMHome
|
82
|
+
|
83
|
+
if "%OS%"=="Windows_NT" SET "M2_HOME=%~dp0.."
|
84
|
+
if "%OS%"=="WINNT" SET "M2_HOME=%~dp0.."
|
85
|
+
if not "%M2_HOME%"=="" goto valMHome
|
86
|
+
|
87
|
+
echo.
|
88
|
+
echo Error: M2_HOME not found in your environment. >&2
|
89
|
+
echo Please set the M2_HOME variable in your environment to match the >&2
|
90
|
+
echo location of the Maven installation >&2
|
91
|
+
echo.
|
92
|
+
goto error
|
93
|
+
|
94
|
+
:valMHome
|
95
|
+
|
96
|
+
:stripMHome
|
97
|
+
if not "_%M2_HOME:~-1%"=="_\" goto checkMBat
|
98
|
+
set "M2_HOME=%M2_HOME:~0,-1%"
|
99
|
+
goto stripMHome
|
100
|
+
|
101
|
+
:checkMBat
|
102
|
+
if exist "%M2_HOME%\bin\mvn.bat" goto init
|
103
|
+
|
104
|
+
echo.
|
105
|
+
echo Error: M2_HOME is set to an invalid directory. >&2
|
106
|
+
echo M2_HOME = "%M2_HOME%" >&2
|
107
|
+
echo Please set the M2_HOME variable in your environment to match the >&2
|
108
|
+
echo location of the Maven installation >&2
|
109
|
+
echo.
|
110
|
+
goto error
|
111
|
+
@REM ==== END VALIDATION ====
|
112
|
+
|
113
|
+
:init
|
114
|
+
@REM Decide how to startup depending on the version of windows
|
115
|
+
|
116
|
+
@REM -- Windows NT with Novell Login
|
117
|
+
if "%OS%"=="WINNT" goto WinNTNovell
|
118
|
+
|
119
|
+
@REM -- Win98ME
|
120
|
+
if NOT "%OS%"=="Windows_NT" goto Win9xArg
|
121
|
+
|
122
|
+
:WinNTNovell
|
123
|
+
|
124
|
+
@REM -- 4NT shell
|
125
|
+
if "%@eval[2+2]" == "4" goto 4NTArgs
|
126
|
+
|
127
|
+
@REM -- Regular WinNT shell
|
128
|
+
set MAVEN_CMD_LINE_ARGS=%*
|
129
|
+
goto endInit
|
130
|
+
|
131
|
+
@REM The 4NT Shell from jp software
|
132
|
+
:4NTArgs
|
133
|
+
set MAVEN_CMD_LINE_ARGS=%$
|
134
|
+
goto endInit
|
135
|
+
|
136
|
+
:Win9xArg
|
137
|
+
@REM Slurp the command line arguments. This loop allows for an unlimited number
|
138
|
+
@REM of agruments (up to the command line limit, anyway).
|
139
|
+
set MAVEN_CMD_LINE_ARGS=
|
140
|
+
:Win9xApp
|
141
|
+
if %1a==a goto endInit
|
142
|
+
set MAVEN_CMD_LINE_ARGS=%MAVEN_CMD_LINE_ARGS% %1
|
143
|
+
shift
|
144
|
+
goto Win9xApp
|
145
|
+
|
146
|
+
@REM Reaching here means variables are defined and arguments have been captured
|
147
|
+
:endInit
|
148
|
+
SET MAVEN_JAVA_EXE="%JAVA_HOME%\bin\java.exe"
|
149
|
+
|
150
|
+
@REM -- 4NT shell
|
151
|
+
if "%@eval[2+2]" == "4" goto 4NTCWJars
|
152
|
+
|
153
|
+
@REM -- Regular WinNT shell
|
154
|
+
for %%i in ("%M2_HOME%"\boot\plexus-classworlds-*) do set CLASSWORLDS_JAR="%%i"
|
155
|
+
goto runm2
|
156
|
+
|
157
|
+
@REM The 4NT Shell from jp software
|
158
|
+
:4NTCWJars
|
159
|
+
for %%i in ("%M2_HOME%\boot\plexus-classworlds-*") do set CLASSWORLDS_JAR="%%i"
|
160
|
+
goto runm2
|
161
|
+
|
162
|
+
@REM Start MAVEN2
|
163
|
+
:runm2
|
164
|
+
set CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
|
165
|
+
%MAVEN_JAVA_EXE% %MAVEN_OPTS% %MAVEN_DEBUG_OPTS% -classpath %CLASSWORLDS_JAR% "-Dclassworlds.conf=%M2_HOME%\bin\m2.conf" "-Dmaven.home=%M2_HOME%" %CLASSWORLDS_LAUNCHER% %MAVEN_CMD_LINE_ARGS%
|
166
|
+
if ERRORLEVEL 1 goto error
|
167
|
+
goto end
|
168
|
+
|
169
|
+
:error
|
170
|
+
if "%OS%"=="Windows_NT" @endlocal
|
171
|
+
if "%OS%"=="WINNT" @endlocal
|
172
|
+
set ERROR_CODE=1
|
173
|
+
|
174
|
+
:end
|
175
|
+
@REM set local scope for the variables with windows NT shell
|
176
|
+
if "%OS%"=="Windows_NT" goto endNT
|
177
|
+
if "%OS%"=="WINNT" goto endNT
|
178
|
+
|
179
|
+
@REM For old DOS remove the set variables from ENV - we assume they were not set
|
180
|
+
@REM before we started - at least we don't leave any baggage around
|
181
|
+
set MAVEN_JAVA_EXE=
|
182
|
+
set MAVEN_CMD_LINE_ARGS=
|
183
|
+
goto postExec
|
184
|
+
|
185
|
+
:endNT
|
186
|
+
@endlocal & set ERROR_CODE=%ERROR_CODE%
|
187
|
+
|
188
|
+
:postExec
|
189
|
+
|
190
|
+
if not "%MAVEN_SKIP_RC%" == "" goto skipRcPost
|
191
|
+
if exist "%HOME%\mavenrc_post.bat" call "%HOME%\mavenrc_post.bat"
|
192
|
+
:skipRcPost
|
193
|
+
|
194
|
+
@REM pause the batch file if MAVEN_BATCH_PAUSE is set to 'on'
|
195
|
+
if "%MAVEN_BATCH_PAUSE%" == "on" pause
|
196
|
+
|
197
|
+
if "%MAVEN_TERMINATE_CMD%" == "on" exit %ERROR_CODE%
|
198
|
+
|
199
|
+
exit /B %ERROR_CODE%
|
200
|
+
|
@@ -0,0 +1,207 @@
|
|
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
|
+
QUOTED_ARGS=""
|
38
|
+
while [ "$1" != "" ] ; do
|
39
|
+
|
40
|
+
QUOTED_ARGS="$QUOTED_ARGS \"$1\""
|
41
|
+
shift
|
42
|
+
|
43
|
+
done
|
44
|
+
|
45
|
+
if [ -z "$MAVEN_SKIP_RC" ] ; then
|
46
|
+
|
47
|
+
if [ -f /etc/mavenrc ] ; then
|
48
|
+
. /etc/mavenrc
|
49
|
+
fi
|
50
|
+
|
51
|
+
if [ -f "$HOME/.mavenrc" ] ; then
|
52
|
+
. "$HOME/.mavenrc"
|
53
|
+
fi
|
54
|
+
|
55
|
+
fi
|
56
|
+
|
57
|
+
# OS specific support. $var _must_ be set to either true or false.
|
58
|
+
cygwin=false;
|
59
|
+
darwin=false;
|
60
|
+
mingw=false
|
61
|
+
case "`uname`" in
|
62
|
+
CYGWIN*) cygwin=true ;;
|
63
|
+
MINGW*) mingw=true;;
|
64
|
+
Darwin*) darwin=true
|
65
|
+
#
|
66
|
+
# Look for the Apple JDKs first to preserve the existing behaviour, and then look
|
67
|
+
# for the new JDKs provided by Oracle.
|
68
|
+
#
|
69
|
+
if [ -z "$JAVA_HOME" ] && [ -L /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK ] ; then
|
70
|
+
#
|
71
|
+
# Apple JDKs
|
72
|
+
#
|
73
|
+
export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home
|
74
|
+
fi
|
75
|
+
|
76
|
+
if [ -z "$JAVA_HOME" ] && [ -L /System/Library/Java/JavaVirtualMachines/CurrentJDK ] ; then
|
77
|
+
#
|
78
|
+
# Apple JDKs
|
79
|
+
#
|
80
|
+
export JAVA_HOME=/System/Library/Java/JavaVirtualMachines/CurrentJDK/Contents/Home
|
81
|
+
fi
|
82
|
+
|
83
|
+
if [ -z "$JAVA_HOME" ] && [ -L "/Library/Java/JavaVirtualMachines/CurrentJDK" ] ; then
|
84
|
+
#
|
85
|
+
# Oracle JDKs
|
86
|
+
#
|
87
|
+
export JAVA_HOME=/Library/Java/JavaVirtualMachines/CurrentJDK/Contents/Home
|
88
|
+
fi
|
89
|
+
;;
|
90
|
+
esac
|
91
|
+
|
92
|
+
if [ -z "$JAVA_HOME" ] ; then
|
93
|
+
if [ -r /etc/gentoo-release ] ; then
|
94
|
+
JAVA_HOME=`java-config --jre-home`
|
95
|
+
fi
|
96
|
+
fi
|
97
|
+
|
98
|
+
if [ -z "$M2_HOME" ] ; then
|
99
|
+
## resolve links - $0 may be a link to maven's home
|
100
|
+
PRG="$0"
|
101
|
+
|
102
|
+
# need this for relative symlinks
|
103
|
+
while [ -h "$PRG" ] ; do
|
104
|
+
ls=`ls -ld "$PRG"`
|
105
|
+
link=`expr "$ls" : '.*-> \(.*\)$'`
|
106
|
+
if expr "$link" : '/.*' > /dev/null; then
|
107
|
+
PRG="$link"
|
108
|
+
else
|
109
|
+
PRG="`dirname "$PRG"`/$link"
|
110
|
+
fi
|
111
|
+
done
|
112
|
+
|
113
|
+
saveddir=`pwd`
|
114
|
+
|
115
|
+
M2_HOME=`dirname "$PRG"`/..
|
116
|
+
|
117
|
+
# make it fully qualified
|
118
|
+
M2_HOME=`cd "$M2_HOME" && pwd`
|
119
|
+
|
120
|
+
cd "$saveddir"
|
121
|
+
# echo Using m2 at $M2_HOME
|
122
|
+
fi
|
123
|
+
|
124
|
+
# For Cygwin, ensure paths are in UNIX format before anything is touched
|
125
|
+
if $cygwin ; then
|
126
|
+
[ -n "$M2_HOME" ] &&
|
127
|
+
M2_HOME=`cygpath --unix "$M2_HOME"`
|
128
|
+
[ -n "$JAVA_HOME" ] &&
|
129
|
+
JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
|
130
|
+
[ -n "$CLASSPATH" ] &&
|
131
|
+
CLASSPATH=`cygpath --path --unix "$CLASSPATH"`
|
132
|
+
fi
|
133
|
+
|
134
|
+
# For Migwn, ensure paths are in UNIX format before anything is touched
|
135
|
+
if $mingw ; then
|
136
|
+
[ -n "$M2_HOME" ] &&
|
137
|
+
M2_HOME="`(cd "$M2_HOME"; pwd)`"
|
138
|
+
[ -n "$JAVA_HOME" ] &&
|
139
|
+
JAVA_HOME="`(cd "$JAVA_HOME"; pwd)`"
|
140
|
+
# TODO classpath?
|
141
|
+
fi
|
142
|
+
|
143
|
+
if [ -z "$JAVA_HOME" ]; then
|
144
|
+
javaExecutable="`which javac`"
|
145
|
+
if [ -n "$javaExecutable" ] && ! [ "`expr \"$javaExecutable\" : '\([^ ]*\)'`" = "no" ]; then
|
146
|
+
# readlink(1) is not available as standard on Solaris 10.
|
147
|
+
readLink=`which readlink`
|
148
|
+
if [ ! `expr "$readLink" : '\([^ ]*\)'` = "no" ]; then
|
149
|
+
javaExecutable="`readlink -f \"$javaExecutable\"`"
|
150
|
+
javaHome="`dirname \"$javaExecutable\"`"
|
151
|
+
javaHome=`expr "$javaHome" : '\(.*\)/bin'`
|
152
|
+
JAVA_HOME="$javaHome"
|
153
|
+
export JAVA_HOME
|
154
|
+
fi
|
155
|
+
fi
|
156
|
+
fi
|
157
|
+
|
158
|
+
if [ -z "$JAVACMD" ] ; then
|
159
|
+
if [ -n "$JAVA_HOME" ] ; then
|
160
|
+
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
161
|
+
# IBM's JDK on AIX uses strange locations for the executables
|
162
|
+
JAVACMD="$JAVA_HOME/jre/sh/java"
|
163
|
+
else
|
164
|
+
JAVACMD="$JAVA_HOME/bin/java"
|
165
|
+
fi
|
166
|
+
else
|
167
|
+
JAVACMD="`which java`"
|
168
|
+
fi
|
169
|
+
fi
|
170
|
+
|
171
|
+
if [ ! -x "$JAVACMD" ] ; then
|
172
|
+
echo "Error: JAVA_HOME is not defined correctly." >&2
|
173
|
+
echo " We cannot execute $JAVACMD" >&2
|
174
|
+
exit 1
|
175
|
+
fi
|
176
|
+
|
177
|
+
if [ -z "$JAVA_HOME" ] ; then
|
178
|
+
echo "Warning: JAVA_HOME environment variable is not set."
|
179
|
+
fi
|
180
|
+
|
181
|
+
CLASSWORLDS_LAUNCHER=org.codehaus.plexus.classworlds.launcher.Launcher
|
182
|
+
|
183
|
+
# For Cygwin, switch paths to Windows format before running java
|
184
|
+
if $cygwin; then
|
185
|
+
[ -n "$M2_HOME" ] &&
|
186
|
+
M2_HOME=`cygpath --path --windows "$M2_HOME"`
|
187
|
+
[ -n "$JAVA_HOME" ] &&
|
188
|
+
JAVA_HOME=`cygpath --path --windows "$JAVA_HOME"`
|
189
|
+
[ -n "$CLASSPATH" ] &&
|
190
|
+
CLASSPATH=`cygpath --path --windows "$CLASSPATH"`
|
191
|
+
fi
|
192
|
+
|
193
|
+
if [ ! -f "$YJPLIB" ]; then
|
194
|
+
echo "Error: Unable to autodetect the YJP library location. Please set YJPLIB variable" >&2
|
195
|
+
exit 1
|
196
|
+
fi
|
197
|
+
|
198
|
+
MAVEN_OPTS="-agentpath:$YJPLIB=onexit=snapshot,onexit=memory,tracing,onlylocal $MAVEN_OPTS"
|
199
|
+
|
200
|
+
exec "$JAVACMD" \
|
201
|
+
$MAVEN_OPTS \
|
202
|
+
-classpath "${M2_HOME}"/boot/plexus-classworlds-*.jar \
|
203
|
+
"-Dclassworlds.conf=${M2_HOME}/bin/m2.conf" \
|
204
|
+
"-Dmaven.home=${M2_HOME}" \
|
205
|
+
${CLASSWORLDS_LAUNCHER} $QUOTED_ARGS
|
206
|
+
|
207
|
+
|