Bug 272797 - Request for advanced ant-integration of JDT compiler
Summary: Request for advanced ant-integration of JDT compiler
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.4.2   Edit
Hardware: PC Linux
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-04-18 08:25 EDT by Sven Köhler CLA
Modified: 2009-07-28 11:38 EDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sven Köhler CLA 2009-04-18 08:25:55 EDT
JDT contains a solution for a problem, that has now been open for decades:
incremental compilation

As far as I know, the Eclipse-compiler supports everything that's needed for this. Mainly, it seems to built and maintain a dependency cache.

Yet, as far as I can remember, there is no way of using this from a build.xml. Instead, people mess around with calling javac and doing a clean once in a while because constant in-lining has messed up the project.

This has to stop.

So I'm asking for an enhancement. Beside a rather simple Ant integration, like the one that there is now, a more complex abstraction is needed:
- the JDT-compiler must be able to run in Eclipse and Ant
- therefore an abstraction of the dependency cache is needed. One that uses Eclipse mechanisms, and one that runs inside without all the Eclipse-framework in the background


So the JDT-Compiler can be used for mainly two tasks:
- the full job:
compiling *.java to *.class and maintaining the dependency cache as well as deleting old *.class files that don't have a source file anymore
- half the job:
only deleting old *.class files and maintaining the dependency cache - but without generating *.class files. This is needed, so that people can still use the reference compiler javac that is provided by Sun to generate the *.class files.
Comment 1 Olivier Thomann CLA 2009-07-28 11:38:24 EDT
This would be an enhancement. The batch compiler has no notion of build state.