Return-Path: Delivered-To: apmail-jakarta-ant-dev-archive@jakarta.apache.org Received: (qmail 93494 invoked by uid 500); 8 May 2001 12:59:46 -0000 Mailing-List: contact ant-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk Reply-To: ant-dev@jakarta.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list ant-dev@jakarta.apache.org Received: (qmail 93316 invoked from network); 8 May 2001 12:59:34 -0000 Date: Tue, 8 May 2001 05:56:27 -0700 (PDT) Message-Id: <200105081256.FAA29852@nagoya-a.betaversion.org> From: bugzilla@apache.org To: ant-dev@jakarta.apache.org Cc: Subject: [Bug 1652] New - JJTree Task: invalid timestamp check of target in outputdir X-Spam-Rating: h31.sny.collab.net 1.6.2 0/1000/N http://nagoya.apache.org/bugzilla/show_bug.cgi?id=1652 *** shadow/1652 Tue May 8 05:56:26 2001 --- shadow/1652.tmp.29849 Tue May 8 05:56:26 2001 *************** *** 0 **** --- 1,52 ---- + +============================================================================+ + | JJTree Task: invalid timestamp check of target in outputdir | + +----------------------------------------------------------------------------+ + | Bug #: 1652 Product: Ant | + | Status: NEW Version: 1.3 | + | Resolution: Platform: PC | + | Severity: Minor OS/Version: | + | Priority: Component: Optional Tasks | + +----------------------------------------------------------------------------+ + | Assigned To: ant-dev@jakarta.apache.org | + | Reported By: leon.poyyayil@trivadis.com | + +----------------------------------------------------------------------------+ + | URL: | + +============================================================================+ + | DESCRIPTION | + build.xml: + ... + + + ... + + This will generate the MyParser.jj although MyParser.jjt hadn't changed since + the last generation. This is not in accordance with the manual which states + "This task only invokes JJTree if the grammar file is newer than the generated + JavaCC file." + + Verified with the nightly build source: + /builds/jakarta-ant/nightly/2001-05-07/jakarta-ant-1.4alpha-src.tar.gz + + Can be fixed as follows: + in src/main/org/apache/tools/ant/taskdefs/optional/javacc/JJTree.java:190 + + change the line: + final File javaFile = new File( + target.toString().substring(0, target.toString().indexOf(".jjt")) + ".jj"); + + to something like: + final File javaFile = getOutputJavaFile(outputDirectory, target); + + such a method (getOutputJavaFile) should consider the output directory. An + implementation of such a method already exists in JavaCC.java in the same + directory. It only needs some update to handle the different extensions + required for this task (.jjt -> jj instead of jj -> java). + + Hope this helped. If you need further info feel free to contact me: + mailto:leon.poyyayil@trivadis.com + + Greetings + Leon