geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jdil...@apache.org
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 GMT
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 @@
             <groupId>org.apache.geronimo.gshell</groupId>
             <artifactId>gshell-cli</artifactId>
         </dependency>
-
-        <dependency>
-            <groupId>org.apache.geronimo.gshell</groupId>
-            <artifactId>gshell-loader</artifactId>
-        </dependency>
-
+        
         <dependency>
             <groupId>org.slf4j</groupId>
             <artifactId>slf4j-log4j12</artifactId>

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 @@
 
         <dependency>
             <groupId>org.apache.geronimo.gshell</groupId>
-            <artifactId>gshell-loader</artifactId>
+            <artifactId>gshell-plugin</artifactId>
         </dependency>
 
         <dependency>

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 @@
             <groupId>org.apache.geronimo.gshell.support</groupId>
             <artifactId>gshell-plexus</artifactId>
         </dependency>
-
-        <dependency>
-            <groupId>org.apache.geronimo.gshell.support</groupId>
-            <artifactId>gshell-artifact</artifactId>
-        </dependency>
-
+        
         <dependency>
             <groupId>org.apache.geronimo.gshell.support</groupId>
             <artifactId>gshell-expr</artifactId>
@@ -60,29 +55,12 @@
 
         <dependency>
             <groupId>org.apache.geronimo.gshell</groupId>
-            <artifactId>gshell-loader</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>org.apache.geronimo.gshell</groupId>
             <artifactId>gshell-parser</artifactId>
         </dependency>
-		
+        
         <dependency>
             <groupId>org.apache.geronimo.gshell</groupId>
-            <artifactId>gshell-model</artifactId>
-        </dependency>
-
-        <dependency>
-            <groupId>commons-jexl</groupId>
-            <artifactId>commons-jexl</artifactId>
-        </dependency>
-
-        <!-- Required for commons-jexl usage -->
-        <dependency>
-            <groupId>org.slf4j</groupId>
-            <artifactId>jcl104-over-slf4j</artifactId>
-            <scope>test</scope>
+            <artifactId>gshell-plugin</artifactId>
         </dependency>
     </dependencies>
 

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 @@
         <version>1.0-alpha-2-SNAPSHOT</version>
     </parent>
 
-    <artifactId>gshell-loader</artifactId>
-    <name>GShell Loader</name>
+    <artifactId>gshell-plugin</artifactId>
+    <name>GShell Plugin</name>
 
     <description>
-        Provides loading infrastructure for GShell.
+        Provides the GShell plugin mechanism.
     </description>
 
     <dependencies>

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<URL> classPath = new LinkedList<URL>();
         Set<Artifact> resolvedArtifacts = result.getArtifacts();
 
+        //
+        // FIXME: Load this list from build-generated properties or something like that
+        //
+        
         Set<String> excludes = new HashSet<String>();
         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 @@
 
             <dependency>
                 <groupId>org.apache.geronimo.gshell</groupId>
-                <artifactId>gshell-loader</artifactId>
+                <artifactId>gshell-plugin</artifactId>
                 <version>1.0-alpha-2-SNAPSHOT</version>
             </dependency>
 
@@ -462,7 +462,7 @@
         <module>gshell-bootstrap</module>
         <module>gshell-model</module>
         <module>gshell-command-api</module>
-        <module>gshell-loader</module>
+        <module>gshell-plugin</module>
         <module>gshell-parser</module>
         <module>gshell-core</module>
         <module>gshell-cli</module>



Mime
View raw message