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 46596 - mdr/jmutils "clean" target deletes nbbuild directory
Summary: mdr/jmutils "clean" target deletes nbbuild directory
Status: RESOLVED WORKSFORME
Alias: None
Product: java
Classification: Unclassified
Component: Unsupported (show other bugs)
Version: 4.x
Hardware: All All
: P1 blocker (vote)
Assignee: Tomas Zezula
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-07-27 02:54 UTC by _ tboudreau
Modified: 2004-08-13 12:11 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description _ tboudreau 2004-07-27 02:54:14 UTC
Seen while building, invoking nbbuild/build.xml from a different 
dir to build an installer:

Process 'mdr/jmiutils' location with 'clean' target
clean:
init:
deps-clean:
clean:
Deleting directory /space/nb_another/nbbuild

As you can imagine, this causes some problems with the build 
continuing :-/   java/parser has the same problem.

The problem is in your build-impl.xml - I have no idea why, but 
there is this:

    <target name="-do-clean" depends="init">
        <delete dir="${build.dir}"/>  <---!!!!!!!!!!!!!!
        <delete dir="${dist.dir}"/>
    </target>


Best would simply be to use the standard netbeans module 
project type.  At any rate, deleting nbbuild is not acceptable and 
some sort of check is needed.
Comment 1 Jan Becicka 2004-07-27 08:56:04 UTC
Tomasi, please take a look at it.
Comment 2 Tomas Zezula 2004-07-27 14:31:59 UTC
I've done the following on my Linux:
cd nb_all
ant -f nbbuild/build.xml clean

and the clean process has finished as it was expected:

[delete] Deleting directory
/home/tom/Projects/netbeans/trunk/nb_all/mdr/jmiutils/build
   [delete] Deleting directory
/home/tom/Projects/netbeans/trunk/nb_all/mdr/jmiutils/dist


If you did something else please describe what you did.
Honza was testing it on Windows and it worked fine, the same holds for
MacOS X.
Comment 3 _ tboudreau 2004-07-27 15:32:59 UTC
Ah.  The problem is that the ant script which is calling nbbuild/build.xml is overriding 
${build.dir}.