Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 196811 - ant builder: "Auto build" target not triggered without "after a clean"
Summary: ant builder: "Auto build" target not triggered without "after a clean"
Status: CLOSED DUPLICATE of bug 114563
Alias: None
Product: Platform
Classification: Eclipse Project
Component: Ant (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 normal with 4 votes (vote)
Target Milestone: ---   Edit
Assignee: Platform-Ant-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 230860
  Show dependency tree
 
Reported: 2007-07-17 09:45 EDT by noobs CLA
Modified: 2011-01-31 16:11 EST (History)
6 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description noobs CLA 2007-07-17 09:45:22 EDT
With a custom ant builder, the Ant target selected for "Auto build" will not be triggered on file save, unless the section "After a clean" has an ant target.

It can be reproduced easily:
Create a new java project.
Be sure to allow auto build.
Add a text file to your new project
Create a new ant build.xml file with a simple target.
Create a custom ant builder, select your target in the auto build section, select no target at all in the "after a clean" section.
Edit your text file, your ant target won't be triggered.
It should have been trigerred.

Then, modify the custom builder and select a target in the "after a clean" section.
Edit your text file, your ant target will now be triggered.

Eclipse Version: 3.3.0
Build id: I20070625-1500
This was working in 3.1 and 3.2.1
Comment 1 Michael Fliegner CLA 2008-09-11 15:42:41 EDT
We experience this bug with manual builds as well. The build-command succeeds once or twice and then ceases to function. Coincidentially in the .project file the config-element for the ant-builder changes from

<buildcommand ... <triggers>full,incremental,> ...

to

<buildcommand ... <triggers>incremental,> ...

All we do is to open the project and issue "Build Project".
As soon as the former state is restored, the build will work again. 


regards michael
Comment 2 N J CLA 2008-09-12 04:04:23 EDT
*** Bug 230860 has been marked as a duplicate of this bug. ***
Comment 3 N J CLA 2008-09-12 04:07:03 EDT
Created attachment 99040 [details]
Exported Project containing trivial Java and ant build.xml

Build ID:  I20080409-1425

Steps To Reproduce:
Create a project from the attached exported project archive.

Disable the eclipse java project builder.

Add an ant projectbuilder.
Select the build.xml file.
Set targets for the Compile and Clean.

Attempt combinations of building and cleaning the project.
If compiling works, alter the build.xml file, such as adding another target,
and try again.


More information:
Some times Build is not available from the menu. It is disabled even after
performing a clean.

Clean seems to always work.  If the associated target is set to the Compile
target in the build.xml file, then Eclipse will Compile when told to Clean.

This is with 3.4M6a
If I start the Eclipse bundled ant from the command line with a command similar
to the following, it works fine:

java -cp "C:/Program
Files/Java/jdk1.6.0_06/lib/tools.jar;C:/Eclipse/3.4M6a/plugins/org.apache.ant_1.7.0.v200803061910/lib/ant-launcher.jar"
-Dant.home=C:/Eclipse/3.4M6a/plugins/org.apache.ant_1.7.0.v200803061910
org.apache.tools.ant.launch.Launcher
Comment 4 N J CLA 2008-09-12 04:12:14 EDT
https://bugs.eclipse.org/bugs/attachment.cgi?id=99040
A project as test example.
Comment 5 Darin Wright CLA 2009-01-22 11:20:26 EST
This is a problem on 3.4.2 and 3.5 (latest I-build).
Comment 6 Darin Wright CLA 2009-01-22 11:26:32 EST
Verified the problem also exists in 3.3.2
Comment 7 Michael Rennie CLA 2011-01-31 16:11:50 EST

*** This bug has been marked as a duplicate of bug 114563 ***