Return-Path: Delivered-To: apmail-geronimo-scm-archive@www.apache.org Received: (qmail 9444 invoked from network); 30 May 2008 11:55:22 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 30 May 2008 11:55:22 -0000 Received: (qmail 16477 invoked by uid 500); 30 May 2008 11:55:24 -0000 Delivered-To: apmail-geronimo-scm-archive@geronimo.apache.org Received: (qmail 16442 invoked by uid 500); 30 May 2008 11:55:24 -0000 Mailing-List: contact scm-help@geronimo.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: Reply-To: dev@geronimo.apache.org List-Id: Delivered-To: mailing list scm@geronimo.apache.org Received: (qmail 16433 invoked by uid 99); 30 May 2008 11:55:24 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 May 2008 04:55:24 -0700 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.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 30 May 2008 11:54:45 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id A34592388A15; Fri, 30 May 2008 04:55:01 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r661667 - in /geronimo/gshell/trunk: ./ gshell-assembly/ gshell-cli/ gshell-core/ gshell-loader/ gshell-plugin/ gshell-plugin/src/main/java/org/apache/geronimo/gshell/application/ gshell-support/gshell-expr/src/main/java/org/apache/geronimo... Date: Fri, 30 May 2008 11:55:01 -0000 To: scm@geronimo.apache.org From: jdillon@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080530115501.A34592388A15@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: jdillon Date: Fri May 30 04:55:00 2008 New Revision: 661667 URL: http://svn.apache.org/viewvc?rev=661667&view=rev Log: Rename gshell-loader to gshell-plugin Added: geronimo/gshell/trunk/gshell-plugin/ - copied from r661664, geronimo/gshell/trunk/gshell-loader/ Removed: geronimo/gshell/trunk/gshell-loader/ Modified: geronimo/gshell/trunk/gshell-assembly/pom.xml geronimo/gshell/trunk/gshell-cli/pom.xml geronimo/gshell/trunk/gshell-core/pom.xml geronimo/gshell/trunk/gshell-plugin/pom.xml geronimo/gshell/trunk/gshell-plugin/src/main/java/org/apache/geronimo/gshell/application/DefaultApplicationManager.java geronimo/gshell/trunk/gshell-support/gshell-expr/src/main/java/org/apache/geronimo/gshell/expression/JexlExpressionEvaluator.java geronimo/gshell/trunk/gshell-support/gshell-expr/src/test/java/org/apache/geronimo/gshell/expression/JexlExpressionEvaluatorTest.java geronimo/gshell/trunk/pom.xml Modified: geronimo/gshell/trunk/gshell-assembly/pom.xml URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-assembly/pom.xml?rev=661667&r1=661666&r2=661667&view=diff ============================================================================== --- geronimo/gshell/trunk/gshell-assembly/pom.xml (original) +++ geronimo/gshell/trunk/gshell-assembly/pom.xml Fri May 30 04:55:00 2008 @@ -48,12 +48,7 @@ org.apache.geronimo.gshell gshell-cli - - - org.apache.geronimo.gshell - gshell-loader - - + org.slf4j slf4j-log4j12 Modified: geronimo/gshell/trunk/gshell-cli/pom.xml URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-cli/pom.xml?rev=661667&r1=661666&r2=661667&view=diff ============================================================================== --- geronimo/gshell/trunk/gshell-cli/pom.xml (original) +++ geronimo/gshell/trunk/gshell-cli/pom.xml Fri May 30 04:55:00 2008 @@ -50,7 +50,7 @@ org.apache.geronimo.gshell - gshell-loader + gshell-plugin Modified: geronimo/gshell/trunk/gshell-core/pom.xml URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-core/pom.xml?rev=661667&r1=661666&r2=661667&view=diff ============================================================================== --- geronimo/gshell/trunk/gshell-core/pom.xml (original) +++ geronimo/gshell/trunk/gshell-core/pom.xml Fri May 30 04:55:00 2008 @@ -42,12 +42,7 @@ org.apache.geronimo.gshell.support gshell-plexus - - - org.apache.geronimo.gshell.support - gshell-artifact - - + org.apache.geronimo.gshell.support gshell-expr @@ -60,29 +55,12 @@ org.apache.geronimo.gshell - gshell-loader - - - - org.apache.geronimo.gshell gshell-parser - + org.apache.geronimo.gshell - gshell-model - - - - commons-jexl - commons-jexl - - - - - org.slf4j - jcl104-over-slf4j - test + gshell-plugin Modified: geronimo/gshell/trunk/gshell-plugin/pom.xml URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-plugin/pom.xml?rev=661667&r1=661664&r2=661667&view=diff ============================================================================== --- geronimo/gshell/trunk/gshell-plugin/pom.xml (original) +++ geronimo/gshell/trunk/gshell-plugin/pom.xml Fri May 30 04:55:00 2008 @@ -30,11 +30,11 @@ 1.0-alpha-2-SNAPSHOT - gshell-loader - GShell Loader + gshell-plugin + GShell Plugin - Provides loading infrastructure for GShell. + Provides the GShell plugin mechanism. Modified: geronimo/gshell/trunk/gshell-plugin/src/main/java/org/apache/geronimo/gshell/application/DefaultApplicationManager.java URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-plugin/src/main/java/org/apache/geronimo/gshell/application/DefaultApplicationManager.java?rev=661667&r1=661664&r2=661667&view=diff ============================================================================== --- geronimo/gshell/trunk/gshell-plugin/src/main/java/org/apache/geronimo/gshell/application/DefaultApplicationManager.java (original) +++ geronimo/gshell/trunk/gshell-plugin/src/main/java/org/apache/geronimo/gshell/application/DefaultApplicationManager.java Fri May 30 04:55:00 2008 @@ -218,6 +218,10 @@ List classPath = new LinkedList(); Set resolvedArtifacts = result.getArtifacts(); + // + // FIXME: Load this list from build-generated properties or something like that + // + Set excludes = new HashSet(); excludes.add("aspectjrt"); excludes.add("plexus-classworlds"); @@ -230,7 +234,7 @@ excludes.add("gshell-diet-log4j"); excludes.add("gshell-i18n"); excludes.add("gshell-io"); - excludes.add("gshell-loader"); + excludes.add("gshell-plugin"); excludes.add("gshell-model"); excludes.add("gshell-plexus"); excludes.add("jcl104-over-slf4j"); Modified: geronimo/gshell/trunk/gshell-support/gshell-expr/src/main/java/org/apache/geronimo/gshell/expression/JexlExpressionEvaluator.java URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-support/gshell-expr/src/main/java/org/apache/geronimo/gshell/expression/JexlExpressionEvaluator.java?rev=661667&r1=661666&r2=661667&view=diff ============================================================================== --- geronimo/gshell/trunk/gshell-support/gshell-expr/src/main/java/org/apache/geronimo/gshell/expression/JexlExpressionEvaluator.java (original) +++ geronimo/gshell/trunk/gshell-support/gshell-expr/src/main/java/org/apache/geronimo/gshell/expression/JexlExpressionEvaluator.java Fri May 30 04:55:00 2008 @@ -43,7 +43,7 @@ public class JexlExpressionEvaluator implements ExpressionEvaluator { - private Logger log = LoggerFactory.getLogger(getClass()); + private final Logger log = LoggerFactory.getLogger(getClass()); // // NOTE: May want to add the ${...} bits the the CommandLineParser directly. @@ -80,13 +80,13 @@ public Object evaluate(final String expression) throws Exception { assert expression != null; - log.debug("Evaluating expression: {}", expression); + log.trace("Evaluating expression: {}", expression); Expression expr = createExpression(expression); Object result = expr.evaluate(context); - log.debug("Result: {}", result); + log.trace("Result: {}", result); return result; } @@ -134,9 +134,7 @@ String expr = input.substring(start + (complex ? 2 : 1), end); - // System.err.println("b: " + buff); String tmp = input.substring(current, start); - // System.err.println("t: " + tmp + "<"); buff.append(tmp); try { @@ -146,19 +144,11 @@ throw new SyntaxException("Failed to evaluate: " + expr, e); } - // System.err.println("s:" + start); - // System.err.println("e:" + end); - // System.err.println("c:" + current); - current = end + (complex ? 1 : 0); } - // System.err.println("c:" + current); - if (current < input.length()) { - // System.err.println("b: " + buff); String tmp = input.substring(current); - // System.err.println("t: " + tmp); buff.append(tmp); } @@ -166,13 +156,4 @@ return buff.toString(); } - - public String parse(final String input, final boolean trim) throws SyntaxException { - String output = parse(input); - if (trim && output != null) { - output = output.trim(); - } - - return output; - } } \ No newline at end of file Modified: geronimo/gshell/trunk/gshell-support/gshell-expr/src/test/java/org/apache/geronimo/gshell/expression/JexlExpressionEvaluatorTest.java URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/gshell-support/gshell-expr/src/test/java/org/apache/geronimo/gshell/expression/JexlExpressionEvaluatorTest.java?rev=661667&r1=661666&r2=661667&view=diff ============================================================================== --- geronimo/gshell/trunk/gshell-support/gshell-expr/src/test/java/org/apache/geronimo/gshell/expression/JexlExpressionEvaluatorTest.java (original) +++ geronimo/gshell/trunk/gshell-support/gshell-expr/src/test/java/org/apache/geronimo/gshell/expression/JexlExpressionEvaluatorTest.java Fri May 30 04:55:00 2008 @@ -21,6 +21,8 @@ import junit.framework.TestCase; +import java.util.Map; + /** * Tests for the {@link JexlExpressionEvaluator} class. * @@ -101,4 +103,18 @@ String result = evaluator.parse(value); assertEquals("BEFORE" + System.getProperty("java.home") + "\tAFTER", result); } + + /* + FIXME: gshell-expr can't currently handle dereferencing, need to fix. + + public void testDeref1() throws Exception { + Map vars = evaluator.getVariables(); + vars.put("foo", "${bar}"); + vars.put("bar", System.getProperty("java.home")); + + String value = "${foo}"; + String result = evaluator.parse(value); + assertEquals(System.getProperty("java.home"), result); + } + */ } \ No newline at end of file Modified: geronimo/gshell/trunk/pom.xml URL: http://svn.apache.org/viewvc/geronimo/gshell/trunk/pom.xml?rev=661667&r1=661666&r2=661667&view=diff ============================================================================== --- geronimo/gshell/trunk/pom.xml (original) +++ geronimo/gshell/trunk/pom.xml Fri May 30 04:55:00 2008 @@ -351,7 +351,7 @@ org.apache.geronimo.gshell - gshell-loader + gshell-plugin 1.0-alpha-2-SNAPSHOT @@ -462,7 +462,7 @@ gshell-bootstrap gshell-model gshell-command-api - gshell-loader + gshell-plugin gshell-parser gshell-core gshell-cli