From eaa4b86d6b8a248ebb06122b47ec51c1ebc3cdbb Mon Sep 17 00:00:00 2001
From: Peter Reilly
Date: Wed, 22 Aug 2007 08:25:58 +0000
Subject: [PATCH] Bugzilla 43114: package-info.java repeatedly compiled
git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@568503 13f79535-47bb-0310-9956-ffa450edef68
---
WHATSNEW | 3 +
docs/manual/CoreTasks/javac.html | 30 +++++++
.../org/apache/tools/ant/taskdefs/Javac.java | 89 ++++++++++++++++++-
3 files changed, 121 insertions(+), 1 deletion(-)
diff --git a/WHATSNEW b/WHATSNEW
index 48e944af8..3928772de 100644
--- a/WHATSNEW
+++ b/WHATSNEW
@@ -226,6 +226,9 @@ Other changes:
* has a new attribute - errorOnMissingDir.
Bugzilla 11270.
+* handles package-info.java files, there were repeatedly compiled.
+ Bugzilla 43114.
+
Changes from Ant 1.6.5 to Ant 1.7.0
===================================
diff --git a/docs/manual/CoreTasks/javac.html b/docs/manual/CoreTasks/javac.html
index e3eb6ea23..0d5f9c63a 100644
--- a/docs/manual/CoreTasks/javac.html
+++ b/docs/manual/CoreTasks/javac.html
@@ -761,6 +761,36 @@ while all others are false
.
debug="yes"/>
+ Note on package-info.java
+
+ package-info.java
files were introduced in Java5 to
+ allow package level annotations. On compilation, if the java file
+ does not contain runtime annotations, there will be no .class file
+ for the java file. Up to Ant 1.7.1, when the <javac>
+ task is run again, the
+ task will try to compile the package-info java files again.
+
+
+ In Ant 1.7.1 the package-info.java will only be compiled if:
+
+ -
+ If a
package-info.class
file exists and is older than
+ the package-info.java
file.
+
+ -
+ If the directory for the
+
package-info.class
file does not exist.
+
+ -
+ If the directory for the
+
package-info.class
file exists, and has an older
+ modification time than the
+ the package-info.java
file. In this case
+ <javac> will touch the corresponding .class directory
+ on successful compilation.
+
+
+