This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
Currently the Options dialog lets you set an external Maven home, but will use embedded Maven for execution if: 1. No external home is specified and mvn cannot be found in $PATH. or 2. The project requests it, in a checkbox in the Actions panel. In either case, a warning dialog is displayed that the embedded Maven might be unstable, since in previous releases we were embedding an unreleased snapshot. When we embed the final version of Maven 3.0, this policy should be reconsidered, as embedded execution _might_ be as reliable as external execution. Then again, there might still be class loading issues which make it problematic. Another option would be to used the JARs from the embedded Maven but fork the Java process. M3 does not seem to use the ClassWorlds "überjar" so we could perhaps bundle a complete M3 distribution inside NB. This would remove a code path (see bug #188913) while permitting people to build Maven projects out of the box. (Though without possible performance benefits of in-process execution; compare http://shell.sonatype.org/ which might give the best of both worlds.)
(In reply to comment #0) > Another option would be to used the JARs from the embedded Maven but fork the > Java process. M3 does not seem to use the ClassWorlds "überjar" so we could > perhaps bundle a complete M3 distribution inside NB. In fact it seems it is possible to use the existing layout! Create ---%<--- .../m3.conf main is org.apache.maven.cli.MavenCli from plexus.core [plexus.core] load ${maven.home}/*.jar ---%<--- and run java -cp .../java/modules/ext/maven/plexus-classworlds-2.2.3.jar -Dclassworlds.conf=.../m3.conf -Dmaven.home=.../java/modules/ext/maven org.codehaus.plexus.classworlds.launcher.Launcher <usual args...> and it seems to work fine. Of course this is not loading ~/.mavenrc etc., which might be significant for some users. Simpler would however be to rearrange the JARs NB uses into the standard layout. Need to be careful since NB uses a patched version of xbean-reflect-3.4.jar.
(In reply to comment #0) > use the JARs from the embedded Maven but fork the Java process core-main #6aeef20f698d
*** Bug 165635 has been marked as a duplicate of this bug. ***
*** Bug 180769 has been marked as a duplicate of this bug. ***
*** Bug 169504 has been marked as a duplicate of this bug. ***
Integrated into 'main-golden', will be available in build *201008250001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/6aeef20f698d User: Jesse Glick <jglick@netbeans.org> Log: #188959: disable embedded Maven executor; use bundled Maven installation by default rather than checking $PATH.