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 249986 - Projects Window does not build its UI correctly for build.xml
Summary: Projects Window does not build its UI correctly for build.xml
Status: NEW
Alias: None
Product: projects
Classification: Unclassified
Component: Ant (show other bugs)
Version: 8.0.2
Hardware: PC Windows 7
: P3 normal (vote)
Assignee: Tomas Stupka
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-23 20:11 UTC by mark_barnes
Modified: 2015-02-02 08:00 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 mark_barnes 2015-01-23 20:11:14 UTC
Please Note: The is not a problem with Builds or even ANT itself.  It's a problem with the Netbeans UI. 

When Netbeans builds the UI for the Projects Window, it appears that it is not parsing one of my (ANT) build.xml files correctly.  It seems to be a problem with variable substitution or with the <import> directive. 

The only way I have been able to get this to work is to put the full pathname to the <import> directive.  No variable substitutions.



In my (ANT) build.properties file "C:\development\trunk\svnroot\build.properties", I have the following:
    tomcat.home=/development/Tomcat

In my (ANT) build file "C:\development\trunk\svnroot\Sites\build\build.xml",  I have this:	
     <property file="../build.properties"/>
      <import file="${tomcat.home}/bin/catalina-tasks.xml"/>

When I actually run a build, I have NB configured use command-line ant 1.9.4.  The build works with no problems.  The problem doesn't appear to be with ANT or the build.xml file.

But when NB is parsing the build.xml file so it can list build targets in the UI, it seems to be having problems with ${tomcat.home}.

When NB processes the <import>, it looks like it is trying to read this file:
    C:\development\trunk\svnroot\Sites\build\development\Tomcat\bin\ catalina-tasks.xml

I expected it to read this file:
    C:\development\Tomcat\bin\catalina-tasks.xml



This is how the problem manifests:

In the Project Window, I open the project folder.  I note that the build.xml file does NOT have the Open Folder icon to the left of it.  When I right-click on build.xml and select "Run Target" , the sub-menu has no build targets listed.  The sub-menu has only "Advanced..."  When I select "Advanced...", the "Select target(s) to run:" combo-box drop-down has nothing listed.

When I have right-clicked on build.xml, if I run my cursor over "Debug Target" I get an error dialog:
    Cannot find import
    C:\development\trunk\svnroot\Sites\build\development\Tomcat\bin\ catalina-tasks.xml from
    C:\development\trunk\svnroot\Sites\build\build.xml@21b3d78d:7c79bbe5

This dialog is how I know that NB is trying to import the wrong file.