| Ant build after clean not triggering [message #760185] |
Thu, 01 December 2011 09:56  |
CG Missing name Messages: 5 Registered: December 2011 |
Junior Member |
|
|
(Searched to see if anyone else has encountered and fixed this seemingly simple problem but cannot find anyone. I must be doing something wrong....)
Using: Eclipse Version: 3.7.1, build id: M20110909-1335
I boiled down my scenario to the following:
I have a Java project called "dummy" with two files directly under it (i.e. NOT under "src"):
build.xml -- this is an Ant build file
testfile.txt -- a simple text file
Here is build.xml:
--------------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<project name="dummy" basedir=".">
<!-- Clean up the directory -->
<target name="clean">
<echo message="Cleaning" />
<delete dir="./testfolder"></delete>
</target>
<!-- Make directory process -->
<target name="makeDir">
<echo message="Making" />
<mkdir dir="./testfolder" />
</target>
<!-- Copy file process -->
<target name="copy" depends="makeDir">
<echo message="Copying" />
<copy file="testfile.txt" tofile="./testfolder/testfile.txt" overwrite="true"/>
</target>
</project>
-----------------------------------------------
I've brought up the project properties and made a new Ant builder (called "New_Builder") and ordered it first (i.e. before the Java Builder, which in this example has nothing to build since there is no source code in my dummy project). It has these characteristics:
-- The "Main" tab has the "Buildfile" pointing to build.xml
-- The "Refresh" tab has the "Refresh resources upon completion" checked, with "The entire workspace" selected.
-- The "Targets" tab has the following settings:
* After a "Clean": copy
* Manual Build: copy
* Auto Build: <nothing>
* During a "Clean": clean
My problem:
When I clean this project with "Build Automatically" enabled, the build step (i.e. "copy") does not automatically follow. I can clean all day, but nothing gets built until I perform a "Build Project" - then I see both my "makeDir" and "copy" targets being executed.
In Eclipse 3.6 and earlier, this worked fine: the clean would trigger the build (i.e. "makeDir" followed by "copy").
What's going on? Is this a bug / new behavior with Eclipse 3.7, or am I missing something?
Thanks
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.01409 seconds