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 243992 - Refactoring doesn't work when using jar built from war dependency maven
Summary: Refactoring doesn't work when using jar built from war dependency maven
Status: RESOLVED WORKSFORME
Alias: None
Product: projects
Classification: Unclassified
Component: Maven (show other bugs)
Version: 8.0
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Tomas Stupka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-04-22 12:31 UTC by busbus
Modified: 2016-07-19 14:59 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Project sample (20.90 KB, application/x-zip-compressed)
2014-07-16 08:22 UTC, busbus
Details

Note You need to log in before you can comment on or make changes to this bug.
Description busbus 2014-04-22 12:31:33 UTC
Hi,

I'm facing a problem that is pretty annoying. Here's an example to illustrate my problem : (I'm using maven)

I have a parent POM. In this one, project A (jar type), project B (war type).

Project B provides common code in JS and Java, that will be used in other projects. From Project B, we generate the war file, and a jar file from source code (with "attachClasses" option for maven war plugin).

Project A has a dependency to B, especially with the classifier "classes" that refers to jar generated from B.

This is how my project is set at this moment.

The problem is when I want to refactor (change name of a method for instance) some stuff in project B, the IDE doesn't see changes in project A. So if I recompile B, A will see errors because refactoring won't have been reflected.

Is it a bug ?
Comment 1 Tomas Stupka 2014-07-09 16:16:30 UTC
could not reproduce. any chance to provide some simple example projects ?

and please, don't get me wrong, but do you have both projects open in the IDE when refactoring?

thanks
Comment 2 busbus 2014-07-16 08:22:25 UTC
Created attachment 148079 [details]
Project sample
Comment 3 busbus 2014-07-16 08:24:19 UTC
Comment on attachment 148079 [details]
Project sample

Here is a sample project that show my problem. Try to use "find usage" on method "sayHello" or try to change his name. Modifications will be available on project A after the compilation of B
Comment 4 busbus 2015-07-06 15:35:05 UTC
Up :)
Comment 5 Martin Balin 2016-07-07 08:37:44 UTC
This old bug may not be relevant anymore. If you can still reproduce it in 8.2 development builds please reopen this issue.

Thanks for your cooperation,
NetBeans IDE 8.2 Release Boss
Comment 6 bht 2016-07-10 05:01:10 UTC
It still reproduces in the 8.2 latest build 201607090002.
Comment 7 Tomas Stupka 2016-07-19 14:59:54 UTC
setting the ProjectB dependency in ProjectA to <type>jar</type> solved the refactoring problem