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 46495 - Project jar is being built with 3rd party jars included
Summary: Project jar is being built with 3rd party jars included
Status: RESOLVED INVALID
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 4.x
Hardware: PC Windows ME/2000
: P3 blocker (vote)
Assignee: Jesse Glick
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-07-23 10:53 UTC by tboerkel
Modified: 2007-09-26 09:14 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
build.xml (5.38 KB, text/plain)
2004-07-23 11:22 UTC, tboerkel
Details
build-impl.xml (25.60 KB, text/plain)
2004-07-23 11:22 UTC, tboerkel
Details
project.xml (493 bytes, text/plain)
2004-07-23 11:23 UTC, tboerkel
Details
project.properties (2.24 KB, text/plain)
2004-07-23 11:23 UTC, tboerkel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description tboerkel 2004-07-23 10:53:26 UTC
When I build the project, the resulting jar not
only contains the project classes, but also 3rd
party jars from the classpath. This should be
optional (UI option) and not the default.
It is OK to include *.properties.

Also, if I have sources dir = classes dir, then
the .java files are also in the resulting jar.

So, normally it should include *.class and
*.properties. 
Optionally also *.jar.

Maybe jar build process first should respect
${build.classes.excludes}?
Comment 1 Milan Kubec 2004-07-23 11:05:14 UTC
I cannot reproduce jarring of third party jar files into final project
jar. What is your project setup?

But including sources is a problem - ${build.classes.excludes} is
actaully not used for jarring but for copying from src dir to
build/classes dir. So for "regular" user it's no problem but for your
custom setting (classes together with sources) it might be a problem.
Comment 2 tboerkel 2004-07-23 11:21:47 UTC
Attaching the project files.
Comment 3 tboerkel 2004-07-23 11:22:14 UTC
Created attachment 16411 [details]
build.xml
Comment 4 tboerkel 2004-07-23 11:22:37 UTC
Created attachment 16412 [details]
build-impl.xml
Comment 5 tboerkel 2004-07-23 11:23:23 UTC
Created attachment 16413 [details]
project.xml
Comment 6 tboerkel 2004-07-23 11:23:42 UTC
Created attachment 16414 [details]
project.properties
Comment 7 Jesse Glick 2004-07-23 16:04:57 UTC
Re. sources being included in the JAR - of course they will be, if you
make src.dir == build.classes.dir (which is not supported). You will
need to override -init-presetdef-jar to exclude **/*.java.

Re. the built JAR including 3rd-party JARs, I have no idea what you're
talking about (and you do not give a complete test case to reproduce),
unless perhaps you mean that you are keeping copies of these JARs
inside ${src.dir}, in which case this is again unsupported and you
would need to manually exclude them in -init-presetdef-jar.
Comment 8 tboerkel 2004-07-26 07:32:02 UTC
OK, so some stuff we do is "unsupported" or "bad style". But since
these things were OK in NB 3.6 or even the default, NB 4.0 should cope
better with them, or it will alienate the NB 3.6 users.
For example, *.java and *.jar could be excluded by default for
creating the project jar.
Comment 9 Jesse Glick 2004-07-26 20:09:14 UTC
You had to take special steps to arrange your sources this way anyway;
you forgot one step.

I would like to include a property to configure an excludes list for
the JAR file.
Comment 10 tboerkel 2004-07-28 06:36:13 UTC
Yes, I forgot. But it was not clear to me, what to do and why. I am a
NB 3.6 user, no Ant expert.
I suggest to create an UI option to turn off jar creation, in addition
to that exclude list.
Comment 11 Jesse Glick 2004-07-28 22:50:58 UTC
Can be considered for E (issue #46721); too late for D.