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.
"Exclude from Jar File" project property is used for excluding files from copying them to dest.dir but not for jarring them up. It means that user is unable to set exclude e.g. for some particular subpackage just full of classes. Setting as P2 since I consider exclude from jar as important feature of buildsystem.
Adding Jano on CC, since I'd like to know HIE opinion.
Yes, would be preferable to use this list in <jar> as well as in <copy>, in case the user is trying to exclude *.class files which are generated by <javac>. There is a separate RFE for really excluding packages, i.e. from compilation and even source scanning, but I don't see that happening soon - issue #49371.
Decreasing priority to P3, not very common.
I talked with Milan about this and I do not think it is good idea to use the list also for jar exclusion. I would prefer to fix it as requested in issue 49371. Otherwise you are risking that project compilation, execution, testing will work, but your jar which excluded some classes may not work as expected. Perhaps just the property in UI should be made more clear, that it applies to sources only. If classes should be excluded from jar then they should be excluded from refactoring, code completion, compilation, execution, testing, from everything. And that's what issue 49371 is about.
Well, it might be higher priority, since at least the UI is very confusing. Saying "Exclude From Jar File", but not really doing it. I can imagine that people are using it as I described and not checking that it's really excluded (Do you check if java classes are correctly compiled? I don't. I just trust compiler.) and then having jar file that they didn't actually want. How do we know how common is it? I personaly was testing the feature on jpg files for long time and it has been working so user might suspect it works for classes too.
Please reconsider actual target milestone. Thanks.
David is right exclude from jar is very dangerous. The only thing that can be changed is an UI from "Exclude from jar" to "Exclude from ????" Jano, what do you think?
Sorry I insist on this issue to be P3 (at least!). The main problem I see is the the UI is saying something but doing something else. Wouldn't you be surprised if hitting Compile would Clean the project instead. I would. And that's what the UI says - Exclude from jar but not doing it. At least the label must be fixed. I don't undestand why developer shouldn't be able to create jar that excludes some classes. You can do it by Ant <jar> task easily but cannot do it in IDE. If somebody excludes some package or class from jar file he knows what he's doing. What should somebody do if wants to distribute jar with subset of all classes? Do it from command line? Or hack Ant script?
Please Jano, could you add your comment. I think that having UI that works different way then it says is not good.
I've added a note "cannot exclude class files" into the panel. Please see the spec in the URL field.
Checking in src/org/netbeans/modules/java/j2seproject/ui/customizer/Bundle.properties; /cvs/java/j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/Bundle.properties,v <-- Bundle.properties new revision: 1.67; previous revision: 1.66 done Checking in src/org/netbeans/modules/java/j2seproject/ui/customizer/CustomizerJar.form; /cvs/java/j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/CustomizerJar.form,v <-- CustomizerJar.form new revision: 1.9; previous revision: 1.8 done Checking in src/org/netbeans/modules/java/j2seproject/ui/customizer/CustomizerJar.java; /cvs/java/j2seproject/src/org/netbeans/modules/java/j2seproject/ui/customizer/CustomizerJar.java,v <-- CustomizerJar.java new revision: 1.10; previous revision: 1.9 done
Title verified in dev-200503141900, but I'm going to file another issue for missing functionality.