Skip to content
/ mvnw Public
forked from bdemers/maven-wrapper

The goodness of gradlew ported to be used with Maven.

Notifications You must be signed in to change notification settings

shyiko/mvnw

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 with wget -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

Apache License, Version 2.0

About

The goodness of gradlew ported to be used with Maven.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 92.7%
  • Shell 4.5%
  • Batchfile 2.8%