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.
On the contextual menu of a build.xml, appear only 2 of 5 targets, after the introduction of the 5th target (which depends on other two).
Created attachment 11730 [details] The file for which on the last build of netbeans, I get only 2 targets.
Only targets that have a description and default target are appeared in the 'Run Target' submenu. If no target have a description then all targets are appeared in the submenu. - As designed.
Although we might consider making the UI more helpful: show e.g. Run Target -> help ------------- tomcatrestart ------------- Others -> hsql hsqlDatabaseManager tomcatstart tomcatstop I.e. default target, then any non-default targets with descriptions, then if necessary a submenu with non-default targets without descriptions (in alphabetical order I suppose). vladmihaisima, if you agree that would be a better UI (more useful, or less confusing to new users), feel free to reopen this issue, but change to ENHANCEMENT from DEFECT, P2 -> P3.
I agree that would be a better UI because not all ant build.xml are made with description and if you want to use one of these it's not so easy (add yourself a descriptin, etc.)
*** Issue 26749 has been marked as a duplicate of this issue. ***
As part of the fix for this bug, targets with a name starting with '-' should be separated into the "more targets" submenu as well. The ant manual states that targets beginning with '-' are those which are not intended to be run directly from the command line.
Thanks for the tip, I did not notice the convention about targets beginning with a hyphen. Based on the description in the Ant manual, I would exclude them from the GUI altogether - if they are not supposed to be run directly then they would just be clutter. You can always run them from the command line if you have to in special circumstances.
More on targets beginning with a hyphen: http://issues.apache.org/bugzilla/show_bug.cgi?id=22020
See commit info in issue #44360.
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.