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.

Bug 259108 - Links in Output window don't work ("Cannot follow link. Test output directory is missing").
Summary: Links in Output window don't work ("Cannot follow link. Test output directory...
Status: RESOLVED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Maven (show other bugs)
Version: 8.1
Hardware: PC Windows 10 x64
: P3 normal (vote)
Assignee: Tomas Stupka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-05-03 12:12 UTC by Yaytay
Modified: 2017-07-20 17:51 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Adds a pattern to TestOutputListenerProvider, and looks up the report directory from the project. Works for me. (2.72 KB, text/plain)
2017-07-02 09:21 UTC, _ tboudreau
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yaytay 2016-05-03 12:12:22 UTC
Hi,

None of the links in the "Output - Build" window workfor my maven projects.
When I click on a link a brief message appears in the status bar saying: "Cannot follow link. Test output directory is missing" and an entry is written to the log file: INFO [org.netbeans.modules.maven.output.TestOutputListenerProvider]: Cannot find path null to follow link in Output Window.


The version of TestOutputListenerProvider.java on grepcode.com has:
outDirPattern = Pattern.compile(".*Surefire report directory\\: (.*)", Pattern.DOTALL); //NOI18N
outDirPattern2 = Pattern.compile(".*Setting reports dir\\: (.*)", Pattern.DOTALL); //NOI18N
The directories I have under /target/ are:
    classes
    coverage-reports
    generated-sources
    generated-test-sources
    maven-status
    surefire-reports
    test-classes

Thanks.

Jim
Comment 1 Tomas Stupka 2016-05-17 13:06:08 UTC
what surefire version do you use?
Comment 2 Yaytay 2016-05-17 13:11:51 UTC
<plugin>
	<groupId>org.apache.maven.plugins</groupId>
	<artifactId>maven-surefire-plugin</artifactId>
	<version>2.19.1</version>
	<configuration>
		<forkCount>1</forkCount>
		<reuseForks>false</reuseForks>
		<systemPropertyVariables>
			<targetDir>${basedir}\target</targetDir>
<org.apache.cxf.Logger>org.apache.cxf.common.logging.Slf4jLogger</org.apache.cxf.Logger>
		</systemPropertyVariables>
		<trimStackTrace>false</trimStackTrace>
	</configuration>
</plugin>
Comment 3 Tomas Stupka 2016-05-17 13:15:07 UTC

*** This bug has been marked as a duplicate of bug 257563 ***
Comment 4 Yaytay 2016-05-17 13:19:01 UTC
This isn't a duplicate of that bug - I can't follow links for compilation errors either.
These links show up but don't work:
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.5:compile (default-compile) on project vacancy.router.core: Compilation failure: Compilation failure:
[ERROR] /D:/Work/shared_content_router/content_router_core/src/main/java/com/groupgti/shared/router/entity/TargetSet.java:[17,44] ';' expected
[ERROR] /D:/Work/shared_content_router/content_router_core/src/main/java/com/groupgti/shared/router/entity/TargetSet.java:[17,52] <identifier> expected


Maybe I'm suffering from two distinct bugs, but I'm not getting any links that work in the output  window.
Comment 5 Yaytay 2016-05-17 13:22:52 UTC
Yes, it does look like two disctinct issues.
If I drop surefire to 2.18.1 links for failed tests are working, but links for compilation failures aren't.

No message appears for the failure of compilation error links.
Comment 6 _ tboudreau 2017-05-28 02:52:55 UTC
I run into this daily, running daily builds.  To reproduce:

git clone https://github.com/timboudreau/mastfrog-parent.git
cd mastfrog-parent
./init

Then build any subproject in NetBeans, with a failing test (it contains subprojects which are git submodules, with the parent in parent/pom.xml).  Test failure links do not work.

Have tried with surefire 2.19.1 and 2.20.
Comment 7 tombart 2017-06-14 19:30:49 UTC
Same issue on Linux with clean installation of NetBeans 8.2 on Openjdk8 and surefire 2.20
Comment 8 javydreamercsw 2017-06-28 19:32:24 UTC
It's kind of related. It'll work with surefire 2.18.1. Something got changed in surfire 2.19 that was considered a bug and they fixed, but still it breaks NetBeans functionality.

On 2.19 NetBeans was unable to "see" the test results and was unable to show them in the test result window. This was fixed on surefire 2.20 but the links still are broken.

I have found two options:
1) Downgrade to 2.18.1.
2) Change configuration of surefire to display the full stack trace as follows:

<plugin>
                    <groupId>org.apache.maven.plugins</groupId>
                    <artifactId>maven-surefire-plugin</artifactId>
                    <version>2.20</version>
                    <configuration>
                        <trimStackTrace>false</trimStackTrace>
                        <argLine>-Dfile.encoding=${project.build.sourceEncoding}</argLine>
                    </configuration>
                </plugin>

The link won't work, but you'll have the infor in the output (without links)
Comment 9 _ tboudreau 2017-07-02 09:20:40 UTC
Links do not work in output 100% of the time for me with surefire 2.20.

It appears that there are some fixes for this sort of issue in maven.junit (looking up the test folder from the project because in 2.19 and later it is not printed), but those changes are not used in TestOutputListenerProvider.

I'm attaching a patch that fixes the problem.
Comment 10 _ tboudreau 2017-07-02 09:21:36 UTC
Created attachment 164675 [details]
Adds a pattern to TestOutputListenerProvider, and looks up the report directory from the project.  Works for me.
Comment 11 Tomas Stupka 2017-07-17 17:14:03 UTC
fixed in jet-main #4a0595619e5b
Comment 12 Tomas Stupka 2017-07-17 17:15:17 UTC
thanks for the patch
Comment 13 Quality Engineering 2017-07-20 17:51:21 UTC
Integrated into 'main-silver', will be available in build *201707201608* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/4a0595619e5b
User: Tomas Stupka <tstupka@netbeans.org>
Log: Issue #259108 - Links in Output window don't work ("Cannot follow link. Test output directory is missing").