Hi,
recently I found a little problem that can be very annoying.
I have an JEE application that is deployed and run on embedded Glassfish 3.1.2. When I run the application form NB, two empty files are created in target/classes:
.netbeans_automatic_build
.netbeans_update_resources
They come form NB compile-on-save

These files are packed into JAR/WAR by ScatteredArchive and then to an EAR by ScatteredEnterpriseArchive. Everything was OK., till I created a portable CDI extension and attached it to an EAR. I got the following exception:

This exception is completely misleading here. It occurred, that JAR with portable extension containing these two files is corrupt (7zip says it). The problem is only with portable extensions. EJB jars are also corrupted zip archives, but they work.
The solution is to completely disable compile-on-save functionality in NB.