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 206925 - Output window hyperlink to POM does not point into submodule
Summary: Output window hyperlink to POM does not point into submodule
Status: RESOLVED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Maven (show other bugs)
Version: 7.1
Hardware: PC Linux
: P4 normal with 1 vote (vote)
Assignee: Milos Kleint
URL:
Keywords:
Depends on: 194090
Blocks:
  Show dependency tree
 
Reported: 2012-01-04 20:09 UTC by massimo
Modified: 2013-04-09 05:40 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
top maven project, variation 0 (11.20 KB, application/zip)
2012-01-04 20:09 UTC, massimo
Details
top maven project, variation 1 (11.28 KB, application/zip)
2012-01-04 20:10 UTC, massimo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description massimo 2012-01-04 20:09:16 UTC
Created attachment 114645 [details]
top maven project, variation 0

Attaching two zips: nbbug and nbbug1 containing two variations of the same maven project:
*top pom
*mavenproject1
*sub pom
**mavenproject2

In both mavenproject1 and mavenproject1 there is a dependency that is duplicated causing maven to warn you of the problem when compiling.
The Output window will say something like:

Some problems were encountered while building the effective model for com.mycompany.top:mavenproject1:jar:1.0-SNAPSHOT
'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: log4j:log4j:jar -> duplicate declaration of version (?) @ line 23, column 19

which does show you the correct location of the issue, but if you click on the hyperlink, it will go into the top pom, not the pom of the module of where the dependency is duplicated.
Comment 1 massimo 2012-01-04 20:10:42 UTC
Created attachment 114646 [details]
top maven project, variation 1
Comment 2 Jesse Glick 2012-01-05 13:01:44 UTC
Because Maven itself offers no file path:

[WARNING] Some problems were encountered while building the effective model for com.mycompany.top:mavenproject1:jar:1.0-SNAPSHOT
[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: log4j:log4j:jar -> duplicate declaration of version (?) @ line 23, column 19
[WARNING] 
[WARNING] Some problems were encountered while building the effective model for com.mycompany.top.sub:mavenproject2:jar:1.0-SNAPSHOT
[WARNING] 'dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: org.slf4j:slf4j-log4j12:jar -> duplicate declaration of version (?) @ line 28, column 19

so the IDE's hyperlinker just guesses that line/column numbers are in the POM you started the build with. Not trivially solvable; loading project models for all submodules to find matching coordinates when a hyperlink is clicked would be possible, but potentially slow on big trees.
Comment 3 massimo 2012-01-05 17:43:37 UTC
Makes sense. Would it be possible to remove the hyper-linking altogether then? That would apply, i guess, to all hyperlinks in the Output Window that happen to not hyperlink correctly, for the sake of not being confusing.
Comment 4 Jesse Glick 2012-01-05 18:44:21 UTC
Possible, though I would prefer to see if it can be fixed properly.
Comment 5 Milos Kleint 2013-04-09 05:40:12 UTC
fixed as part of https://hg.netbeans.org/core-main/rev/71289f0dadeb

only fixed when build occurs with maven 3.x, not 2.x