Return-Path: Delivered-To: apmail-ant-dev-archive@www.apache.org Received: (qmail 51001 invoked from network); 28 Feb 2004 11:22:22 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 28 Feb 2004 11:22:22 -0000 Received: (qmail 29291 invoked by uid 500); 28 Feb 2004 11:21:53 -0000 Delivered-To: apmail-ant-dev-archive@ant.apache.org Received: (qmail 29084 invoked by uid 500); 28 Feb 2004 11:21:52 -0000 Mailing-List: contact dev-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list dev@ant.apache.org Received: (qmail 29070 invoked from network); 28 Feb 2004 11:21:51 -0000 Received: from unknown (HELO leeds.cellectivity.com) (212.18.242.163) by daedalus.apache.org with SMTP; 28 Feb 2004 11:21:51 -0000 X-MimeOLE: Produced By Microsoft Exchange V6.0.6249.0 content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: quoted-printable Subject: RE: cvs commit: ant WHATSNEW build.xml Date: Sat, 28 Feb 2004 11:18:31 -0000 Message-ID: X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: cvs commit: ant WHATSNEW build.xml Thread-Index: AcP9Kz3bu+CyqCcUTxChE1j05bppfwAwPklA From: "Jose Alberto Fernandez" To: "Ant Developers List" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Peter, Maybe I do not understand the fix completely, but shouldn't the check be that a target cannot appear ON THE SAME FILE (imported or main) more than once? I.e., I should not be able to duplicate a target on a file and get away with it by importing it instead of executing it directly. Does your fix covers this case?=20 Jose Alberto > -----Original Message----- > From: Jan.Materne@rzf.fin-nrw.de [mailto:Jan.Materne@rzf.fin-nrw.de]=20 > Sent: 27 February 2004 12:14 > To: dev@ant.apache.org > Subject: RE: cvs commit: ant WHATSNEW build.xml >=20 >=20 > Fast resolved, Peter :) >=20 > Jan >=20 > > -----Original Message----- > > From: peterreilly@apache.org [mailto:peterreilly@apache.org] > > Sent: Friday, February 27, 2004 12:45 PM > > To: ant-cvs@apache.org > > Subject: cvs commit: ant WHATSNEW build.xml > >=20 > >=20 > > peterreilly 2004/02/27 03:45:15 > >=20 > > Modified: src/main/org/apache/tools/ant/helper=20 > > ProjectHelper2.java > > src/testcases/org/apache/tools/ant ProjectTest.java > > . WHATSNEW build.xml > > Log: > > Fix for duplicate targets in the build file. > > In ant 1.5 these were not allowed. > > In ant 1.6, with import file's targets being allowed to > > be overridden, duplicate targets where incorrectly allowed > > in normal build files. > > The fix just checks if the duplicate target is defined > > in an imported file or in a "main" file. > > Reported by: Dominique Devienne > > See: http://marc.theaimsgroup.com/?t=3D107705039100004&r=3D1&w=3D2 > > =20 > > Revision Changes Path > > 1.42 +8 -0 =20 > > ant/src/main/org/apache/tools/ant/helper/ProjectHelper2.java > > =20 > > Index: ProjectHelper2.java > > =20 > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > RCS file: > > /home/cvs/ant/src/main/org/apache/tools/ant/helper/ProjectHelp > > er2.java,v > > retrieving revision 1.41 > > retrieving revision 1.42 > > diff -u -r1.41 -r1.42 > > --- ProjectHelper2.java 9 Feb 2004 21:05:18 -0000 1.41 > > +++ ProjectHelper2.java 27 Feb 2004 11:45:14 -0000 1.42 > > @@ -804,6 +804,14 @@ > > =20 > > // If the name has already been defined ( > > import for example ) > > if (currentTargets.containsKey(name)) { > > + if (!context.isIgnoringProjectTag()) { > > + // not in an import'ed file > > + throw new BuildException( > > + "Duplicate target '" + name + "'", > > + new=20 > > Location(context.getLocator().getSystemId(), > > + =20 > > context.getLocator().getLineNumber(), > > + =20 > > context.getLocator().getColumnNumber())); > > + } > > // Alter the name. > > if (context.getCurrentProjectName() !=3D null) { > > String newName =3D=20 > > context.getCurrentProjectName() > > =20 > > =20 > > =20 > > 1.24 +10 -3 =20 > > ant/src/testcases/org/apache/tools/ant/ProjectTest.java > > =20 > > Index: ProjectTest.java > > =20 > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > RCS file: > > /home/cvs/ant/src/testcases/org/apache/tools/ant/ProjectTest.java,v > > retrieving revision 1.23 > > retrieving revision 1.24 > > diff -u -r1.23 -r1.24 > > --- ProjectTest.java 20 Feb 2004 12:24:04 -0000 1.23 > > +++ ProjectTest.java 27 Feb 2004 11:45:14 -0000 1.24 > > @@ -206,8 +206,15 @@ > > =20 > > public void testDuplicateTargets() { > > // fail, because buildfile contains two targets > > with the same name > > - BFT bft =3D new BFT("", "core/duplicate-target.xml"); > > - bft.expectBuildException("twice", "Duplicate target"); > > + try { > > + BFT bft =3D new BFT("", "core/duplicate-target.xml"); > > + } catch (BuildException ex) { > > + assertEquals("specific message", > > + "Duplicate target 'twice'", > > + ex.getMessage()); > > + return; > > + } > > + fail("Should throw BuildException about=20 > duplicate target"); > > } > > =20 > > public void testDuplicateTargetsImport() { > > @@ -265,4 +272,4 @@ > > class DummyTaskPackage extends Task { > > public DummyTaskPackage() {} > > public void execute() {} > > -} > > \ No newline at end of file > > +} > > =20 > > =20 > > =20 > > 1.556 +5 -1 ant/WHATSNEW > > =20 > > Index: WHATSNEW > > =20 > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > RCS file: /home/cvs/ant/WHATSNEW,v > > retrieving revision 1.555 > > retrieving revision 1.556 > > diff -u -r1.555 -r1.556 > > --- WHATSNEW 25 Feb 2004 13:02:52 -0000 1.555 > > +++ WHATSNEW 27 Feb 2004 11:45:15 -0000 1.556 > > @@ -53,7 +53,11 @@ > > =20 > > * MacroDef did not allow attributes named 'description'. > > Bugzilla Report 27175. > > =20 > > -* Throw build exception if name attribute missing from > > patternset. Bugzilla Report 25982. > > +* Throw build exception if name attribute missing from=20 > > patternset#NameEntry. > > + Bugzilla Report 25982. > > + > > +* Throw build exception if target repeated in build file,=20 > > but allow targets > > + to be repeated in imported files.=20 > > =20 > > Other changes: > > -------------- > > =20 > > =20 > > =20 > > 1.412 +1 -8 ant/build.xml > > =20 > > Index: build.xml > > =20 > = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > > RCS file: /home/cvs/ant/build.xml,v > > retrieving revision 1.411 > > retrieving revision 1.412 > > diff -u -r1.411 -r1.412 > > --- build.xml 26 Feb 2004 16:35:26 -0000 1.411 > > +++ build.xml 27 Feb 2004 11:45:15 -0000 1.412 > > @@ -329,13 +329,6 @@ > > > > name=3D"${optional.package}/BeanShellScriptTest.java"/> > > name=3D"${optional.package}/jdepend/JDependTest.java"/> > > - > - > > =20 > creates a minimum distribution=20 > in ./dist" > depends=3D"dist-lite"/> > =20 > - > \ No newline at end of file > + > =20 > =20 > =20 >=20 > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org > For additional commands, e-mail: dev-help@ant.apache.org >=20 --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org For additional commands, e-mail: dev-help@ant.apache.org