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 200764 - Clean and Build should not destroy JavaDoc files
Summary: Clean and Build should not destroy JavaDoc files
Status: NEW
Alias: None
Product: java
Classification: Unclassified
Component: Project (show other bugs)
Version: 7.0
Hardware: All All
: P3 normal (vote)
Assignee: Tomas Zezula
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-08 17:11 UTC by lvskiprof
Modified: 2011-09-14 20:41 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description lvskiprof 2011-08-08 17:11:24 UTC
When you have previously created a JavaDoc files for a project they will be destroyed when you do a Clean & Build, at least using the default ANT scripts for Netbeans 7.0.

The scripts should do one of two things:

1) Leave dist/javadoc intact so the JavaDoc files are preserved through the Clean and Build operation.

2) Set a flag if there is a dist/javadoc directory (or wherever the JavaDoc files are placed based on the configuration) and perform a new Generate JavaDoc operation to produce new ones.

My preference would be for #2, since there may be new JavaDoc info in the new sources that are being built.  That way a Clean & Build cleans and builds everything that has been built previously.  But at the very least we should do #1, because if you don't replace something that was built previously you should not destroy it.

NOTE:  Having a JavaDoc go missing after a Clean & Build has crashed my Firefox 5.0 browser twice already, nearly resulting in me losing the configuration of tabs I was using.  Thank goodness it gave me an option to recover them, because when it first came up it only showed the JavaDoc directory in a single tab.  Hence the P2 priority for this bug.
Comment 1 Jan Lahoda 2011-08-08 17:30:38 UTC
I am sorry that firefox crashes, but that is not a NetBeans problem - applications should not crash because of data files disappearing. I suggest you file a bug against firefox.

Regarding the suggestions about javadoc (re-)generation, I would personally prefer if the current state remains as is:
-clean should clean all build artifacts
-if build would auto-create javadoc, then it would be slower, and the javadoc is often not needed (even if it previously existed in dist)

Behavior 1 can be easily simulated by changing value of property "dist.javadoc.dir" in nbproject/project.properties (or, if it should not persist in VCS, it can be overwritten in nbproject/private/private.properties). I believe that it might be possible to implement 2 reasonably easily using ant build script.
Comment 2 lvskiprof 2011-09-14 20:41:18 UTC
Firefox doesn't always crash, but since doing a clean-and-build is a separate operation from creating Javadoc (and happens much more frequently) it is a royal pain that the Javadoc disappears.

You also end up with this as a side effect when one project is dependent on other projects, because they get a clean-and-build done on them as well.

It would be very simple if the Javadoc directory simply was not part of the dist directory.  Make it have its own directory at the same level as dist, so it could be left intact until deliberately rebuilt.