Return-Path: Delivered-To: apmail-ant-notifications-archive@minotaur.apache.org Received: (qmail 99083 invoked from network); 13 Jan 2011 03:02:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 13 Jan 2011 03:02:59 -0000 Received: (qmail 64337 invoked by uid 500); 13 Jan 2011 03:02:59 -0000 Delivered-To: apmail-ant-notifications-archive@ant.apache.org Received: (qmail 64262 invoked by uid 500); 13 Jan 2011 03:02:58 -0000 Mailing-List: contact notifications-help@ant.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@ant.apache.org Delivered-To: mailing list notifications@ant.apache.org Received: (qmail 64255 invoked by uid 99); 13 Jan 2011 03:02:57 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Jan 2011 03:02:57 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.22] (HELO thor.apache.org) (140.211.11.22) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 13 Jan 2011 03:02:56 +0000 Received: from thor.apache.org (localhost [127.0.0.1]) by thor.apache.org (8.13.8+Sun/8.13.8) with ESMTP id p0D32awf013680 for ; Thu, 13 Jan 2011 03:02:36 GMT Received: (from daemon@localhost) by thor.apache.org (8.13.8+Sun/8.13.8/Submit) id p0D32ZC2013679; Wed, 12 Jan 2011 22:02:35 -0500 (EST) Date: Wed, 12 Jan 2011 22:02:35 -0500 (EST) From: bugzilla@apache.org To: notifications@ant.apache.org Subject: DO NOT REPLY [Bug 50578] New: Javac task failes when the "target" attribute is specified as 1.1. X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Ant X-Bugzilla-Component: Core tasks X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: tadashi.maemura@nts.ricoh.co.jp X-Bugzilla-Status: NEW X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: notifications@ant.apache.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Message-ID: X-Bugzilla-URL: https://issues.apache.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 https://issues.apache.org/bugzilla/show_bug.cgi?id=50578 Summary: Javac task failes when the "target" attribute is specified as 1.1. Product: Ant Version: 1.8.2 Platform: PC OS/Version: All Status: NEW Severity: normal Priority: P2 Component: Core tasks AssignedTo: notifications@ant.apache.org ReportedBy: tadashi.maemura@nts.ricoh.co.jp With Ant 1.8.2, Javac task failes when the "target" attribute is specified as 1.1 and source attribute is not specified. Exsample of build.xml. ------------------------------------------------------------------------ ------------------------------------------------------------------------ Running the build.xml. (Version of javac is 1.6.0_22.) ------------------------------------------------------------------------ % ant Buildfile: build.xml compile: [javac] build.xml:6: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds [javac] Compiling 1 source file to classes [javac] [javac] WARNING [javac] [javac] The -source switch defaults to 1.5 in JDK 1.5 and 1.6. [javac] If you specify -target 1.2 you now must also specify -source 1.1. [javac] Ant will implicitly add -source 1.1 for you. Please change your build file. [javac] javac: invalid source release: 1.1 [javac] Usage: javac [javac] use -help for a list of possible options BUILD FAILED build.xml:6: Compile failed; see the compiler error output for details. ------------------------------------------------------------------------ Please note that the target attribute value is shown as 1.2. I investigated the problem: in org.apache.tools.ant.taskdefs.compilers.DefaultCompilerAdapter, setImplicitSourceSwitch method is in called as following. setImplicitSourceSwitch( (assumeJava15() || assumeJava16()) ? "1.5 in JDK 1.5 and 1.6" : "1.7 in JDK 1.7", cmd, s, t); But, setImplicitSourceSwitch method is declared as following. private void setImplicitSourceSwitch( String defaultDetails, Commandline cmd, String target, String source) Please note the orders of "target" and "source": the call above passes parameters in wrong order. -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug.