Bug 327532 - Exported ant buildfiles fail due to invalid antfile-attribute
Summary: Exported ant buildfiles fail due to invalid antfile-attribute
Status: VERIFIED WORKSFORME
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.7   Edit
Hardware: PC Windows Vista
: P3 normal (vote)
Target Milestone: 3.7 M3   Edit
Assignee: Ayushman Jain CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-10-12 05:17 EDT by Johan Anstey CLA
Modified: 2010-10-26 01:17 EDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Johan Anstey CLA 2010-10-12 05:17:27 EDT
Build Identifier: 20100218-1602

When exporting an ant buildfile from a project A that refers to another project B the resulting ant file calls project B's ant file with incorrect directory path in the antfile-attribute.

The solution to the repro-case below is to change the following in "<whatever>\test\A\build.xml":
<ant antfile="${B.location}/build.xml" dir="${B.location}" ...>

...to:
<ant antfile="build.xml" dir="${B.location}" ...>

Reproducible: Always

Steps to Reproduce:
1. Create a project A in a folder "<whatever>\test\" (that is not a child-folder of the workspace).
2. Create a project B in "<whatever>\test\childfolder\".
3. Click File->Export... (select "General\Ant Buildfiles")->Next (select both A and B)->Finish.
4. Run "ant" inside "<whatever>\test\A\"-folder.
5. Notice the FileNotFoundException that occur because it tries to run ant on "<whatever>\test\childfolder\childfolder\B\build.xml".
Comment 1 Ayushman Jain CLA 2010-10-12 05:49:30 EDT
I couldn't reproduce this with I20101005-0800. Jay, can you also try? Maybe i missed out something.
Comment 2 Jay Arthanareeswaran CLA 2010-10-12 07:43:10 EDT
(In reply to comment #1)
> I couldn't reproduce this with I20101005-0800. Jay, can you also try? Maybe i
> missed out something.

I am not able to reproduce either with eclipse 3.6 (build ID I20100608-0911)
Johan, can you please try with one of the newer builds?
Comment 3 Jay Arthanareeswaran CLA 2010-10-12 07:46:01 EDT
This is what the generated build file contains:

<ant antfile="build.xml" dir="${Project_B.location}" inheritAll="false" target="clean"/>
Comment 4 Johan Anstey CLA 2010-10-12 13:10:24 EDT
Aha, I didn't know I needed to install Helios to get the latest version. There is no issue there as you say. Sorry about the false alarm and thanks for the help!
Comment 5 Ayushman Jain CLA 2010-10-12 13:36:40 EDT
Thanks for the confirmation. Closing as WORKSFORME.
Comment 6 Srikanth Sankaran CLA 2010-10-26 01:17:20 EDT
Verified for 3.7 M3. Verified by the reporter also.