[ 
https://issues.apache.org/jira/browse/NETBEANS-296?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17436489#comment-17436489
 ] 

Goran Karlic commented on NETBEANS-296:
---------------------------------------

There seems to be a regression relating to maven-surefire-plugin 3.0.0-M4.

When using maven-surefire-plugin 3.0.0-M3 (or older) the debug console output 
is properly hyperlinked.

When using maven-surefire-plugin 3.0.0-M4 (or later) the exactly same debug 
console output is NOT hyperlinked.

This seems to be related to maven-surefire-plugin 3.0.0-M4 using "[...] 
extensions of reporters which can be used to customize XML report, console and 
file reporters" (see 
[https://maven.apache.org/surefire/maven-surefire-plugin/index.html).]

If it helps, one can compare the changes between maven-surefire-plugin 3.0.0-M3 
and 3.0.0-M4: 
[https://github.com/apache/maven-surefire/compare/surefire-3.0.0-M3...surefire-3.0.0-M4]

> Add hyperlinks to stacktraces outputted by Maven Surefire
> ---------------------------------------------------------
>
>                 Key: NETBEANS-296
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-296
>             Project: NetBeans
>          Issue Type: Improvement
>          Components: platform - Output Window
>         Environment: Product Version: Apache NetBeans IDE Dev (Build 
> 20180117-unknown-revn)
> Updates: Updates available
> Java: 9.0.1; Java HotSpot(TM) 64-Bit Server VM 9.0.1+11
> Runtime: Java(TM) SE Runtime Environment 9.0.1+11
> System: Windows 10 version 10.0 running on amd64; Cp1252; en_CA (nb)
> User directory: C:\Users\Gili\AppData\Roaming\NetBeans\dev
> Cache directory: C:\Users\Gili\AppData\Local\NetBeans\Cache\dev
>            Reporter: Gili
>            Priority: Major
>
> If Surefire runs a test that throws an exception we see the stacktrace in the 
> Output Window but the line items are not hyperlinked back to the source-code. 
> For example, given:
> {code}
> removeOrders(com.holdmyspot.pyramid.bitstamp.OrderEventListenerTest)  Time 
> elapsed: 13.942 s  <<< FAILURE!
> java.lang.IllegalArgumentException: 
> amount must be positive.
> Actual: 0
>       at com.holdmyspot.pyramid.exchange.Order.<init>(Order.java:42)
>       at 
> com.holdmyspot.pyramid.bitstamp.OrderStream$OrderEventSubscriber.onEvent(OrderStream.java:209)
>       at 
> com.holdmyspot.pyramid.bitstamp.OrderEventListenerTest.removeOrders(OrderEventListenerTest.java:74)
>       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>       at 
> sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
>       at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
>       at java.lang.reflect.Method.invoke(Method.java:498)
>       at 
> org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:124)
>       at org.testng.internal.Invoker.invokeMethod(Invoker.java:571)
>       at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:707)
>       at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:979)
>       at 
> org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
>       at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
>       at org.testng.TestRunner.privateRun(TestRunner.java:648)
>       at org.testng.TestRunner.run(TestRunner.java:505)
>       at org.testng.SuiteRunner.runTest(SuiteRunner.java:455)
>       at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:450)
>       at org.testng.SuiteRunner.privateRun(SuiteRunner.java:415)
>       at org.testng.SuiteRunner.run(SuiteRunner.java:364)
>       at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
>       at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:84)
>       at org.testng.TestNG.runSuitesSequentially(TestNG.java:1187)
>       at org.testng.TestNG.runSuitesLocally(TestNG.java:1116)
>       at org.testng.TestNG.runSuites(TestNG.java:1028)
>       at org.testng.TestNG.run(TestNG.java:996)
>       at 
> org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:135)
>       at 
> org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.executeSingleClass(TestNGDirectoryTestSuite.java:112)
>       at 
> org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:99)
>       at 
> org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:146)
>       at 
> org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:373)
>       at 
> org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:334)
>       at 
> org.apache.maven.surefire.booter.ForkedBooter.execute(ForkedBooter.java:119)
>       at 
> org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:407)
> {code}
> We should be able to click on stacktrace elements and the editor should jump 
> to the associated file and line number. I believe this behavior works for Ant 
> projects but it work in most cases for Maven projects.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

---------------------------------------------------------------------
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

Reply via email to