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.
When specifying the rules for creating a jar file you can specify which files to exclude. There should be a way to specify which files to include, excluding all others. I often end up with junk or temporary files in my source directory and I don't want them accidentally included in the jar file.
This has already been implemented for Java Application project, you have to go to Properties of you project and select Build | Packaging .. there is a textfield "Exclude from JAR File" ... other way is to write your own target "-pre-jar" and define excludes in this task ...
I'm not sure you understand what I'm asking for. I found the Exclude item. What I want is a way to specify the files to Include, not the files to Exclude.
You can specify which sources are to be treated as part of the project in the Sources tab. *** This issue has been marked as a duplicate of 49026 ***
Ok, that seems to work, but to be honest I never would've guessed that the settings there had anything to do with what files are packaged in the jar file. It would be nice if the Packaging screen had Includes/Excludes just like the Sources screen.
Excluded sources are hidden from view, not compiled, and not packaged. Of course you could do more elaborate packaging steps with a custom Ant target but we do not plan to support that in the GUI.
Are excluded files also hidden from version control?
I am not positive but I think VCS integration currently ignores includes/excludes. Not clear what is correct for most users.