Summary: | javac task fails to recompile java files that have external dependencies | ||
---|---|---|---|
Product: | Ant | Reporter: | Alon Albert <aalbert> |
Component: | Core tasks | Assignee: | Ant Notifications List <notifications> |
Status: | NEW --- | ||
Severity: | major | ||
Priority: | P2 | ||
Version: | 1.7.0 | ||
Target Milestone: | --- | ||
Hardware: | All | ||
OS: | All | ||
Attachments: | Simple test suite for testing javac ant task. |
Description
Alon Albert
2004-08-17 22:00:38 UTC
Created attachment 25305 [details]
Simple test suite for testing javac ant task.
I believe this is more than just an enhancement request, it is actually a bug. I don't think these two situations should ever produce different results: 1. calling javac with a destination directory that contains some previously compiled .class files 2. calling java with an empty destination directory If these produce different results then no programmer will ever trust existing .class files and will want to clean them every time. Please see the attached test suite that demonstrates the issue, just change the int value in R.java to something else and run: 1. ant compile 2. ant run Notice that the change never takes effect, but if you do the following it does: 1. ant clean 2. ant compile 3. ant run This is because static final integers are copied into the class files using them, even if those class files don't change they need to be recompiled if the int does. The simple algorithm used by ant to determine dependency is causing this problem and should be eliminated. |