Closed hmontone closed 4 years ago
MavenWrapperDownloader.java
could be inlined into scripts and generated as a tmp file.
For entrance scripts, it follow the designs of gradle wrapper.
The pros of putting the bootstrap scripts into project:
The wrappers define a project level executable interface convention for triggering the build process. If a project can depend more environments elements other than jdk/os, it could be better to call system mvn
directly, and check the required maven version in pom.
If I am not mistaken, files other than
.mvn/wrapper/maven-wrapper.properties
should not really be in project/repository itself, at least ideally. How about if there was a way to install Maven wrapper in a way thatmvnw
/mvnw.cmd
-scripts would be installed into some directory inPATH
, andMavenWrapperDownloader.java
would be located in some global location (e.g.$HOME/.m2/wrapper/MavenWrapperDownloader.java
). Wrapper-scripts could use.mvn/wrapper/MavenWrapperDownloader.java
if it exists, and fall back to globalMavenWrapperDownloader.java
otherwise. This would have some advantages:maven-wrapper.properties
) into repositorymvn ...
without extraw
-letter or path to current directory. This would be more intuitive way of using Maven for most of us, I think.Currently it is possible to copy
mvnw
-script asmvn
into some directory inPATH
, and it works just fine. However,MavenWrapperDownloader.java
is searched from.mvn/wrapper
-directory under project directory. Straightforward way of fixing this would be to set fallback location ofMavenWrapperDownloader.java
towrapper/MavenWrapperDownloader.java
under the base directory ofsettings.xml
-file.