Return-Path: Delivered-To: apmail-commons-commits-archive@minotaur.apache.org Received: (qmail 21743 invoked from network); 26 Oct 2009 16:41:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 26 Oct 2009 16:41:05 -0000 Received: (qmail 80047 invoked by uid 500); 26 Oct 2009 16:41:05 -0000 Delivered-To: apmail-commons-commits-archive@commons.apache.org Received: (qmail 79965 invoked by uid 500); 26 Oct 2009 16:41:04 -0000 Mailing-List: contact commits-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@commons.apache.org Delivered-To: mailing list commits@commons.apache.org Received: (qmail 79956 invoked by uid 99); 26 Oct 2009 16:41:04 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Oct 2009 16:41:04 +0000 X-ASF-Spam-Status: No, hits=-2.5 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 26 Oct 2009 16:41:01 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 9CCE72388901; Mon, 26 Oct 2009 16:40:41 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r829856 - in /commons/sandbox/runtime/trunk/src/main/native: build/org/apache/commons/runtime/ConditionalSequence.java configure.xml Date: Mon, 26 Oct 2009 16:40:41 -0000 To: commits@commons.apache.org From: mturk@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20091026164041.9CCE72388901@eris.apache.org> Author: mturk Date: Mon Oct 26 16:40:41 2009 New Revision: 829856 URL: http://svn.apache.org/viewvc?rev=829856&view=rev Log: Fix sequence task Modified: commons/sandbox/runtime/trunk/src/main/native/build/org/apache/commons/runtime/ConditionalSequence.java commons/sandbox/runtime/trunk/src/main/native/configure.xml Modified: commons/sandbox/runtime/trunk/src/main/native/build/org/apache/commons/runtime/ConditionalSequence.java URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/build/org/apache/commons/runtime/ConditionalSequence.java?rev=829856&r1=829855&r2=829856&view=diff ============================================================================== --- commons/sandbox/runtime/trunk/src/main/native/build/org/apache/commons/runtime/ConditionalSequence.java (original) +++ commons/sandbox/runtime/trunk/src/main/native/build/org/apache/commons/runtime/ConditionalSequence.java Mon Oct 26 16:40:41 2009 @@ -31,14 +31,16 @@ private String property; private String equals; - private String not; + private boolean ifcheck; + private String or; public ConditionalSequence() { super(); property = null; equals = null; - not = null; + or = null; + ifcheck = true; } public void setIf(String property) @@ -46,14 +48,20 @@ this.property = property; } + public void setIfnot(String property) + { + this.property = property; + ifcheck = false; + } + public void setEquals(String value) { equals = value; } - public void setNot(String value) + public void setOr(String value) { - not = value; + or = value; } public void execute() @@ -64,8 +72,6 @@ cnt++; if (equals != null) cnt++; - if (not != null) - cnt++; if (cnt == 0) { super.execute(); return; @@ -73,18 +79,13 @@ if (cnt == 1) { throw new BuildException("Required attribute is missing"); } - if (cnt == 3) { - throw new BuildException("Too many attributes declared"); - } String val = getProject().getProperty(property); if (val != null) { - if (equals != null) { - if (val.equals(equals)) - super.execute(); - } - else if (not != null) { - if (!val.equals(not)) - super.execute(); + if (val.equals(equals) == ifcheck) + super.execute(); + else if (or != null) { + if (val.equals(or) == ifcheck) + super.execute(); } } } Modified: commons/sandbox/runtime/trunk/src/main/native/configure.xml URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/configure.xml?rev=829856&r1=829855&r2=829856&view=diff ============================================================================== --- commons/sandbox/runtime/trunk/src/main/native/configure.xml (original) +++ commons/sandbox/runtime/trunk/src/main/native/configure.xml Mon Oct 26 16:40:41 2009 @@ -162,7 +162,10 @@ - + + + + @@ -171,7 +174,7 @@ - + @@ -193,7 +196,10 @@ - + + + + @@ -202,7 +208,7 @@ - + @@ -258,7 +264,7 @@ - + @@ -266,6 +272,7 @@ - + +