mbien commented on PR #5482: URL: https://github.com/apache/netbeans/pull/5482#issuecomment-1435472476
don't worry, I don't want to make your build slower, I just want to avoid regressions. going to test this draft commit a bit: https://github.com/mbien/netbeans/commit/ec86b62f2b9072910b6b948f59abf190b5068c86 ```diff diff --git a/java/maven/src/org/netbeans/modules/maven/execute/MavenCommandLineExecutor.java b/java/maven/src/org/netbeans/modules/maven/execute/MavenCommandLineExecutor.java index 6f073f4822b5..0ee978e322ca 100644 --- a/java/maven/src/org/netbeans/modules/maven/execute/MavenCommandLineExecutor.java +++ b/java/maven/src/org/netbeans/modules/maven/execute/MavenCommandLineExecutor.java @@ -319,7 +319,7 @@ public void actionPerformed(ActionEvent e) { handle.start(); processInitialMessage(); boolean isMaven3 = !isMaven2(); - boolean singlethreaded = !isMavenDaemon() && !isMultiThreaded(clonedConfig); + boolean singlethreaded = !isMultiThreaded(clonedConfig); boolean eventSpyCompatible = isEventSpyCompatible(clonedConfig); if (isMaven3 && singlethreaded && eventSpyCompatible) { injectEventSpy( clonedConfig ); @@ -893,7 +893,11 @@ private boolean isMultiThreaded(BeanRunConfig clonedConfig) { list = list + " " + s; } } - return list.contains("-T") || list.contains("--threads"); + boolean mvnd = isMavenDaemon(); + if (mvnd && (list.contains("-T 1") || list.contains("--threads 1"))) { + return false; + } + return mvnd || list.contains("-T") || list.contains("--threads"); } private File guessBestMaven(RunConfig clonedConfig, InputOutput ioput) { diff --git a/java/maven/src/org/netbeans/modules/maven/output/TestOutputListenerProvider.java b/java/maven/src/org/netbeans/modules/maven/output/TestOutputListenerProvider.java index 0a7d6bfe084b..85272f6736fe 100644 --- a/java/maven/src/org/netbeans/modules/maven/output/TestOutputListenerProvider.java +++ b/java/maven/src/org/netbeans/modules/maven/output/TestOutputListenerProvider.java @@ -123,8 +123,12 @@ public void processLine(String line, OutputVisitor visitor) { } match = runningPattern2.matcher(line); if (match.matches()) { + OutputVisitor.Context context = visitor.getContext(); + if (context == null) { + return; + } try { - Object defaultValue = PluginPropertyUtils.createEvaluator(visitor.getContext().getCurrentProject()) + Object defaultValue = PluginPropertyUtils.createEvaluator(context.getCurrentProject()) .evaluate("${project.build.directory}/surefire-reports"); if (defaultValue instanceof String) { outputDir = (String) defaultValue; ``` -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
