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 54210 - Build doesn't copy resources if package doesn't contain java sources
Summary: Build doesn't copy resources if package doesn't contain java sources
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Project (show other bugs)
Version: 4.x
Hardware: PC Linux
: P3 blocker (vote)
Assignee: Tomas Zezula
Depends on:
Reported: 2005-01-31 11:57 UTC by orat
Modified: 2011-10-27 08:40 UTC (History)
2 users (show)

See Also:
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description orat 2005-01-31 11:57:13 UTC
I keep several properties files in a separate
"resources" package. There are no java classes in
this package. These properties don't get copied to
the build directory when I "compile" this package.

(I can't compile my complete project at the moment
because I have to resolve other problems as well
after switching to NB 4.0 and NB4.0 doesn't allow
to exclude sources from compiling.)

I wrote a new ant target "jar without compile" and
it wouldn't copy the resources either. 

So neither compile nor jar copies these resources.
I think at least one of them should do it.
Otherwise I can't run any part of the code before
everything compiles and this is impractical.
Comment 1 ehucka 2005-02-07 10:38:43 UTC
move to projects
Comment 2 Tomas Zezula 2005-02-24 13:27:13 UTC
This is not a bug, it behaves as it was designed. The compile single(
used for file/package compilation) was designed as a test that the
file can be compiled it does not run full build, it does not copy any
resoruces and does not create archive file. If you need to do it build
the project.
The copy is done by the -do-compile target used when project
compilation runs, but not during the compile single. The only right
change to support resource copying during the compile single will be
to copy all resources from project sources to the build dir, you can
compile class which access a resource in the another pacakge. But this
will slow down the compile single and I don't know if it is
acceptable. I've added HIE expert on the cc list.
Comment 3 orat 2005-03-02 11:10:36 UTC
I agree it is not a bug. However, I think it is a gap in the design. 

While compile-single allows to update single class files without
building the complete project there is no analog possibility for
non-class files that have changed (properties files for instance).

On single file level copying a properties file to the build directory
cannot be called "compile" but it is the analogon to compile and it is
a missing action.

On package level I would except "compile" to behave as on project
level and that means copy all non-class files to the build directory.
Comment 4 orat 2005-03-02 11:13:35 UTC
I mistyped this:

On package level I would expect "compile" to behave as ...
Comment 5 Jesse Glick 2005-04-07 18:19:23 UTC
Obviously not for 4.1.

Would recommend this be WONTFIX. User can do a normal build which copies all
resources. If some sources are broken, fix them or delete them first.