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

Summary: Projects Window does not build its UI correctly for build.xml
Product: projects Reporter: mark_barnes
Component: AntAssignee: Tomas Stupka <tstupka>
Status: NEW ---    
Severity: normal    
Priority: P3    
Version: 8.0.2   
Hardware: PC   
OS: Windows 7   
Issue Type: DEFECT Exception Reporter:

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) file "C:\development\trunk\svnroot\", I have the following:

In my (ANT) build file "C:\development\trunk\svnroot\Sites\build\build.xml",  I have this:	
     <property file="../"/>
      <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:

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

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