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.
the maven plugin ignores the list of exclude in the compiler setting of the pom.xml still showing the files in the editor while they are in many ways not part of the project.
I guess this is a facet of issue #49026?
6.0 for the backbone project support, future for the UI to set it. Not a mainstream maven project setup
unfortunately ->future
Milos, could you please evaluate, if this issue is still valid or it was already fixed?
still valid, however unlikely to be worked on in 6.8. Rather complex coding for a clear corner case.
Change of the default owner.
Hard to find any uses: http://google.com/codesearch?q=file%3Apom.xml+%3Cexcludes%3E I did come across one by accident: https://jsp.dev.java.net/svn/jsp/tags/jsp-impl-2.2.1/pom.xml <plugin> <artifactId>maven-compiler-plugin</artifactId> <configuration> <excludes> <exclude> org/apache/jasper/compiler/JDTJavaCompiler.java </exclude> <exclude> org/apache/jasper/compiler/AntJavaCompiler.java </exclude> </excludes> </configuration> </plugin> The two source files are uncompilable unless you uncomment a couple of dependencies in the POM. Not clear it is worth the trouble of supporting this.
Integrated into 'main-golden', will be available in build *201008180001* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/338e0996e774 User: Jesse Glick <jglick@netbeans.org> Log: Cleaning up some dead code apparently intended to support #99588 (excludes) but likely unworkable as written.
*** Bug 198363 has been marked as a duplicate of this bug. ***
Is the issue resolved? Is there a workaround to let Netbeans exclude certain files?
(In reply to comment #10) > Is the issue resolved? No. > Is there a workaround to let Netbeans exclude certain files? No, other than to move them out of src/{main,test}/java/ into (say) another project.
when do you plan to fix this bug?
Not in 7.2. Worth trying for the subsequent release; TBD if it would cause regressions for people using excludes for other purposes.
Created attachment 134068 [details] Patch to filter java files according to maven-compiler-plugin excludes/includes I create a patch to MavenVisibilityQueryImplementation to support filter java files for a big project. We create different pom files for different developers who works on different part of the code. Each have a working version for their components. They can build and deploy they components. This save a lot of time we wasting in building and deploying. Known issue: I don't know how to handle to change listener yet, so that you need to close and reopen the pom if you change excludes/includes. Regards Wind
windli: thanks for the patch, unfortunately it's not a complete solution. The visibility query will only make the java file nodes disappear from the UI. But as can be seen in the revert referenced from Comment 8, the hard part is excluding/including on project's classpath. > Known issue: I don't know how to handle to change listener yet, so that you > need to close and reopen the pom if you change excludes/includes. should be fairly easy, add a PropertyChangeListener to NbMavenProject (as looked up from project's lookup) and fire ChangeEvent if includes/excludes change after project reload.
the reason why it's not implemented yet is that excludes are fairly rare in maven world, it's more or less an anti-pattern. If you use them, you most likely have a problem with multi-project structuring.
Created attachment 134082 [details] Patch to filter java files according to maven-compiler-plugin excludes/includes
Created attachment 134083 [details] Add property change listener Add property change listener to refresh project after excludes/includes changed.
(In reply to comment #15) > windli: thanks for the patch, unfortunately it's not a complete solution. The > visibility query will only make the java file nodes disappear from the UI. But > as can be seen in the revert referenced from Comment 8, the hard part is > excluding/including on project's classpath. The files will be excluded/included in the project's classpath if you correctly set the excludes/includes configuration for maven-compiler-plugin. (In reply to comment #16) > the reason why it's not implemented yet is that excludes are fairly rare in > maven world, it's more or less an anti-pattern. If you use them, you most > likely have a problem with multi-project structuring. It's one of really helpful features in maven to support complex projects in real world. In my case, we are working on a big project. Compile and deploy the whole project will take up to 20 minutes. But using this features, we can create different set of maven pom files for developers working on different part of the project. They can compile and deploy only the subset of the project. This can result in 2 minutes compile and deploy, save up to 90%.
(In reply to comment #19) > (In reply to comment #15) > > windli: thanks for the patch, unfortunately it's not a complete solution. The > > visibility query will only make the java file nodes disappear from the UI. But > > as can be seen in the revert referenced from Comment 8, the hard part is > > excluding/including on project's classpath. > The files will be excluded/included in the project's classpath if you correctly > set the excludes/includes configuration for maven-compiler-plugin. > For maven yes, but not for the IDE itself, so you will see all the excluded classes in code completion, refactorings and elsewhere.
(In reply to comment #20) > (In reply to comment #19) > > (In reply to comment #15) > > > windli: thanks for the patch, unfortunately it's not a complete solution. The > > > visibility query will only make the java file nodes disappear from the UI. But > > > as can be seen in the revert referenced from Comment 8, the hard part is > > > excluding/including on project's classpath. > > The files will be excluded/included in the project's classpath if you correctly > > set the excludes/includes configuration for maven-compiler-plugin. > > > > For maven yes, but not for the IDE itself, so you will see all the excluded > classes in code completion, refactorings and elsewhere. For IDE itself, per my test, I can only see the excluded classes in code completion. But not in Find usages, refactorings and even search.
Created attachment 134185 [details] Patch to filter java files according to maven-compiler-plugin excludes/includes, updated to run on Windows
(In reply to comment #22) > Created attachment 134185 [details] > Patch to filter java files according to maven-compiler-plugin > excludes/includes, updated to run on Windows The patch looks ok, but I'm not willing to integrate it as is, without the classpath filtering (that's the correct way of dealing with project's Classpath). At least not as default behaviour. We could hide the VisibilityQueryImplementation behing a system property that you and your team could set.
(In reply to comment #23) > (In reply to comment #22) > > Created attachment 134185 [details] > > Patch to filter java files according to maven-compiler-plugin > > excludes/includes, updated to run on Windows > > The patch looks ok, but I'm not willing to integrate it as is, without the > classpath filtering (that's the correct way of dealing with project's > Classpath). At least not as default behaviour. We could hide the > VisibilityQueryImplementation behing a system property that you and your team > could set. Thank you. That will be great. Is it possible to add an option to the maven setting?
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