-
Notifications
You must be signed in to change notification settings - Fork 2
[MWRAPPER-16] PoC call mvn(.cmd) script from mvnw(.cmd) #5
base: MWRAPPER-14
Are you sure you want to change the base?
Conversation
@hboutemy I tried to build it locally and have the following:
Happy to try it on a Mac with some projects when it builds. |
uh, strange, I don't have any issue here on my Linux box when launching
first message comes from wrapper.jar, that does not launch Maven but display where Maven is available |
Same here, same error (Linux) as for @jvanzyl |
@hboutemy you somehow locally use 3.3.0 of m-assembly-p, but sources does NOT make that be used. Are you sure you have correct parent or committed all? |
Just checked out and build:
If I edit |
|
Confirm on mac with m-assembly-p 3.3.0 it is ok ... maybe #4 can help to detect early such problems |
ok, I deleted my local parent POMs and now I see the issue: just need to define newer plugin version than inherited |
# local distribution dir is distributionUrl basename without extension | ||
distribution=`basename $distributionUrl .zip` | ||
|
||
mvn=~/.m2/wrapper/dists/$distribution/*/bin/mvn |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here the glob wildcard *
will expand to multiple files or select a wrong version or not expand at all in some posix shell. To invoke the main entrance script, u has to print the full path of the distribution or at least the hash of url.
The cons of this method is that java
would be run twice. While the original way is the java way of exec invoking.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to remove *
, in Unix shell, I suppose we can derive directory name from with basename $distribution -bin
I'm not too much worried in POSIX shell: equivalent implementation in Windows cmd is harder to me
on running java twice, I suppose the script can check if the distribution is already installed to not run the installation java -jar maven-wrapper.jar
if not really necessary
@hboutemy Please note that your shell ( |
tested on Linux: it works
not tested on Mac, I'm not sure of portability
not tested on Windows: implementation is purely theoretical