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 50934 - <build-folder> never generated by freeform GUI
Summary: <build-folder> never generated by freeform GUI
Status: CLOSED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Ant (show other bugs)
Version: 4.x
Hardware: All All
: P3 blocker (vote)
Assignee: David Konecny
URL:
Keywords:
Depends on:
Blocks: 42682
  Show dependency tree
 
Reported: 2004-10-27 23:36 UTC by Jesse Glick
Modified: 2006-03-24 09:42 UTC (History)
0 users

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 Jesse Glick 2004-10-27 23:36:50 UTC
The freeform general-data/folders/build-folder
element is apparently ignored by
FreeformProjectGenerator - never read, never
written. (Unclear whether it is in fact *deleted*
by the dialog - did not check because of issue
#50933.)

I just confirmed that <build-folder> is in fact
used at runtime if specified in project.xml, to
mark project ownership of an external non-source
folder - important if you want to e.g. debug code
that you build to an external location, since
otherwise the debugger will not be able to locate
the corresponding sources.

However for nonexpert users, the GUI does not
help. Perhaps the build output panel could check
to see if any build outputs are specified which
are not contained in the project dir (or a
registered external source root) and if so,
automatically add one or more <build-folder>s to
contain them.

I guess the algorithm could be: produce a minimal
set of build folders which collectively contain
all of the outputs. Since all such extra build
outputs must be given as absolute paths in the
GUI, I don't think you need to worry about Ant
property substitutions.
Comment 1 David Konecny 2004-10-29 08:40:53 UTC
Honestly, I did not know it should be generated and what is it purpose
and probably you are the only one who knew that. :-) Otherwise we
would discovered this problem earlier. I will impl it as you suggested.

FPG should skip <build-folder> elements.
Comment 2 David Konecny 2004-10-29 11:40:11 UTC
Fixed. Please review/try. I would not want to screw up something just
before the High Resistence mode. If wrong reverting change in
ProjectModel should be enough.

Fixed in:
src/org/netbeans/modules/ant/freeform/FreeformProjectGenerator.java;
new revision: 1.36; previous revision: 1.35
src/org/netbeans/modules/ant/freeform/ui/ProjectModel.java;
new revision: 1.9; previous revision: 1.8
test/unit/src/org/netbeans/modules/ant/freeform/FreeformProjectGeneratorTest.java;
new revision: 1.17; previous revision: 1.16
Comment 3 Jesse Glick 2004-10-29 16:27:49 UTC
Seems to be working as intended. E.g. I have a sample freeform prj w/
Apache Ant sources (external source root). I claim that it produces as
output all of /space/ant162/lib/ant*.jar. Makes a <build-folder> for
/space/ant162/lib as intended. Browsing these JARs in Favorites says
they are indeed part of the project. Making a j2seproject w/ dep on
/space/ant162/lib/ant.jar gives correct code completion w/ Javadoc for
org.apache.tools.ant.Project.