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 65958 - Packaging 'Exclude From JAR File' misleading
Summary: Packaging 'Exclude From JAR File' misleading
Status: RESOLVED DUPLICATE of bug 56444
Alias: None
Product: java
Classification: Unclassified
Component: Project (show other bugs)
Version: 5.x
Hardware: All All
: P3 blocker (vote)
Assignee: Tomas Zezula
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-10-05 13:21 UTC by herkules
Modified: 2005-11-16 09:02 UTC (History)
0 users

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
Screenshot (26.88 KB, image/jpeg)
2005-10-05 13:22 UTC, herkules
Details

Note You need to log in before you can comment on or make changes to this bug.
Description herkules 2005-10-05 13:21:05 UTC
The pattern given here suggests that these files are not packed into a jar from
the compilation result. Thus, the annotation '(cannot exclude class files)' made
me wonder why. In fact, this was exactly what I wanted to do: exclude all
classes that appear in 'sandbox' packages from the distribution.

Looking into the build-impl.xml, I found that this property isn't actually used
for packaging but for compilation:

    <target name="-do-compile"
depends="init,deps-jar,-pre-pre-compile,-pre-compile" if="have.sources">
        <j2seproject3:javac/>
        <copy todir="${build.classes.dir}">
            <fileset dir="${src.dir}" excludes="${build.classes.excludes}"/>
            <fileset dir="${src.res.dir}" excludes="${build.classes.excludes}"/>
        </copy>
    </target>

I suggest to either (or both) move this setting to the 'Compiling' department of
the project properties ('Exclude From Compilation') or to evaluate such a
property in the jar target as well. The latter is what I need.
Comment 1 herkules 2005-10-05 13:22:53 UTC
Created attachment 25550 [details]
Screenshot
Comment 2 Jesse Glick 2005-11-16 05:35:22 UTC
Probable dupe of issue #56444.
Comment 3 Tomas Zezula 2005-11-16 09:02:25 UTC
Yes, it is a duplicate if issue #56444

*** This issue has been marked as a duplicate of 56444 ***