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 227537

Summary: Jar/war file view is not refreshed correctly after rebuild
Product: platform Reporter: Petr Jiricka <pjiricka>
Component: FilesystemsAssignee: Jaroslav Havlin <jhavlin>
Status: RESOLVED WORKSFORME    
Severity: normal CC: mkleint
Priority: P3    
Version: 7.3   
Hardware: PC   
OS: Mac OS X   
Issue Type: DEFECT Exception Reporter:
Attachments: Screenshot of NetBeans Files view and a file manager app

Description Petr Jiricka 2013-03-15 16:25:38 UTC
Created attachment 132663 [details]
Screenshot of NetBeans Files view and a file manager app

1. I had a Maven web project which at first copied a dependency to WEB-INF/lib
2. Built the project
3. Modified the project so it no longer copies stuff to WEB-INF/lib
4. Cleaned and built the project

=> The resulting war file does not contain the library, and this is correctly reflected in the expanded archive view under target dir - see the attached screenshot. See also the file size of the war archive in file manager. However, the war file view in the explorer still shows the jar in WEB-INF/lib, which was previously removed by the rebuild.
Comment 1 Milos Kleint 2013-03-15 16:30:34 UTC
was the favourites view different for example? I believe there is neither maven nor project specific code involved in showing the content of the jar/war file
Comment 2 Petr Jiricka 2013-03-15 17:02:31 UTC
> was the favourites view different for example?

No, it has the same problem.

> I believe there is neither maven nor project specific code involved

That sounds logical - I was thinking if maven/project code needs to explicitly refresh or something. So what would be the right place - filesystems?
Comment 3 Jaroslav Havlin 2013-09-20 12:15:32 UTC
I'm sorry, I cannot reproduce the bug.

(In reply to Petr Jiricka from comment #0)
> 1. I had a Maven web project which at first copied a dependency to
> WEB-INF/lib
I created similar project. It was a Maven Web Project created using standard
NetBeans New Project wizards. I commented out the "provided" tag for dependency
javax:javaee-web-api in pom.xml.

> 2. Built the project
> 3. Modified the project so it no longer copies stuff to WEB-INF/lib
I've uncommented the "provided" tag. 

Were these steps the same as you used?

> 4. Cleaned and built the project
The war file (and other files in "target" directory) were deleted and recreated,
if I expanded the war file (or even if it stayed expanded and refreshed),
the WEB-INF.lib folder (package) wasn't there as expected.

Do you experience this bug every time you follow the steps above, or does it occur
randomly?
Comment 4 Jaroslav Havlin 2013-09-30 07:34:12 UTC
Closing the bug as WORKSFORME. If you can still reproduce it, please reopen this
issue and provide some additional information, if possible. Thank you.