Use mvnd as MAVEN_HOME (Apache Netbeans with mvnd ?)
In some contexts you have to configure MAVEN_HOME property to indicate which maven to use, for example on Apache Netbeans IDE you have to choose directory to use to run maven
In this case NB will try to execute
I workarounded this by adding a directory "maven_home" inside mvnd root folder, creating a soft link like this
and then configuring
Is this a good workaround? in that case i will send a PR, this might be useful and we can 'sponsorize' mvnd to Netbeans users
Unfortunately, we need to keep mvn distinct from mvnd, see https://github.com/mvndaemon/mvnd/pull/89
Thanks you @gnodet But I feel that is a different issue (btw I may missing some points)
I'm using a maven distro installed outside mvnd
I want to setup Apache Netbeans using mvnd as maven, so when I'll build a project from NB it will result in
mvnd clean install ..... (more more faster 😀 )
but to do this you have to tell NB a maven home directory to use and NB will use that as path to find the mvn executable:
In order to do this I mocked a directory like mock_maven_home/bin/mvn where "mvn" file points (with a soft link) to mvnd executable
Adding this mock directory does not impact usage with embedded maven or external maven, but is a "short-hand" to enable mvnd on NB
If so, it would be nice to try using mvnd inside eclipse and IntelliJ idea too.
btw NB can use mvnd since NB 13 without having to link anything (https://github.com/apache/netbeans/pull/3210). All you have to do is to register your mvnd distribution in the maven options UI and it will start using it.