Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Ant build after clean not triggering
Ant build after clean not triggering [message #760185] Thu, 01 December 2011 14:56 Go to next message
CG Mising name is currently offline CG Mising nameFriend
Messages: 8
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
Re: Ant build after clean not triggering [message #760679 is a reply to message #760185] Sun, 04 December 2011 07:49 Go to previous messageGo to next message
Javak  is currently offline Javak Friend
Messages: 26
Registered: November 2011
Junior Member
Hello, I think the order is wrong, the New_Builder should be after the Java Builder because you specify targets will be run after clean, build.
Re: Ant build after clean not triggering [message #760877 is a reply to message #760679] Mon, 05 December 2011 13:57 Go to previous message
CG Mising name is currently offline CG Mising nameFriend
Messages: 8
Registered: December 2011
Junior Member
Tried it -- no difference in behavior. But thanks for the idea!
Previous Topic:ODBC dBase driver - strange exception
Next Topic:Error when opening eclipse
Goto Forum:
  


Current Time: Thu Apr 18 17:18:26 GMT 2024

Powered by FUDForum. Page generated in 0.03268 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top