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 51953 - Exclude from jar is not really exclude from jar but from copy
Summary: Exclude from jar is not really exclude from jar but from copy
Status: CLOSED FIXED
Alias: None
Product: java
Classification: Unclassified
Component: Project (show other bugs)
Version: 4.x
Hardware: All All
: P3 blocker (vote)
Assignee: Tomas Zezula
URL: http://projects.netbeans.org/nonav/bu...
Keywords: UI, USABILITY
Depends on:
Blocks: 55766
  Show dependency tree
 
Reported: 2004-11-30 19:28 UTC by Milan Kubec
Modified: 2006-03-24 10:10 UTC (History)
2 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Milan Kubec 2004-11-30 19:28:15 UTC
"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.
Comment 1 Milan Kubec 2004-12-01 13:59:24 UTC
Adding Jano on CC, since I'd like to know HIE opinion.
Comment 2 Jesse Glick 2004-12-01 16:40:35 UTC
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.
Comment 3 Tomas Zezula 2004-12-02 08:36:41 UTC
Decreasing priority to P3, not very common.
Comment 4 David Konecny 2004-12-02 12:35:54 UTC
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.
Comment 5 Milan Kubec 2004-12-02 13:15:41 UTC
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.
Comment 6 Milan Kubec 2005-01-11 12:45:54 UTC
Please reconsider actual target milestone. Thanks.
Comment 7 Tomas Zezula 2005-02-02 14:09:33 UTC
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?
Comment 8 Milan Kubec 2005-02-02 15:22:27 UTC
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?
Comment 9 Milan Kubec 2005-02-14 16:00:53 UTC
Please Jano, could you add your comment. I think that having UI that
works different way then it says is not good.
Comment 10 jrojcek 2005-02-28 16:22:21 UTC
I've added a note "cannot exclude class files" into the panel. Please see the spec in the URL 
field.
Comment 11 Tomas Zezula 2005-03-02 10:01:53 UTC
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
Comment 12 Milan Kubec 2005-03-15 13:06:22 UTC
Title verified in dev-200503141900, but I'm going to file another issue for
missing functionality.