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 154016 - multi-module maven2 project build errors from module B are not shown in depending module when build fails
Summary: multi-module maven2 project build errors from module B are not shown in depen...
Status: RESOLVED WORKSFORME
Alias: None
Product: java
Classification: Unclassified
Component: Classpath (show other bugs)
Version: 6.x
Hardware: All All
: P4 blocker (vote)
Assignee: Tomas Zezula
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-27 12:53 UTC by tonynys
Modified: 2012-10-26 06:03 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
netbeans maven showcase multi module (15.75 KB, application/x-gzip)
2008-11-28 09:42 UTC, tonynys
Details
attacched now with correct mime type (15.75 KB, application/octet-stream)
2008-11-28 09:44 UTC, tonynys
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tonynys 2008-11-27 12:53:07 UTC
I have on netbeans 6.5 a maven2 multi-module project with a main aggregator project
1) I change module A an API definition
2) I build/install module A into the local repo
3) I build/install module B, and maven show in the console the build errors (this step has no effect)
=> the build errors are shown in the maven console, but do not cause a compilation error (red icon)
on project B

all my maven versions of my modules have the syntax '4-SNAPSHOT'

If this would work it would be a great help, since refactoring in module A should immediately reflect the impact
(compilation errors) on all modules which have a dependency to A.

There is one note; If I set the version of module A to "LATEST" and the dependency in module B to A also to "LATEST",
then the build errors are reflected immediately into module B (so after step 2), so step 3 is not really needed.
Comment 1 Milos Kleint 2008-11-28 07:13:11 UTC
under your project's libraries nodes, do you see the dependencies on your own projects as maven project icon, or regular
jar icon?

the only thing that could cause the effects you describe is when the projects are not linked together eg. the opened
project A is different version than the B project depends on.

Comment 2 tonynys 2008-11-28 09:41:37 UTC
the icon shows as a maven dependency library icon
I've recreated a sample problem case with a 
parent pom, 
root(aggregator) pom, 
service-interface module ('project a')
service-rating module ('project b')

service rating depends on service-interface

if I change service-interface (module A) api's, and build service-interface, the errors on service-rating (module B)
are not shown,
If i build service-rating manually (after building service interface), maven shows compile errors, but they
are not reflected in the IDE
 
Comment 3 tonynys 2008-11-28 09:42:43 UTC
Created attachment 74265 [details]
netbeans maven showcase multi module
Comment 4 tonynys 2008-11-28 09:44:16 UTC
Created attachment 74266 [details]
attacched now with correct mime type
Comment 5 tonynys 2008-12-04 07:44:01 UTC
Can someone confirm this bug or explain what is happening ?
If this issue is resolved, I am happy to migrate my complete development team from Eclipse to Netbeans.


Comment 6 Milos Kleint 2008-12-04 10:19:58 UTC
reassigning to java support.
jlahoda: I think we had this sort of issue before (reported in 6.1 and supposedly fixed in 6.5 dev times) and it seems
to reappear again.

When changing the interface in project A, the badging in project B (now uncompilable) doesn't change. I have to open the
affected file in editor, to get the errors in editor and strangely I need to close the file in order to get error marks
in projects view. Without it, the project B will not change. I've done no maven building in between, so the jar versions
in local repository stay the same and the IDE's compilation does indeed reflect the change opened project sources.
Comment 7 Jan Lahoda 2008-12-04 14:24:05 UTC
Sounds like issue #147000...

*** This issue has been marked as a duplicate of 147000 ***
Comment 8 tonynys 2009-05-07 19:20:19 UTC
tested with netbeans 6.7beta
functionally dependencies multi-module work, but icon of source-file in error is not turning red,
only when you add eg. a blank line and ctrl-s to save it, then the package and sourcefile icon is turning red
Comment 9 viulian 2009-07-28 10:08:06 UTC
It happens the same for me, I'm using Netbeans 6.7 (Build 200906241340)

Also, another thing:
a) update module A from SVN (one class has a new member).
b) update module B from SVN (one class (let's say class X) references the new member, but I get a conflict with my local
version of class X, and I have to merge).

I do the merging / mark as resolved for X. Netbeans properly displays a red icon for X, as I did not yet compile /
install module A. So I do Clean and Build module A, then Clean and Build module B, result is that maven compiles properly. 

However, in Projects view, class X still appears with a red Icon. The only way I found to make it disappear is to close
Netbeans and reopen. I don't even have to compile afterwards, it figures out by himself that everything is OK.

I tried to edit the file and re-save, refresh the local repo, nothing ...
Comment 10 David Strupl 2012-10-25 13:41:40 UTC
Bug prior to 7.0, not touched for the last 2 years --> P4.
Comment 11 Tomas Zezula 2012-10-26 06:03:04 UTC
I've tried and works fine in dev.