mvnw on mac
mvnw
Like gradlew but for Maven.
This fork:
- is JDK 6+ compatible
(provided Maven is <= 3.2.5 (by default.mvn/wrapper/maven-wrapper.properties
points to 3.3.9)); - used by mysql-binlog-connector-java, ktlint, ... (which means you can count on it being maintained);
- supports default jvm/command line options (Maven 3.3.1+);
- does not require Maven to be installed in order to integrate mvnw into existing project.
Installation
(within project (root) directory)
curl -sL https://github.com/shyiko/mvnw/releases/download/0.1.0/mvnw.tar.gz | tar xvz
# Maven version can be changed with
(MAVEN_VERSION=3.2.5 &&
sed -iEe "s/[0-9]\+[.][0-9]\+[.][0-9]\+/${MAVEN_VERSION}/g" .mvn/wrapper/maven-wrapper.properties)
If you don't have curl installed - replace
curl -sL
withwget -qO-
.
You'll get the following files (all of which are meant to be committed to VCS):
mvnw # shell script to be used on Linux/Mac OS X mvnw.bat # batch file for Windows .mvn/ .mvn/jvm.config # default jvm options (omitted by default) (example: -Xmx512m) .mvn/maven.config # default command line options (omitted by default) (example: -s settings.xml) .mvn/wrapper/maven-wrapper.jar .mvn/wrapper/maven-wrapper.properties # contains mvnw config options, such as "distributionUrl"
Usage
Instead of mvn ...
use ./mvnw ...
(e.g. ./mvnw clean install
). It will automatically download and install Maven (if needed) (the exact version is specified in .mvn/wrapper/maven-wrapper.properties
).
License
相关推荐
impress 2020-08-26
yieryi 2020-06-02
coderMozart 2020-05-28
sunskyday 2020-04-21
csssy00 2020-04-19
89500297 2020-04-11
从零开始 2020-03-26
牧场SZShepherd 2020-03-04
nercon 2020-03-03
taiyangshenniao 2020-02-18
kekeromer 2020-02-03
sunlizhen 2020-01-18
ameng 2020-01-11