Use standard name for main thread

DevTools look for a main thread named "main". The maven plugin is
actually using a different value and there is no real reason to. This
change fixes DevTools support as long as forking is enabled.

See gh-3315
This commit is contained in:
Stephane Nicoll 2015-07-24 10:36:14 +02:00
parent 42e230192f
commit e033daed0f

View File

@ -53,7 +53,7 @@ public class RunMojo extends AbstractRunMojo {
throws MojoExecutionException {
IsolatedThreadGroup threadGroup = new IsolatedThreadGroup(startClassName);
Thread launchThread = new Thread(threadGroup, new LaunchRunner(startClassName,
arguments), startClassName + ".main()");
arguments), "main");
launchThread.setContextClassLoader(new URLClassLoader(getClassPathUrls()));
launchThread.start();
join(threadGroup);