From choijoshua@example.net Mon Sep 01 09:53:20 2003 Return-Path: <choijoshua@example.net> Delivered-To: choijoshua@example.net Received: (qmail 42292 invoked from network); 1 Sep 2003 09:53:20 -0000 Received: from daedalus.apache.org (HELO apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 1 Sep 2003 09:53:20 -0000 Received: (qmail 86428 invoked by uid 500); 1 Sep 2003 09:52:46 -0000 Delivered-To: choijoshua@example.net Received: (qmail 86358 invoked by uid 500); 1 Sep 2003 09:52:44 -0000 Mailing-List: contact choijoshua@example.net; run by ezmlm Precedence: bulk List-Unsubscribe: <mailto:choijoshua@example.net> List-Subscribe: <mailto:choijoshua@example.net> List-Help: <mailto:choijoshua@example.net> List-Post: <mailto:choijoshua@example.net> List-Id: "Ant Developers List" <dev.ant.apache.org> Reply-To: "Ant Developers List" <choijoshua@example.net> Delivered-To: mailing list choijoshua@example.net Received: (qmail 86344 invoked by uid 500); 1 Sep 2003 09:52:44 -0000 Received: (qmail 86338 invoked from network); 1 Sep 2003 09:52:44 -0000 Received: from unknown (HELO minotaur.apache.org) (83.161.120.155) by daedalus.apache.org with SMTP; 1 Sep 2003 09:52:44 -0000 Received: (qmail 42158 invoked by uid 1146); 1 Sep 2003 09:53:05 -0000 Date: 1 Sep 2003 09:53:05 -0000 Message-ID: <choijoshua@example.net> From: choijoshua@example.net To: choijoshua@example.net Subject: cvs commit: ant/src/main/org/apache/tools/ant/taskdefs/optional/starteam StarTeamCheckout.java 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 bodewig 2003/09/01 02:53:05 Modified: docs/manual/OptionalTasks starteam.html src/main/org/apache/tools/ant/taskdefs/optional/starteam StarTeamCheckout.java Log: label and lock/unlock cannot be used at the same time in <stcheckout>. PR: 22829 Submitted by: Steve Cohen <choijoshua@example.net> Revision Changes Path 1.21 +2 -2 ant/docs/manual/OptionalTasks/starteam.html Index: starteam.html =================================================================== RCS file: /home/cvs/ant/docs/manual/OptionalTasks/starteam.html,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- starteam.html 7 Jul 2003 07:24:53 -0000 1.20 +++ starteam.html 1 Sep 2003 09:53:05 -0000 1.21 @@ -145,7 +145,7 @@ </tr> <tr> <td valign="top">label</td> - <td valign="top">Check out files as of this label. The label must exist in starteam or an exception will be thrown. If not specified, the most recent version of each file will be checked out.</td> + <td valign="top">Check out files as of this label. The label must exist in starteam or an exception will be thrown. If either <code>locked</code> or <code>unlocked</code> is true, an exception will be thrown. If not specified, the most recent version of each file will be checked out.</td> <td align="center" valign="top">no</td> </tr> <tr> @@ -163,7 +163,7 @@ <td valign="top">locked</td> <td valign="top">If true, file will be locked against changes by other users. If false (default) has no effect. - <td align="center" valign="center" rowspan="2">Either or neither, but not both, may be true.</td> + <td align="center" valign="center" rowspan="2">Either or neither, but not both, may be true. Neither may be true if a <code>label</code> is specified.</td> </tr> <tr> <td valign="top">unlocked</td> 1.21 +5 -0 ant/src/main/org/apache/tools/ant/taskdefs/optional/starteam/StarTeamCheckout.java Index: StarTeamCheckout.java =================================================================== RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/starteam/StarTeamCheckout.java,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- StarTeamCheckout.java 19 Jul 2003 08:11:06 -0000 1.20 +++ StarTeamCheckout.java 1 Sep 2003 09:53:05 -0000 1.21 @@ -261,6 +261,11 @@ Project.MSG_WARN); this.createDirs = false; } + if (lockStatus != Item.LockType.UNCHANGED && null != getLabel()) { + log("Neither locked nor unlocked may be true when checking out a labeled version.", + Project.MSG_ERR); + throw new BuildException("Lock status may not be changed when checking out a non-current version."); + } } /** --------------------------------------------------------------------- To unsubscribe, e-mail: choijoshua@example.net For additional commands, e-mail: choijoshua@example.net From choijoshua@example.net Mon Sep 01 09:57:16 2003 Return-Path: <choijoshua@example.net> Delivered-To: choijoshua@example.net Received: (qmail 44492 invoked from network); 1 Sep 2003 09:57:16 -0000 Received: from daedalus.apache.org (HELO apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 1 Sep 2003 09:57:16 -0000 Received: (qmail 95844 invoked by uid 500); 1 Sep 2003 09:56:42 -0000 Delivered-To: choijoshua@example.net Received: (qmail 95790 invoked by uid 500); 1 Sep 2003 09:56:41 -0000 Mailing-List: contact choijoshua@example.net; run by ezmlm Precedence: bulk List-Unsubscribe: <mailto:choijoshua@example.net> List-Subscribe: <mailto:choijoshua@example.net> List-Help: <mailto:choijoshua@example.net> List-Post: <mailto:choijoshua@example.net> List-Id: "Ant Developers List" <dev.ant.apache.org> Reply-To: "Ant Developers List" <choijoshua@example.net> Delivered-To: mailing list choijoshua@example.net Received: (qmail 95773 invoked by uid 500); 1 Sep 2003 09:56:41 -0000 Received: (qmail 95768 invoked from network); 1 Sep 2003 09:56:41 -0000 Received: from unknown (HELO minotaur.apache.org) (83.161.120.155) by daedalus.apache.org with SMTP; 1 Sep 2003 09:56:41 -0000 Received: (qmail 44332 invoked by uid 1146); 1 Sep 2003 09:57:01 -0000 Date: 1 Sep 2003 09:57:01 -0000 Message-ID: <choijoshua@example.net> From: choijoshua@example.net To: choijoshua@example.net Subject: cvs commit: ant/src/script antRun.pl 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 bodewig 2003/09/01 02:57:01 Modified: src/script antRun.pl Log: Add Copyright lines, PR 22807 Revision Changes Path 1.2 +5 -1 ant/src/script/antRun.pl Index: antRun.pl =================================================================== RCS file: /home/cvs/ant/src/script/antRun.pl,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- antRun.pl 15 Nov 2001 08:00:09 -0000 1.1 +++ antRun.pl 1 Sep 2003 09:57:01 -0000 1.2 @@ -1,4 +1,8 @@ #!/usr/bin/perl +# +# Copyright (c) 2001,2003 The Apache Software Foundation. All rights +# reserved. +# ####################################################################### # # antRun.pl @@ -7,7 +11,7 @@ # this is akin to antRun.bat, and antRun the SH script # # created: 2001-10-18 -# last modified: 2001-11-13 +# last modified: $Date$ # author: Jeff Tulley choijoshua@example.net ####################################################################### #be fussy about variables --------------------------------------------------------------------- To unsubscribe, e-mail: choijoshua@example.net For additional commands, e-mail: choijoshua@example.net From choijoshua@example.net Mon Sep 01 09:57:31 2003 Return-Path: <choijoshua@example.net> Delivered-To: choijoshua@example.net Received: (qmail 44700 invoked from network); 1 Sep 2003 09:57:31 -0000 Received: from daedalus.apache.org (HELO apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 1 Sep 2003 09:57:31 -0000 Received: (qmail 96698 invoked by uid 500); 1 Sep 2003 09:56:56 -0000 Delivered-To: choijoshua@example.net Received: (qmail 96641 invoked by uid 500); 1 Sep 2003 09:56:55 -0000 Mailing-List: contact choijoshua@example.net; run by ezmlm Precedence: bulk List-Unsubscribe: <mailto:choijoshua@example.net> List-Subscribe: <mailto:choijoshua@example.net> List-Help: <mailto:choijoshua@example.net> List-Post: <mailto:choijoshua@example.net> List-Id: "Ant Developers List" <dev.ant.apache.org> Reply-To: "Ant Developers List" <choijoshua@example.net> Delivered-To: mailing list choijoshua@example.net Received: (qmail 96624 invoked by uid 500); 1 Sep 2003 09:56:55 -0000 Received: (qmail 96620 invoked from network); 1 Sep 2003 09:56:55 -0000 Received: from unknown (HELO minotaur.apache.org) (83.161.120.155) by daedalus.apache.org with SMTP; 1 Sep 2003 09:56:55 -0000 Received: (qmail 40633 invoked by uid 1146); 1 Sep 2003 09:50:05 -0000 Date: 1 Sep 2003 09:50:05 -0000 Message-ID: <choijoshua@example.net> From: choijoshua@example.net To: choijoshua@example.net Subject: cvs commit: ant/src/testcases/org/apache/tools/ant/util LazyFileOutputStreamTest.java 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 bodewig 2003/09/01 02:50:05 Modified: src/main/org/apache/tools/ant/taskdefs Redirector.java Added: src/main/org/apache/tools/ant/util LazyFileOutputStream.java src/testcases/org/apache/tools/ant/util LazyFileOutputStreamTest.java Removed: src/main/org/apache/tools/ant/util DelayedFileOutputStream.java Log: DelayedFileOutputStream -> LazyFileOutputStream (thanks, DD). Add test for LazyFileOutputStream. Make sure that output files get created, even if they are empty. This is for backwards compatibility. Found and removed an attempt to close the same stream twice. Revision Changes Path 1.10 +14 -6 ant/src/main/org/apache/tools/ant/taskdefs/Redirector.java Index: Redirector.java =================================================================== RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/Redirector.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- Redirector.java 27 Aug 2003 10:08:25 -0000 1.9 +++ Redirector.java 1 Sep 2003 09:50:05 -0000 1.10 @@ -67,7 +67,7 @@ import org.apache.tools.ant.BuildException; import org.apache.tools.ant.Project; import org.apache.tools.ant.Task; -import org.apache.tools.ant.util.DelayedFileOutputStream; +import org.apache.tools.ant.util.LazyFileOutputStream; import org.apache.tools.ant.util.StringUtils; import org.apache.tools.ant.util.TeeOutputStream; @@ -269,8 +269,7 @@ errorStream = new LogOutputStream(managingTask, Project.MSG_WARN); } else { if (out != null) { - outputStream - = new DelayedFileOutputStream(out, append); + outputStream = new LazyFileOutputStream(out, append); managingTask.log("Output redirected to " + out, Project.MSG_VERBOSE); } @@ -296,8 +295,7 @@ } if (error != null) { - errorStream - = new DelayedFileOutputStream(error, append); + errorStream = new LazyFileOutputStream(error, append); managingTask.log("Error redirected to " + error, Project.MSG_VERBOSE); } @@ -460,8 +458,18 @@ if (inputStream != null) { inputStream.close(); } + + if (outputStream instanceof LazyFileOutputStream) { + ((LazyFileOutputStream) outputStream).open(); + } outputStream.close(); - errorStream.close(); + + if (errorStream != outputStream) { + if (errorStream instanceof LazyFileOutputStream) { + ((LazyFileOutputStream) errorStream).open(); + } + errorStream.close(); + } if (baos != null) { setPropertyFromBAOS(baos, outputProperty); 1.1 ant/src/main/org/apache/tools/ant/util/LazyFileOutputStream.java Index: LazyFileOutputStream.java =================================================================== /* * The Apache Software License, Version 1.1 * * Copyright (c) 2003 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "Ant" and "Apache Software * Foundation" must not be used to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact choijoshua@example.net. * * 5. Products derived from this software may not be called "Apache" * nor may "Apache" appear in their names without prior written * permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * <http://www.apache.org/>. */ package org.apache.tools.ant.util; import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.OutputStream; /** * Class that delays opening the output file until the first bytes * shall be written or the method {@link #open open} has been invoked * explicitly. * * @since Ant 1.6 */ public class LazyFileOutputStream extends OutputStream { private FileOutputStream fos; private File file; private boolean append; private boolean opened = false; private boolean closed = false; /** * Creates a stream that will eventually write to the file with * the given name and replace it. */ public LazyFileOutputStream(String name) { this(name, false); } /** * Creates a stream that will eventually write to the file with * the given name and optionally append to instead of replacing * it. */ public LazyFileOutputStream(String name, boolean append) { this(new File(name), append); } /** * Creates a stream that will eventually write to the file with * the given name and replace it. */ public LazyFileOutputStream(File f) { this(f, false); } /** * Creates a stream that will eventually write to the file with * the given name and optionally append to instead of replacing * it. */ public LazyFileOutputStream(File file, boolean append) { this.file = file; this.append = append; } /** * Explicitly open the file for writing. * * <p>Returns silently if the file has already been opened.</p> */ public void open() throws IOException { ensureOpened(); } public synchronized void close() throws IOException { if (opened) { fos.close(); } closed = true; } /** * Delegates to the three arg version. */ public void write(byte[] b) throws IOException { write(b, 0, b.length); } public synchronized void write(byte[] b, int offset, int len) throws IOException { ensureOpened(); fos.write(b, offset, len); } public synchronized void write(int b) throws IOException { ensureOpened(); fos.write(b); } private synchronized void ensureOpened() throws IOException { if (closed) { throw new IOException(file + " has already been closed."); } if (!opened) { fos = new FileOutputStream(file.getAbsolutePath(), append); opened = true; } } } 1.1 ant/src/testcases/org/apache/tools/ant/util/LazyFileOutputStreamTest.java Index: LazyFileOutputStreamTest.java =================================================================== /* * The Apache Software License, Version 1.1 * * Copyright (c) 2003 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, if * any, must include the following acknowlegement: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowlegement may appear in the software itself, * if and wherever such third-party acknowlegements normally appear. * * 4. The names "Ant" and "Apache Software * Foundation" must not be used to endorse or promote products derived * from this software without prior written permission. For written * permission, please contact choijoshua@example.net. * * 5. Products derived from this software may not be called "Apache" * nor may "Apache" appear in their names without prior written * permission of the Apache Group. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * <http://www.apache.org/>. */ package org.apache.tools.ant.util; import java.io.File; import java.io.IOException; import junit.framework.TestCase; /** * @since Ant 1.6 */ public class LazyFileOutputStreamTest extends TestCase { private LazyFileOutputStream los; private final static File f = new File("test.txt"); public LazyFileOutputStreamTest(String s) { super(s); } public void setUp() { los = new LazyFileOutputStream(f); } public void tearDown() throws IOException { try { los.close(); } finally { f.delete(); } } public void testNoFileWithoutWrite() throws IOException { los.close(); assertTrue(f + " has not been written.", !f.exists()); } public void testOpen() throws IOException { los.open(); los.close(); assertTrue(f + " has been written.", f.exists()); } public void testSingleByte() throws IOException { los.write(0); los.close(); assertTrue(f + " has been written.", f.exists()); } public void testByteArray() throws IOException { los.write(new byte[] {0}); los.close(); assertTrue(f + " has been written.", f.exists()); } } --------------------------------------------------------------------- To unsubscribe, e-mail: choijoshua@example.net For additional commands, e-mail: choijoshua@example.net From choijoshua@example.net Mon Sep 01 10:13:58 2003 Return-Path: <choijoshua@example.net> Delivered-To: choijoshua@example.net Received: (qmail 52868 invoked from network); 1 Sep 2003 10:13:58 -0000 Received: from daedalus.apache.org (HELO apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 1 Sep 2003 10:13:58 -0000 Received: (qmail 38735 invoked by uid 500); 1 Sep 2003 10:13:26 -0000 Delivered-To: choijoshua@example.net Received: (qmail 38567 invoked by uid 500); 1 Sep 2003 10:13:24 -0000 Mailing-List: contact choijoshua@example.net; run by ezmlm Precedence: bulk List-Unsubscribe: <mailto:choijoshua@example.net> List-Subscribe: <mailto:choijoshua@example.net> List-Help: <mailto:choijoshua@example.net> List-Post: <mailto:choijoshua@example.net> List-Id: "Ant Developers List" <dev.ant.apache.org> Reply-To: "Ant Developers List" <choijoshua@example.net> Delivered-To: mailing list choijoshua@example.net Received: (qmail 38521 invoked by uid 500); 1 Sep 2003 10:13:23 -0000 Received: (qmail 38510 invoked from network); 1 Sep 2003 10:13:23 -0000 Received: from unknown (HELO minotaur.apache.org) (83.161.120.155) by daedalus.apache.org with SMTP; 1 Sep 2003 10:13:23 -0000 Received: (qmail 52765 invoked by uid 1652); 1 Sep 2003 10:13:44 -0000 Date: 1 Sep 2003 10:13:44 -0000 Message-ID: <choijoshua@example.net> From: choijoshua@example.net To: choijoshua@example.net Subject: cvs commit: ant/docs/manual/CoreTypes permissions.html 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 antoine 2003/09/01 03:13:44 Modified: docs/manual/CoreTypes permissions.html Log: Adding a line about file.encoding, adding also missing quotes Revision Changes Path 1.2 +21 -20 ant/docs/manual/CoreTypes/permissions.html Index: permissions.html =================================================================== RCS file: /home/cvs/ant/docs/manual/CoreTypes/permissions.html,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- permissions.html 27 Aug 2003 14:23:17 -0000 1.1 +++ permissions.html 1 Sep 2003 10:13:44 -0000 1.2 @@ -98,26 +98,27 @@ <h3><a name="baseset">Base set</a></h3> A permissions set implictly contains the following permissions: <blockquote><pre> -&lt;grant class=&quot;java.net.SocketPermission&quot; name=localhost:1024-&quot; actions=&quot;listen&quot;&gt; -&lt;grant class=&quot;java.util.PropertyPermission&quot; name=java.version&quot; actions=&quot;read&quot;&gt; -&lt;grant class=&quot;java.util.PropertyPermission&quot; name=java.vendor&quot; actions=&quot;read&quot;&gt; -&lt;grant class=&quot;java.util.PropertyPermission&quot; name=java.vendor.url&quot; actions=&quot;read&quot;&gt; -&lt;grant class=&quot;java.util.PropertyPermission&quot; name=java.class.version&quot; actions=&quot;read&quot;&gt; -&lt;grant class=&quot;java.util.PropertyPermission&quot; name=os.name&quot; actions=&quot;read&quot;&gt; -&lt;grant class=&quot;java.util.PropertyPermission&quot; name=os.version&quot; actions=&quot;read&quot;&gt; -&lt;grant class=&quot;java.util.PropertyPermission&quot; name=os.arch&quot; actions=&quot;read&quot;&gt; -&lt;grant class=&quot;java.util.PropertyPermission&quot; name=file.separator&quot; actions=&quot;read&quot;&gt; -&lt;grant class=&quot;java.util.PropertyPermission&quot; name=path.separator&quot; actions=&quot;read&quot;&gt; -&lt;grant class=&quot;java.util.PropertyPermission&quot; name=line.separator&quot; actions=&quot;read&quot;&gt; -&lt;grant class=&quot;java.util.PropertyPermission&quot; name=java.specification.version&quot; actions=&quot;read&quot;&gt; -&lt;grant class=&quot;java.util.PropertyPermission&quot; name=java.specification.vendor&quot; actions=&quot;read&quot;&gt; -&lt;grant class=&quot;java.util.PropertyPermission&quot; name=java.specification.name&quot; actions=&quot;read&quot;&gt; -&lt;grant class=&quot;java.util.PropertyPermission&quot; name=java.vm.specification.version&quot; actions=&quot;read&quot;&gt; -&lt;grant class=&quot;java.util.PropertyPermission&quot; name=java.vm.specification.vendor&quot; actions=&quot;read&quot;&gt; -&lt;grant class=&quot;java.util.PropertyPermission&quot; name=java.vm.specification.name&quot; actions=&quot;read&quot;&gt; -&lt;grant class=&quot;java.util.PropertyPermission&quot; name=java.vm.version&quot; actions=&quot;read&quot;&gt; -&lt;grant class=&quot;java.util.PropertyPermission&quot; name=java.vm.vendor&quot; actions=&quot;read&quot;&gt; -&lt;grant class=&quot;java.util.PropertyPermission&quot; name=java.vm.name&quot; actions=&quot;read&quot;&gt; +&lt;grant class=&quot;java.net.SocketPermission&quot; name=&quot;localhost:1024-&quot; actions=&quot;listen&quot;&gt; +&lt;grant class=&quot;java.util.PropertyPermission&quot; name=&quot;java.version&quot; actions=&quot;read&quot;&gt; +&lt;grant class=&quot;java.util.PropertyPermission&quot; name=&quot;java.vendor&quot; actions=&quot;read&quot;&gt; +&lt;grant class=&quot;java.util.PropertyPermission&quot; name=&quot;java.vendor.url&quot; actions=&quot;read&quot;&gt; +&lt;grant class=&quot;java.util.PropertyPermission&quot; name=&quot;java.class.version&quot; actions=&quot;read&quot;&gt; +&lt;grant class=&quot;java.util.PropertyPermission&quot; name=&quot;os.name&quot; actions=&quot;read&quot;&gt; +&lt;grant class=&quot;java.util.PropertyPermission&quot; name=&quot;os.version&quot; actions=&quot;read&quot;&gt; +&lt;grant class=&quot;java.util.PropertyPermission&quot; name=&quot;os.arch&quot; actions=&quot;read&quot;&gt; +&lt;grant class=&quot;java.util.PropertyPermission&quot; name=&quot;file.encoding&quot; actions=&quot;read&quot;&gt; +&lt;grant class=&quot;java.util.PropertyPermission&quot; name=&quot;file.separator&quot; actions=&quot;read&quot;&gt; +&lt;grant class=&quot;java.util.PropertyPermission&quot; name=&quot;path.separator&quot; actions=&quot;read&quot;&gt; +&lt;grant class=&quot;java.util.PropertyPermission&quot; name=&quot;line.separator&quot; actions=&quot;read&quot;&gt; +&lt;grant class=&quot;java.util.PropertyPermission&quot; name=&quot;java.specification.version&quot; actions=&quot;read&quot;&gt; +&lt;grant class=&quot;java.util.PropertyPermission&quot; name=&quot;java.specification.vendor&quot; actions=&quot;read&quot;&gt; +&lt;grant class=&quot;java.util.PropertyPermission&quot; name=&quot;java.specification.name&quot; actions=&quot;read&quot;&gt; +&lt;grant class=&quot;java.util.PropertyPermission&quot; name=&quot;java.vm.specification.version&quot; actions=&quot;read&quot;&gt; +&lt;grant class=&quot;java.util.PropertyPermission&quot; name=&quot;java.vm.specification.vendor&quot; actions=&quot;read&quot;&gt; +&lt;grant class=&quot;java.util.PropertyPermission&quot; name=&quot;java.vm.specification.name&quot; actions=&quot;read&quot;&gt; +&lt;grant class=&quot;java.util.PropertyPermission&quot; name=&quot;java.vm.version&quot; actions=&quot;read&quot;&gt; +&lt;grant class=&quot;java.util.PropertyPermission&quot; name=&quot;java.vm.vendor&quot; actions=&quot;read&quot;&gt; +&lt;grant class=&quot;java.util.PropertyPermission&quot; name=&quot;java.vm.name&quot; actions=&quot;read&quot;&gt; </blockquote></pre> These permissions can be revoked via &lt;revoke&gt; elements if necessary. --------------------------------------------------------------------- To unsubscribe, e-mail: choijoshua@example.net For additional commands, e-mail: choijoshua@example.net From choijoshua@example.net Mon Sep 01 10:14:49 2003 Return-Path: <choijoshua@example.net> Delivered-To: choijoshua@example.net Received: (qmail 53378 invoked from network); 1 Sep 2003 10:14:49 -0000 Received: from daedalus.apache.org (HELO apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 1 Sep 2003 10:14:49 -0000 Received: (qmail 40393 invoked by uid 500); 1 Sep 2003 10:14:17 -0000 Delivered-To: choijoshua@example.net Received: (qmail 40255 invoked by uid 500); 1 Sep 2003 10:14:15 -0000 Mailing-List: contact choijoshua@example.net; run by ezmlm Precedence: bulk List-Unsubscribe: <mailto:choijoshua@example.net> List-Subscribe: <mailto:choijoshua@example.net> List-Help: <mailto:choijoshua@example.net> List-Post: <mailto:choijoshua@example.net> List-Id: "Ant Developers List" <dev.ant.apache.org> Reply-To: "Ant Developers List" <choijoshua@example.net> Delivered-To: mailing list choijoshua@example.net Received: (qmail 40236 invoked by uid 500); 1 Sep 2003 10:14:15 -0000 Received: (qmail 40227 invoked from network); 1 Sep 2003 10:14:15 -0000 Received: from unknown (HELO minotaur.apache.org) (83.161.120.155) by daedalus.apache.org with SMTP; 1 Sep 2003 10:14:15 -0000 Received: (qmail 53215 invoked by uid 1146); 1 Sep 2003 10:14:26 -0000 Date: 1 Sep 2003 10:14:26 -0000 Message-ID: <choijoshua@example.net> From: choijoshua@example.net To: choijoshua@example.net Subject: cvs commit: ant/src/script runant.pl 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 bodewig 2003/09/01 03:14:26 Modified: src/script runant.pl Log: Sync runant.pl with the other scripts to use new Launcher Revision Changes Path 1.6 +9 -36 ant/src/script/runant.pl Index: runant.pl =================================================================== RCS file: /home/cvs/ant/src/script/runant.pl,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- runant.pl 1 Jun 2002 12:26:42 -0000 1.5 +++ runant.pl 1 Sep 2003 10:14:26 -0000 1.6 @@ -1,6 +1,6 @@ #!/usr/bin/perl # -# Copyright (c) 2001-2002 The Apache Software Foundation. All rights +# Copyright (c) 2000-2003 The Apache Software Foundation. All rights # reserved. # ####################################################################### @@ -18,7 +18,7 @@ # the code is not included. # # created: 2000-8-24 -# last modified: 2000-8-24 +# last modified: $Date$ # author: Steve Loughran choijoshua@example.net ####################################################################### # @@ -86,38 +86,11 @@ $localpath=""; } -#add jar files. I am sure there is a perl one liner to do this. -my $jarpattern="$HOME/lib/*.jar"; -my @jarfiles =glob($jarpattern); -print "jarfiles=@jarfiles\n" if ($debug); -my $jar; -foreach $jar (@jarfiles ) - { - $localpath.="$s$jar"; - } - -#if Java home is defined, look for tools.jar & classes.zip and add to classpath -my $JAVA_HOME = $ENV{JAVA_HOME}; -if ($JAVA_HOME ne "") - { - my $tools="$JAVA_HOME/lib/tools.jar"; - if (-e "$tools") - { - $localpath .= "$s$tools"; - } - my $classes="$JAVA_HOME/lib/classes.zip"; - if (-e $classes) - { - $localpath .= "$s$classes"; - } - } -else - { - print "\n\nWarning: JAVA_HOME environment variable is not set.\n". - "If the build fails because sun.* classes could not be found\n". - "you will need to set the JAVA_HOME environment variable\n". - "to the installation directory of java\n"; - } +if ($localpath eq "") { + $localpath = "$HOME/lib/ant-launcher.jar"; +} else { + $localpath = "$HOME/lib/ant-launcher.jar$s$localpath"; +} #set JVM options and Ant arguments, if any my @ANT_OPTS=split(" ", $ENV{ANT_OPTS}); @@ -131,6 +104,7 @@ #construct arguments to java my @ARGS; +push @ARGS, @ANT_OPTS; if ($onnetware == 1) { # make classpath literally $CLASSPATH; and then the contents of $localpath @@ -143,8 +117,7 @@ push @ARGS, "-classpath", "$localpath"; } push @ARGS, "-Dant.home=$HOME"; -push @ARGS, @ANT_OPTS; -push @ARGS, "org.apache.tools.ant.Main", @ANT_ARGS; +push @ARGS, "org.apache.tools.ant.launch.Launcher", @ANT_ARGS; push @ARGS, @ARGV; print "\n $JAVACMD @ARGS\n\n" if ($debug); --------------------------------------------------------------------- To unsubscribe, e-mail: choijoshua@example.net For additional commands, e-mail: choijoshua@example.net From choijoshua@example.net Mon Sep 01 10:53:04 2003 Return-Path: <choijoshua@example.net> Delivered-To: choijoshua@example.net Received: (qmail 67897 invoked from network); 1 Sep 2003 10:53:04 -0000 Received: from daedalus.apache.org (HELO apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 1 Sep 2003 10:53:04 -0000 Received: (qmail 14819 invoked by uid 500); 1 Sep 2003 10:52:57 -0000 Delivered-To: choijoshua@example.net Received: (qmail 14748 invoked by uid 500); 1 Sep 2003 10:52:56 -0000 Mailing-List: contact choijoshua@example.net; run by ezmlm Precedence: bulk List-Unsubscribe: <mailto:choijoshua@example.net> List-Subscribe: <mailto:choijoshua@example.net> List-Help: <mailto:choijoshua@example.net> List-Post: <mailto:choijoshua@example.net> List-Id: "Ant Developers List" <dev.ant.apache.org> Reply-To: "Ant Developers List" <choijoshua@example.net> Delivered-To: mailing list choijoshua@example.net Received: (qmail 14706 invoked by uid 500); 1 Sep 2003 10:52:55 -0000 Received: (qmail 14698 invoked from network); 1 Sep 2003 10:52:55 -0000 Received: from unknown (HELO minotaur.apache.org) (83.161.120.155) by daedalus.apache.org with SMTP; 1 Sep 2003 10:52:55 -0000 Received: (qmail 67784 invoked by uid 1652); 1 Sep 2003 10:52:43 -0000 Date: 1 Sep 2003 10:52:43 -0000 Message-ID: <choijoshua@example.net> From: choijoshua@example.net To: choijoshua@example.net Subject: cvs commit: ant/src/script runant.pl 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 antoine 2003/09/01 03:52:43 Modified: src/script runant.pl Log: Add cygwin support in runant.pl Revision Changes Path 1.7 +18 -1 ant/src/script/runant.pl Index: runant.pl =================================================================== RCS file: /home/cvs/ant/src/script/runant.pl,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- runant.pl 1 Sep 2003 10:14:26 -0000 1.6 +++ runant.pl 1 Sep 2003 10:52:43 -0000 1.7 @@ -61,6 +61,8 @@ $onnetware = 1; } +my $oncygwin = ($^O eq "cygwin"); + #ISSUE: what java wants to split up classpath varies from platform to platform #and perl is not too hot at hinting which box it is on. #here I assume ":" 'cept on win32, dos, and netware. Add extra tests here as needed. @@ -105,6 +107,17 @@ #construct arguments to java my @ARGS; push @ARGS, @ANT_OPTS; + +my $CYGHOME = ""; + +if ($oncygwin == 1) { + $localpath = `cygpath --path --windows $localpath`; + chomp ($localpath); + $HOME = `cygpath --path --windows $HOME`; + chomp ($HOME); + $CYGHOME = `cygpath --path --windows $ENV{HOME}`; + chomp ($CYGHOME); +} if ($onnetware == 1) { # make classpath literally $CLASSPATH; and then the contents of $localpath @@ -117,6 +130,10 @@ push @ARGS, "-classpath", "$localpath"; } push @ARGS, "-Dant.home=$HOME"; +if ( ! $CYGHOME eq "" ) +{ + push @ARGS, "-Dcygwin.user.home=\"$CYGHOME\"" +} push @ARGS, "org.apache.tools.ant.launch.Launcher", @ANT_ARGS; push @ARGS, @ARGV; --------------------------------------------------------------------- To unsubscribe, e-mail: choijoshua@example.net For additional commands, e-mail: choijoshua@example.net From choijoshua@example.net Mon Sep 01 11:29:54 2003 Return-Path: <choijoshua@example.net> Delivered-To: choijoshua@example.net Received: (qmail 81612 invoked from network); 1 Sep 2003 11:29:54 -0000 Received: from daedalus.apache.org (HELO apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 1 Sep 2003 11:29:54 -0000 Received: (qmail 93856 invoked by uid 500); 1 Sep 2003 11:29:48 -0000 Delivered-To: choijoshua@example.net Received: (qmail 93811 invoked by uid 500); 1 Sep 2003 11:29:47 -0000 Mailing-List: contact choijoshua@example.net; run by ezmlm Precedence: bulk List-Unsubscribe: <mailto:choijoshua@example.net> List-Subscribe: <mailto:choijoshua@example.net> List-Help: <mailto:choijoshua@example.net> List-Post: <mailto:choijoshua@example.net> List-Id: "Ant Developers List" <dev.ant.apache.org> Reply-To: "Ant Developers List" <choijoshua@example.net> Delivered-To: mailing list choijoshua@example.net Received: (qmail 93760 invoked from network); 1 Sep 2003 11:29:47 -0000 Received: from unknown (HELO exchange.sun.com) (83.161.120.155) by daedalus.apache.org with SMTP; 1 Sep 2003 11:29:47 -0000 Received: (qmail 3895 invoked by uid 50); 1 Sep 2003 09:42:19 -0000 Date: 1 Sep 2003 09:42:19 -0000 Message-ID: <choijoshua@example.net> From: choijoshua@example.net To: choijoshua@example.net Cc: Subject: DO NOT REPLY [Bug 22807] - No copyright in antRun.pl 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 DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22807>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22807 No copyright in antRun.pl choijoshua@example.net changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |choijoshua@example.net choijoshua@example.net |choijoshua@example.net ------- Additional Comments From choijoshua@example.net 2003-09-01 09:42 ------- I was going to adapt the Perl script to use the new launcher anyway and will add the copyright header while choijoshua@example.net. --------------------------------------------------------------------- To unsubscribe, e-mail: choijoshua@example.net For additional commands, e-mail: choijoshua@example.net From choijoshua@example.net Mon Sep 01 11:30:32 2003 Return-Path: <choijoshua@example.net> Delivered-To: choijoshua@example.net Received: (qmail 81905 invoked from network); 1 Sep 2003 11:30:32 -0000 Received: from daedalus.apache.org (HELO apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 1 Sep 2003 11:30:32 -0000 Received: (qmail 95192 invoked by uid 500); 1 Sep 2003 11:30:26 -0000 Delivered-To: choijoshua@example.net Received: (qmail 95150 invoked by uid 500); 1 Sep 2003 11:30:26 -0000 Mailing-List: contact choijoshua@example.net; run by ezmlm Precedence: bulk List-Unsubscribe: <mailto:choijoshua@example.net> List-Subscribe: <mailto:choijoshua@example.net> List-Help: <mailto:choijoshua@example.net> List-Post: <mailto:choijoshua@example.net> List-Id: "Ant Developers List" <dev.ant.apache.org> Reply-To: "Ant Developers List" <choijoshua@example.net> Delivered-To: mailing list choijoshua@example.net Received: (qmail 95135 invoked from network); 1 Sep 2003 11:30:26 -0000 Received: from unknown (HELO exchange.sun.com) (83.161.120.155) by daedalus.apache.org with SMTP; 1 Sep 2003 11:30:26 -0000 Received: (qmail 8066 invoked by uid 50); 1 Sep 2003 09:46:18 -0000 Date: 1 Sep 2003 09:46:18 -0000 Message-ID: <choijoshua@example.net> From: choijoshua@example.net To: choijoshua@example.net Cc: Subject: DO NOT REPLY [Bug 22834] - XSLT fails transforming file with doctype 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 DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22834>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22834 XSLT fails transforming file with doctype ------- Additional Comments From choijoshua@example.net 2003-09-01 09:46 ------- Maybe your Linux box is behind a firewall? You are loading the DTD via hhtp in your example and if the network connection to Sun fails for some reason, you are out of luck. Could you retry with a local copy of the DTD? --------------------------------------------------------------------- To unsubscribe, e-mail: choijoshua@example.net For additional commands, e-mail: choijoshua@example.net From choijoshua@example.net Mon Sep 01 12:48:17 2003 Return-Path: <choijoshua@example.net> Delivered-To: choijoshua@example.net Received: (qmail 21380 invoked from network); 1 Sep 2003 12:48:17 -0000 Received: from daedalus.apache.org (HELO apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 1 Sep 2003 12:48:17 -0000 Received: (qmail 66841 invoked by uid 500); 1 Sep 2003 12:48:09 -0000 Delivered-To: choijoshua@example.net Received: (qmail 66796 invoked by uid 500); 1 Sep 2003 12:48:08 -0000 Mailing-List: contact choijoshua@example.net; run by ezmlm Precedence: bulk List-Unsubscribe: <mailto:choijoshua@example.net> List-Subscribe: <mailto:choijoshua@example.net> List-Help: <mailto:choijoshua@example.net> List-Post: <mailto:choijoshua@example.net> List-Id: "Ant Developers List" <dev.ant.apache.org> Reply-To: "Ant Developers List" <choijoshua@example.net> Delivered-To: mailing list choijoshua@example.net Received: (qmail 66769 invoked from network); 1 Sep 2003 12:48:08 -0000 Received: from unknown (HELO exchange.sun.com) (83.161.120.155) by daedalus.apache.org with SMTP; 1 Sep 2003 12:48:08 -0000 Received: (qmail 24850 invoked by uid 50); 1 Sep 2003 09:59:59 -0000 Date: 1 Sep 2003 09:59:59 -0000 Message-ID: <choijoshua@example.net> From: choijoshua@example.net To: choijoshua@example.net Cc: Subject: DO NOT REPLY [Bug 22807] - No copyright in antRun.pl 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 DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22807>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22807 No copyright in antRun.pl choijoshua@example.net changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED Target Milestone|--- |1.6 ------- Additional Comments From choijoshua@example.net 2003-09-01 09:59 ------- mixed up antRun.pl and runant.pl, sorry. I've added the copyright. --------------------------------------------------------------------- To unsubscribe, e-mail: choijoshua@example.net For additional commands, e-mail: choijoshua@example.net From choijoshua@example.net Mon Sep 01 12:52:03 2003 Return-Path: <choijoshua@example.net> Delivered-To: choijoshua@example.net Received: (qmail 23918 invoked from network); 1 Sep 2003 12:52:02 -0000 Received: from daedalus.apache.org (HELO apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 1 Sep 2003 12:52:02 -0000 Received: (qmail 73623 invoked by uid 500); 1 Sep 2003 12:51:54 -0000 Delivered-To: choijoshua@example.net Received: (qmail 73415 invoked by uid 500); 1 Sep 2003 12:51:52 -0000 Mailing-List: contact choijoshua@example.net; run by ezmlm Precedence: bulk List-Unsubscribe: <mailto:choijoshua@example.net> List-Subscribe: <mailto:choijoshua@example.net> List-Help: <mailto:choijoshua@example.net> List-Post: <mailto:choijoshua@example.net> List-Id: "Ant Developers List" <dev.ant.apache.org> Reply-To: "Ant Developers List" <choijoshua@example.net> Delivered-To: mailing list choijoshua@example.net Received: (qmail 73398 invoked by uid 500); 1 Sep 2003 12:51:52 -0000 Received: (qmail 73393 invoked from network); 1 Sep 2003 12:51:51 -0000 Received: from unknown (HELO minotaur.apache.org) (83.161.120.155) by daedalus.apache.org with SMTP; 1 Sep 2003 12:51:51 -0000 Received: (qmail 18947 invoked by uid 1652); 1 Sep 2003 12:45:07 -0000 Date: 1 Sep 2003 12:45:07 -0000 Message-ID: <choijoshua@example.net> From: choijoshua@example.net To: choijoshua@example.net Subject: cvs commit: ant/src/main/org/apache/tools/ant/types Permissions.java 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 antoine 2003/09/01 05:45:07 Modified: docs/manual/CoreTasks java.html src/main/org/apache/tools/ant/taskdefs Java.java src/testcases/org/apache/tools/ant/taskdefs JavaTest.java src/main/org/apache/tools/ant/types Permissions.java Log: Use again Permissions to catch non zero exit statuses when using the Java task with FailOnError = "true" PR: 22533 Revision Changes Path 1.24 +1 -3 ant/docs/manual/CoreTasks/java.html Index: java.html =================================================================== RCS file: /home/cvs/ant/docs/manual/CoreTasks/java.html,v retrieving revision 1.23 retrieving revision 1.24 diff -u -r1.23 -r1.24 --- java.html 29 Aug 2003 13:05:06 -0000 1.23 +++ java.html 1 Sep 2003 12:45:06 -0000 1.24 @@ -88,7 +88,7 @@ <tr> <td valign="top">failonerror</td> <td valign="top">Stop the buildprocess if the command exits with a - returncode other than 0. Default is "false"<!--(see <a href="#failonerror">note)--></a></td> + returncode other than 0. Default is "false" (see <a href="#failonerror">note)</a></td> <td align="center" valign="top">No</td> </tr> <tr> @@ -220,13 +220,11 @@ <p>When the permission RuntimePermission exitVM has not been granted (or has been revoked) the System.exit() call will be intercepted and treated like indicated in <i>failonerror</i>.</p> -<!-- <p><a name="failonerror"/> If you specify <code>failonerror=&quot;true&quot;</code> and you do not specify permissions, a set of default permissions will be added to your java invocation making sure that a non zero return code will lead to a <code>BuildException</code>. </p> ---> <p>Settings will be ignored if fork is enabled.</p> <p><em>since Ant 1.6</em>.</p> 1.73 +1 -3 ant/src/main/org/apache/tools/ant/taskdefs/Java.java Index: Java.java =================================================================== RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/Java.java,v retrieving revision 1.72 retrieving revision 1.73 diff -u -r1.72 -r1.73 --- Java.java 29 Aug 2003 13:05:06 -0000 1.72 +++ Java.java 1 Sep 2003 12:45:07 -0000 1.73 @@ -180,13 +180,11 @@ log("bootclasspath ignored when same JVM is used.", Project.MSG_WARN); } - /* if (perm == null && failOnError == true) { - perm = new Permissions(); + perm = new Permissions(true); log("running " + this.cmdl.getClassname() + " with default permissions (exit forbidden)", Project.MSG_VERBOSE); } - */ log("Running in same VM " + cmdl.describeJavaCommand(), Project.MSG_VERBOSE); } 1.17 +2 -2 ant/src/testcases/org/apache/tools/ant/taskdefs/JavaTest.java Index: JavaTest.java =================================================================== RCS file: /home/cvs/ant/src/testcases/org/apache/tools/ant/taskdefs/JavaTest.java,v retrieving revision 1.16 retrieving revision 1.17 diff -u -r1.16 -r1.17 --- JavaTest.java 29 Aug 2003 13:05:06 -0000 1.16 +++ JavaTest.java 1 Sep 2003 12:45:07 -0000 1.17 @@ -195,7 +195,7 @@ executeTarget("testResultPropertyNonZeroNoFork"); assertEquals("-1",project.getProperty("exitcode")); } - /* + public void testRunFailWithFailOnError() { expectBuildExceptionContaining("testRunFailWithFailOnError", "non zero return code", @@ -205,7 +205,7 @@ public void testRunSuccessWithFailOnError() { executeTarget("testRunSuccessWithFailOnError"); } - */ + public void testSpawn() { FileUtils fileutils = FileUtils.newFileUtils(); File logFile = fileutils.createTempFile("spawn","log", project.getBaseDir()); 1.3 +55 -13 ant/src/main/org/apache/tools/ant/types/Permissions.java Index: Permissions.java =================================================================== RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/types/Permissions.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- Permissions.java 29 Aug 2003 11:10:58 -0000 1.2 +++ Permissions.java 1 Sep 2003 12:45:07 -0000 1.3 @@ -86,8 +86,24 @@ private java.security.Permissions granted = null; private SecurityManager origSm = null; private boolean active = false; - - /** + private boolean delegateToOldSM = false; + + /** + * default constructor + */ + public Permissions() { + } + /** + * create a new set of permissions + * @param delegateToOldSM if <code>true</code> the old security manager + * will be used if the permission has not been explicitly granted or revoked + * in this instance + * if false, it behaves like the default constructor + */ + public Permissions(boolean delegateToOldSM) { + this.delegateToOldSM = delegateToOldSM; + } + /** * Adds a permission to be granted. * @param perm The Permissions.Permission to be granted. */ @@ -194,20 +210,43 @@ * The central point in checking permissions. * Overridden from java.lang.SecurityManager * - * @parem perm The permission requested. + * @param perm The permission requested. */ public void checkPermission(java.security.Permission perm) { if (active) { - if (!granted.implies(perm)) { - throw new SecurityException("Permission " + perm +" was not granted."); - } - for (Iterator i = revokedPermissions.listIterator(); i.hasNext();) { - if (((Permissions.Permission)i.next()).matches(perm)) { - throw new SecurityException("Permission " + perm +" was revoked."); + if (delegateToOldSM && !perm.getName().equals("exitVM")) { + boolean permOK = false; + if (granted.implies(perm)) { + permOK = true; } + checkRevoked(perm); + /* + if the permission was not explicitly granted or revoked + the original security manager will do its work + */ + if (!permOK && origSm != null) { + origSm.checkPermission(perm); + } + } else { + if (!granted.implies(perm)) { + throw new SecurityException("Permission " + perm + " was not granted."); + } + checkRevoked(perm); } } } + /** + * throws an exception if this permission is revoked + * @param perm the permission being checked + */ + private void checkRevoked(java.security.Permission perm) { + for (Iterator i = revokedPermissions.listIterator(); i.hasNext();) { + if (((Permissions.Permission)i.next()).matches(perm)) { + throw new SecurityException("Permission " + perm + " was revoked."); + } + } + + } } /** Represents a permission. */ @@ -279,7 +318,7 @@ if (name != null) { if (name.endsWith("*")) { - if (!perm.getName().startsWith(name.substring(0,name.length()-1))) { + if (!perm.getName().startsWith(name.substring(0, name.length() - 1))) { return false; } } else { @@ -304,7 +343,7 @@ /** * Parses the actions into a set of separate strings. - * @param action The actions to be parsed. + * @param actions The actions to be parsed. */ private Set parseActions(String actions) { Set result = new HashSet(); @@ -317,9 +356,12 @@ } return result; } - + /** + * get a string description of the permissions + * @return string description of the permissions + */ public String toString() { - return ("Permission: " + className + " (\""+name+"\", \""+actions+"\")"); + return ("Permission: " + className + " (\"" + name + "\", \"" + actions + "\")"); } } } --------------------------------------------------------------------- To unsubscribe, e-mail: choijoshua@example.net For additional commands, e-mail: choijoshua@example.net From choijoshua@example.net Mon Sep 01 14:11:01 2003 Return-Path: <choijoshua@example.net> Delivered-To: choijoshua@example.net Received: (qmail 58882 invoked from network); 1 Sep 2003 14:11:00 -0000 Received: from daedalus.apache.org (HELO apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 1 Sep 2003 14:11:00 -0000 Received: (qmail 58427 invoked by uid 500); 1 Sep 2003 14:10:36 -0000 Delivered-To: choijoshua@example.net Received: (qmail 58384 invoked by uid 500); 1 Sep 2003 14:10:36 -0000 Mailing-List: contact choijoshua@example.net; run by ezmlm Precedence: bulk List-Unsubscribe: <mailto:choijoshua@example.net> List-Subscribe: <mailto:choijoshua@example.net> List-Help: <mailto:choijoshua@example.net> List-Post: <mailto:choijoshua@example.net> List-Id: "Ant Developers List" <dev.ant.apache.org> Reply-To: "Ant Developers List" <choijoshua@example.net> Delivered-To: mailing list choijoshua@example.net Received: (qmail 58355 invoked from network); 1 Sep 2003 14:10:36 -0000 Received: from unknown (HELO exchange.sun.com) (83.161.120.155) by daedalus.apache.org with SMTP; 1 Sep 2003 14:10:36 -0000 Received: (qmail 4966 invoked by uid 50); 1 Sep 2003 10:09:16 -0000 Date: 1 Sep 2003 10:09:16 -0000 Message-ID: <choijoshua@example.net> From: choijoshua@example.net To: choijoshua@example.net Cc: Subject: DO NOT REPLY [Bug 22533] - [PATCH] Adding Permissions / Security Manager to Java task and JUnit task 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 DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22533>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=22533 [PATCH] Adding Permissions / Security Manager to Java task and JUnit task ------- Additional Comments From choijoshua@example.net 2003-09-01 10:09 ------- Symptom of the problem : gump build failing in bootstrap-ojb, where there is an invocation of the java task with FailOnError="true" The problem was due to missing permission read for system property file.encoding, then to missing permissions for file system operations. Why do nothing special about permissions in the Java task when failonerror = false ? there is no need to do anything. Why do something special about permissions when failonerror = "true" : so that non zero exit statuses generate an exception which can be caught in the Java task and so that the build can be failed (rather than terminated). --------------------------------------------------------------------- To unsubscribe, e-mail: choijoshua@example.net For additional commands, e-mail: choijoshua@example.net From choijoshua@example.net Mon Sep 01 14:14:16 2003 Return-Path: <choijoshua@example.net> Delivered-To: choijoshua@example.net Received: (qmail 60233 invoked from network); 1 Sep 2003 14:14:16 -0000 Received: from daedalus.apache.org (HELO apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 1 Sep 2003 14:14:16 -0000 Received: (qmail 70510 invoked by uid 500); 1 Sep 2003 14:14:06 -0000 Delivered-To: choijoshua@example.net Received: (qmail 70458 invoked by uid 500); 1 Sep 2003 14:14:05 -0000 Mailing-List: contact choijoshua@example.net; run by ezmlm Precedence: bulk List-Unsubscribe: <mailto:choijoshua@example.net> List-Subscribe: <mailto:choijoshua@example.net> List-Help: <mailto:choijoshua@example.net> List-Post: <mailto:choijoshua@example.net> List-Id: "Ant Developers List" <dev.ant.apache.org> Reply-To: "Ant Developers List" <choijoshua@example.net> Delivered-To: mailing list choijoshua@example.net Received: (qmail 70438 invoked from network); 1 Sep 2003 14:14:04 -0000 Received: from unknown (HELO corvil.com) (83.161.120.155) by daedalus.apache.org with SMTP; 1 Sep 2003 14:14:04 -0000 Received: from preilly.local.corvil.com (preilly.local.corvil.com [83.161.120.155]) by corvil.com (8.12.9/8.12.5) with ESMTP id h81EDtxe044701 for <choijoshua@example.net>; Mon, 1 Sep 2003 15:13:55 +0100 (IST) (envelope-from choijoshua@example.net) From: peter reilly <choijoshua@example.net> Organization: corvil To: Ant Developers List <choijoshua@example.net> Subject: Re: Getting 1.6 out the door Date: Mon, 1 Sep 2003 15:22:19 +0100 User-Agent: KMail/1.5 References: <choijoshua@example.net> In-Reply-To: <choijoshua@example.net> MIME-Version: 1.0 Content-Disposition: inline Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <choijoshua@example.net> 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 Hi, I was on holidays the last two weeks and so will use this reply to some of the issues. On Thursday 28 August 2003 14:07, Conor MacNeill wrote: > My position on these issues is > > 1. <import> > > Go with it as is. I think it is useful and useable without coming up > against some of the cases we have discussed. How we address those issues > can be tackled later, perhaps with a different mechanism. That is bound up > in the whole issue of target visibility and overriding. +1 to use <import> as is. > > I'm not sure whether we should provide a simple <include> as well which > does no renaming (overrides)? > > 2. antlib > > I think this should be in but I am not familiar with its state yet, nor do > I think it has had enough testing - might just be my own need to kick the > tyres. Are we planning to antlib Ant's own optional jars? In 1.7 I think we > need to look at removing antlibs from the root loader when their dependent > jars are not available in ANT_HOME/lib. + 1 for antlib in 1.6 , -1 to use for ant's optional jars in 1.6 +1 (from Dominique) to add antlib.xml to antcontrib I have written a manual page for antlib. There is more work required (for example how to write a task to fit correct into an antlib - uri and classloader handling), it also uses <macrodef> and <presetdef> as examples ;-). > > 3. <macrodef> and <presetdef> > > These seem to have some issues lately and I suggest we pull these into 1.7 I would like them in 1.6 (but I would say that...), in particular I would like <macrodef> to be present. As far as I can see there are two issues with <macrodef>, handling of properties and handling of attributes. a) resolution of properties The issue here is that properties get resolved when the macro is used and not when the macro is defined. I think that it would be difficult to resolve the properties correctly when the macro is defined. For example: <macrodef name="echo.my.property"> <sequential> <echo>${my.property}</echo> </sequential> <macrodef> If the property "my.property" is not defined at the time of definition and is defined when "echo.my.property" is used, the Echo#setText() would be given ${my.property} and would resolve it. Also how does <macrodef> know that ${my.property} should be expanded for <echo> as against for <replace> where is it (incorrectly) not. I think that the current implementation and behaviour is preferable. b) syntax of attributes The issue here is that the syntax for macro attributes is the same as properties (i.e. ${name}), and that people may be confused between them. Some of the proposed syntaxes are: i) $[name] (Conor) ii) (@name) (Dominique) iii) {@param name} (Dominique) iv) ${macroattr:name} (Jose) After using macrodef for a little while (well mostly in writing examples), I think that ${name} feels the best. In future I expect that there will be different scopes for variables/properties (perhaps only for ant-contrib/antelope/other and not in core ant), - task level variables, macro level variables and global variables (properties). It would be strange to have different syntax for each. However this (unlike a) is easy to code for :-), if ${name} syntax is not liked my other preference would be ${macroattr:name}. Other issues for 1.6: * Doc for new introspection methods (add(type)) * polymorphic attribute (ant-type) Doc for this, is it useful? * It would be nice to get the classloader task to work. * overwriting definitions. Currently one can overwrite a definition with only a warning. It may be usefull to make it more difficult to overwrite definitions (Costin) - for example for namespaced definitions. After struggling with make's CCFLAGS, I really like ant's lack of magic varibles, so <javac /> means <javac/> and not <javac x=y.../>. (I realise that I have gave an example of this in a previous e-mail). Peter --------------------------------------------------------------------- To unsubscribe, e-mail: choijoshua@example.net For additional commands, e-mail: choijoshua@example.net From choijoshua@example.net Mon Sep 01 15:22:55 2003 Return-Path: <choijoshua@example.net> Delivered-To: choijoshua@example.net Received: (qmail 91397 invoked from network); 1 Sep 2003 15:22:54 -0000 Received: from daedalus.apache.org (HELO apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 1 Sep 2003 15:22:54 -0000 Received: (qmail 29319 invoked by uid 500); 1 Sep 2003 15:22:38 -0000 Delivered-To: choijoshua@example.net Received: (qmail 29251 invoked by uid 500); 1 Sep 2003 15:22:37 -0000 Mailing-List: contact choijoshua@example.net; run by ezmlm Precedence: bulk List-Unsubscribe: <mailto:choijoshua@example.net> List-Subscribe: <mailto:choijoshua@example.net> List-Help: <mailto:choijoshua@example.net> List-Post: <mailto:choijoshua@example.net> List-Id: "Ant Developers List" <dev.ant.apache.org> Reply-To: "Ant Developers List" <choijoshua@example.net> Delivered-To: mailing list choijoshua@example.net Received: (qmail 29200 invoked by uid 500); 1 Sep 2003 15:22:37 -0000 Received: (qmail 29108 invoked from network); 1 Sep 2003 15:22:36 -0000 Received: from unknown (HELO minotaur.apache.org) (83.161.120.155) by daedalus.apache.org with SMTP; 1 Sep 2003 15:22:36 -0000 Received: (qmail 63242 invoked by uid 1539); 1 Sep 2003 14:22:04 -0000 Date: 1 Sep 2003 14:22:04 -0000 Message-ID: <choijoshua@example.net> From: choijoshua@example.net To: choijoshua@example.net Subject: cvs commit: ant/docs/manual/CoreTypes antlib.html 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 peterreilly 2003/09/01 07:22:04 Modified: docs/manual conceptstypeslist.html docs/manual/CoreTasks typedef.html Added: docs/manual/CoreTypes antlib.html Log: manual page for antlib Revision Changes Path 1.13 +7 -0 ant/docs/manual/conceptstypeslist.html Index: conceptstypeslist.html =================================================================== RCS file: /home/cvs/ant/docs/manual/conceptstypeslist.html,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- conceptstypeslist.html 27 Aug 2003 14:23:16 -0000 1.12 +++ conceptstypeslist.html 1 Sep 2003 14:22:04 -0000 1.13 @@ -36,10 +36,17 @@ <a href="OptionalTypes/extension.html">Extension Package</a><br> <a href="OptionalTypes/extensionset.html">Set of Extension Packages</a><br> +<h3>Antlib</h3> +<a href="CoreTypes/antlib.html">Antlib</a><br> +<a href="CoreTypes/antlib.html#antlibnamespace">Antlib namespace</a><br> +<a href="CoreTypes/antlib.html#currentnamespace">Current namespace</a><br> + + <h3>Custom Components</h3> <a href="CoreTypes/custom-programming.html">Custom Components</a><br> <a href="CoreTypes/custom-programming.html#customconditions">Conditions</a><br> <a href="CoreTypes/custom-programming.html#customselectors">Selectors</a><br> <a href="CoreTypes/custom-programming.html#filterreaders">FilterReaders</a><br> + </body> </html> 1.10 +3 -25 ant/docs/manual/CoreTasks/typedef.html Index: typedef.html =================================================================== RCS file: /home/cvs/ant/docs/manual/CoreTasks/typedef.html,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- typedef.html 13 Aug 2003 13:22:58 -0000 1.9 +++ typedef.html 1 Sep 2003 14:22:04 -0000 1.10 @@ -42,7 +42,8 @@ </pre> <p> - The xml format is described below in the <a href="#antlib">Antlib</a> + The xml format is described in the + <a href="../CoreTypes/antlib.html">Antlib</a> section. </p> @@ -81,7 +82,7 @@ are "properties" or "xml". If the value is "properties" the file/resource is a property file contains name to classname pairs. If the value is "xml", the file/resource is an xml file/resource structured according - to <a href="#antlib">Antlib</a>. + to <a href="../CoreTypes/antlib.html">Antlib</a>. The default is "properties" unless the file/resorce name ends with ".xml", in which case the format attribute will have the value "xml". (introduced in ant1.6) @@ -167,29 +168,6 @@ classname="com.acme.ant.RunClock" adapter="org.acme.ant.RunnableAdapter"/&gt; </pre> - <h3><a name="antlib">Antlib xml format</a></h3> - An antlib file is an xml file with a root element of "antlib". - Antlib is actually a <a href="sequential.html">Sequential</a> task with - special treatment for tasks that are ant definition tasks - like typedef - and <a href="taskdef.html">Taskdef</a>. - - A group of tasks and types may be defined together in an antlib - file. For example the file <i>sample.xml</i> contains the following: - <pre> - &lt;?xml version="1.0"?&gt; - &lt;antlib&gt; - &lt;typedef name="if" classname="org.acme.ant.If"/&gt; - &lt;typedef name="scriptpathmapper" - classname="org.acme.ant.ScriptPathMapper" - onerror="ignore"/&gt; - &lt;/antlib&gt; - </pre> - It defines two types or tasks, <i>if</i> and <i>scriptpathmapper</i>. - This antlib file may be used in a build script as follows: - <pre> - &lt;typedef file="sample.xml"/&gt; - </pre> - <hr> <p align="center">Copyright &copy; 2001-2003 Apache Software Foundation. All rights Reserved.</p> 1.1 ant/docs/manual/CoreTypes/antlib.html Index: antlib.html =================================================================== <html> <head> <meta http-equiv="Content-Language" content="en-us"></meta> <title>AntLib</title> </head> <body> <h2><a name="antlib">Antlib</a></h2> <p> <i>EXPERIMENTAL:</i> The antlib concept and implementation is experimental and may be under continual change until Ant1.6 ships. The contents of this page uses the experimental tasks &lt;macrodef&gt; and &lt;presetdef&gt; which may not be in Ant1.6. </p> <h3>Description</h3> <p> An antlib file is an xml file with a root element of "antlib". Antlib is actually a <a href="sequential.html">Sequential</a> task with special treatment for tasks that are ant definition tasks - like <a href="../CoreTasks/typedef.html">Typedef</a> and <a href="../CoreTasks/taskdef.html">Taskdef</a>. </p> <p> A group of tasks and types may be defined together in an antlib file. For example the file <i>sample.xml</i> contains the following: </p> <blockquote> <pre> &lt;?xml version="1.0"?&gt; &lt;antlib&gt; &lt;typedef name="if" classname="org.acme.ant.If"/&gt; &lt;typedef name="scriptpathmapper" classname="org.acme.ant.ScriptPathMapper" onerror="ignore"/&gt; &lt;/antlib&gt; </pre> </blockquote> <p> It defines two types or tasks, <i>if</i> and <i>scriptpathmapper</i>. This antlib file may be used in a build script as follows: </p> <blockquote> <pre> &lt;typedef file="sample.xml"/&gt; </pre> </blockquote> <p> The other attributes of &lt;typedef&gt; may be used as well. For example, assuming that the <i>sample.xml</i> is in a jar file <i>sample.jar</i> also containing the classes, the following build fragment will define the <i>if</i> and <i>scriptpathmapper</i> tasks/types and place them in the namespace uri <i>samples:/acme.org</i>. </p> <blockquote> <pre> &lt;typedef resource="org/acme/ant/sample.xml" uri="samples:/acme.org"/&gt; </pre> </blockquote> <p> The definitions may then be used as follows: </p> <blockquote> <pre> &lt;sample:if valuetrue="${props}" xmlns:sample="samples:/acme.org"&gt; &lt;sample:scriptpathmapper language="beanshell"&gt; some bean shell &lt;/sample:scriptpathmapper&gt; &lt;/sample:if&gt; </pre> </blockquote> <h3><a name="antlibnamespace">Antlib namespace</a></h3> <p> The name space URIs with the pattern <b>antlib:<i>java package</i></b> are given special treatment. </p> <p> When ant encounters a element with a namespace URI with this pattern, it will check to see if there is a resource of the name <i>antlib.xml</i> in the package directory in the default classpath. </p> <p> For example, assuming that the file <i>antcontrib.jar</i> has been placed in the directory <i>${ant.home}/lib</i> and it contains the resource <i>net/sf/antcontrib/antlib.xml</i> which has all antcontrib's definitions defined, the following build file will automatically load the antcontrib definitions at location <i>HERE</i>: </p> <blockquote> <pre> &lt;project default="deletetest" xmlns:antcontrib="antlib:net.sf.antcontrib"&gt; &lt;macrodef name="showdir"&gt; &lt;attribute name="dir"/&gt; &lt;sequential&gt; &lt;antcontrib:shellscript shell="bash"&gt; &lt;!-- HERE --&gt; ls -Rl ${dir} &lt;/antcontrib:shellscript&gt; &lt;/sequential&gt; &lt;/macrodef&gt; &lt;target name="deletetest"&gt; &lt;delete dir="a" quiet="yes"/&gt; &lt;mkdir dir="a/b"/&gt; &lt;touch file="a/a.txt"/&gt; &lt;touch file="a/b/b.txt"/&gt; &lt;delete&gt; &lt;fileset dir="a"/&gt; &lt;/delete&gt; &lt;showdir dir="a"/&gt; &lt;/target&gt; &lt;/project&gt; </pre> </blockquote> <p> The requirement that the resource is in the default classpath may be removed before Ant 1.6 is released. </p> <h3><a name="currentnamespace">Current namespace</a></h3> <p> Definitions defined in antlibs may be used in antlibs. However the namespace that definitions are placed in are dependent on the &lt;typedef&gt; that uses the antlib. To deal with this problem, the definitions are placed in the namepace URI <i>ant:current</i> for the duration of the antlib execution. For example the following antlib defines the task &lt;if&gt;, the type &lt;isallowed&gt; and a macro &lt;ifallowed&gt; that makes use of the task and type: </p> <blockquote> <pre> &lt;antlib xmlns:current="ant:current"&gt; &lt;taskdef name="if" classname="org.acme.ant.If"/&gt; &lt;typedef name="isallowed" classname="org.acme.ant.Isallowed"/&gt; &lt;macrodef name="ifallowed"&gt; &lt;attribute name="action"/&gt; &lt;element name="do"/&gt; &lt;sequential&gt; &lt;current:if&gt; &lt;current:isallowed test="${action}"/&gt; &lt;then&gt; &lt;do/&gt; &lt;/then&gt; &lt;/current:if&gt; &lt;/sequential&gt; &lt;/macrodef&gt; &lt;/antlib&gt; </pre> </blockquote> <h3>Other examples and comments</h3> <p> Althought the primary use of antlibs are ant definitions, one may use any task or type in an antlib. This should be treated with caution. </p> <p> Antlibs may make use of other antlibs. </p> <p> As the names defined in the antlib are in the namespace uri as specified by the calling &lt;typedef&gt; or by automatic element resolution, one may reuse names from core ant types and tasks, provided the caller uses a namespace uri. For example, the following antlib may be used to define defaults for various tasks: </p> <blockquote> <pre> &lt;antlib xmlns:antcontrib="antlib:net.sf.antcontrib"&gt; &lt;presetdef name="javac"&gt; &lt;javac deprecation="${deprecation}" debug="${debug}"/&gt; &lt;/presetdef&gt; &lt;presetdef name="delete"&gt; &lt;delete quiet="yes"/&gt; &lt;/presetdef&gt; &lt;presetdef name="shellscript"&gt; &lt;antcontrib:shellscript shell="bash"/&gt; &lt;/presetdef&gt; &lt;/antlib&gt; </pre> </blockquote> <p> This may be used as follows: </p> <blockquote> <pre> &lt;project xmlns:local="localpresets"&gt; &lt;typedef file="localpresets.xml" uri="localpresets"/&gt; &lt;local:shellscript&gt; echo "hello world" &lt;/local:shellscript&gt; &lt;/project&gt; </pre> </blockquote> <hr> <p align="center">Copyright &copy; 2003 Apache Software Foundation. All rights Reserved.</p> </body> </html> --------------------------------------------------------------------- To unsubscribe, e-mail: choijoshua@example.net For additional commands, e-mail: choijoshua@example.net From choijoshua@example.net Mon Sep 01 16:49:41 2003 Return-Path: <choijoshua@example.net> Delivered-To: choijoshua@example.net Received: (qmail 21534 invoked from network); 1 Sep 2003 16:49:41 -0000 Received: from daedalus.apache.org (HELO apache.org) (83.161.120.155) by minotaur-2.apache.org with SMTP; 1 Sep 2003 16:49:41 -0000 Received: (qmail 12357 invoked by uid 500); 1 Sep 2003 16:49:30 -0000 Delivered-To: choijoshua@example.net Received: (qmail 12297 invoked by uid 500); 1 Sep 2003 16:49:28 -0000 Mailing-List: contact choijoshua@example.net; run by ezmlm Precedence: bulk List-Unsubscribe: <mailto:choijoshua@example.net> List-Subscribe: <mailto:choijoshua@example.net> List-Help: <mailto:choijoshua@example.net> List-Post: <mailto:choijoshua@example.net> List-Id: "Ant Developers List" <dev.ant.apache.org> Reply-To: "Ant Developers List" <choijoshua@example.net> Delivered-To: mailing list choijoshua@example.net Received: (qmail 12279 invoked from network); 1 Sep 2003 16:49:28 -0000 Received: from unknown (HELO junior.lgc.com) (83.161.120.155) by daedalus.apache.org with SMTP; 1 Sep 2003 16:49:28 -0000 Received: from lgchvw01.lgc.com (lgchvw01.lgc.com [83.161.120.155]) by junior.lgc.com (8.11.7/8.11.3) with SMTP id h81Ffso07361 for <choijoshua@example.net>; Mon, 1 Sep 2003 10:41:54 -0500 (CDT) Received: from 83.161.120.155 by lgchvw01.lgc.com (InterScan E-Mail VirusWall NT); Mon, 01 Sep 2003 10:43:03 -0500 Received: by lgchexchbh.ad.lgc.com with Internet Mail Service (5.5.2653.19) id <RX5FH7LJ>; Mon, 1 Sep 2003 10:43:03 -0500 Message-ID: <choijoshua@example.net> From: Dominique Devienne <choijoshua@example.net> To: "'Ant
{'source': 'Apache Software Foundation Public Mail Archives'}