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 49221 - Freeform properties dialog changes should update <export> elements
Summary: Freeform properties dialog changes should update <export> elements
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 47807
  Show dependency tree
 
Reported: 2004-09-17 21:32 UTC by Jesse Glick
Modified: 2006-03-24 10:07 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 Jesse Glick 2004-09-17 21:32:59 UTC
In order to make the <export> element (i.e.
AntArtifact) in project.xml more accessible, the
properties dialog code should create it when
applicable.

It is not possible to perfectly guess what the
proper semantics for <export> should be without
asking the user more things in the GUI. However
for 4.0 we should be able to make some educated
guesses that will be good enough.

Recommend that you check if <ide-action
name="build"> exists and has exactly one <target>.
If so, then for each <compilation-unit> which has
at least one <built-to> referring to a JAR file
(rather than a directory), create an <export>
element with

- <type>jar</type>

- <location>...</> according to the <built-to>
location (take only the first one, if >1 are
specified)

- <script>...</> if the build command has a <script>

- <build-target>...</> according to the <target>
in the build command

- no <clean-target>...</> needed (will be guessed
from the 'clean' command if there is one)

Not perfect but will probably cover 75% of the
cases out there adequately.
Comment 1 David Konecny 2004-09-24 12:34:56 UTC
Implemented as suggested. The bad side of this change is that any
customization of export section by hand will be overriden now.

Fixed in:
src/org/netbeans/modules/ant/freeform/FreeformProjectGenerator.java;
new revision: 1.26; previous revision: 1.25
src/org/netbeans/modules/ant/freeform/ui/ProjectModel.java;
new revision: 1.5; previous revision: 1.4
test/unit/src/org/netbeans/modules/ant/freeform/FreeformProjectGeneratorTest.java
new revision: 1.12; previous revision: 1.11
Comment 2 navneet 2004-09-28 07:13:27 UTC
If there are multiple built-to tags, the export tag is generated only
for the first one. I have a project that generates multiple jar files
and I have multiple <built-to> tags under the <compilation-unit>
Comment 3 David Konecny 2004-09-29 10:02:44 UTC
Fixed in:
nbproject/project.properties;
new revision: 1.14; previous revision: 1.13
src/org/netbeans/modules/ant/freeform/FreeformProjectGenerator.java;
new revision: 1.27; previous revision: 1.26
test/unit/src/org/netbeans/modules/ant/freeform/FreeformProjectGeneratorTest.java;
new revision: 1.13; previous revision: 1.12
Comment 4 Marian Mirilovic 2005-12-20 15:46:22 UTC
This issue was solved long time ago. Because nobody has reopened it neither
added comments, we are verifying/closing it now. 
If you are still able to reproduce the problem, please reopen. Thanks in advance.