activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r521692 - in /activemq/camel/trunk: camel-core/src/main/java/org/apache/camel/builder/xpath/ camel-core/src/main/java/org/apache/camel/impl/ camel-core/src/test/java/org/apache/camel/ camel-core/src/test/java/org/apache/camel/builder/xpath/...
Date Fri, 23 Mar 2007 12:15:41 GMT
Author: jstrachan
Date: Fri Mar 23 05:15:40 2007
New Revision: 521692

URL: http://svn.apache.org/viewvc?view=rev&rev=521692
Log:
simplified the XPath support so that XPathBuilder is-a Expression and Predicate, then tidied
up some toString() implementations

Removed:
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/xpath/ExchangeXPathExpression.java
Modified:
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/xpath/MessageVariableResolver.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/xpath/XPathBuilder.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultExchange.java
    activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultMessage.java
    activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/TestSupport.java
    activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/xpath/XPathTest.java
    activemq/camel/trunk/camel-jbi/src/main/java/org/apache/camel/component/jbi/JbiMessage.java
    activemq/camel/trunk/camel-jms/src/main/java/org/apache/camel/component/jms/JmsMessage.java
    activemq/camel/trunk/camel-script/pom.xml

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/xpath/MessageVariableResolver.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/xpath/MessageVariableResolver.java?view=diff&rev=521692&r1=521691&r2=521692
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/xpath/MessageVariableResolver.java
(original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/xpath/MessageVariableResolver.java
Fri Mar 23 05:15:40 2007
@@ -19,9 +19,13 @@
 
 import org.apache.camel.Exchange;
 import org.apache.camel.Message;
+import org.apache.commons.logging.Log;
+import org.apache.commons.logging.LogFactory;
 
 import javax.xml.namespace.QName;
 import javax.xml.xpath.XPathVariableResolver;
+import java.util.HashMap;
+import java.util.Map;
 
 /**
  * A variable resolver for XPath expressions which support properties on the messge, exchange
as well
@@ -32,8 +36,14 @@
 public class MessageVariableResolver implements XPathVariableResolver {
     public static final String SYSTEM_PROPERTIES_NAMESPACE = "http://camel.apache.org/xml/variables/system-properties";
     public static final String ENVIRONMENT_VARIABLES = "http://camel.apache.org/xml/variables/environment-variables";
+    public static final String EXCHANGE_PROPERTY = "http://camel.apache.org/xml/variables/exchange-property";
+    public static final String IN_HEADER = "http://camel.apache.org/xml/variables/in-header";
+    public static final String OUT_HEADER = "http://camel.apache.org/xml/variables/out-header";
+
+    private static final transient Log log = LogFactory.getLog(MessageVariableResolver.class);
 
     private Exchange exchange;
+    private Map<String, Object> variables = new HashMap<String, Object>();
 
     public Exchange getExchange() {
         return exchange;
@@ -44,27 +54,48 @@
     }
 
     public Object resolveVariable(QName name) {
-        // should we use other namespaces maybe?
         String uri = name.getNamespaceURI();
         String localPart = name.getLocalPart();
-
         Object answer = null;
 
         if (uri == null || uri.length() == 0) {
-            Message message = exchange.getIn();
-            if (message != null) {
-                answer = message.getHeader(localPart);
-            }
+            answer = variables.get(localPart);
             if (answer == null) {
-                answer = exchange.getProperty(localPart);
+                Message message = exchange.getIn();
+                if (message != null) {
+                    answer = message.getHeader(localPart);
+                }
+                if (answer == null) {
+                    answer = exchange.getProperty(localPart);
+                }
             }
         }
         else if (uri.equals(SYSTEM_PROPERTIES_NAMESPACE)) {
-            answer = System.getProperty(localPart);
+            try {
+                answer = System.getProperty(localPart);
+            }
+            catch (Exception e) {
+                log.debug("Security exception evaluating system property: " + localPart +
". Reason: " + e, e);
+            }
         }
         else if (uri.equals(ENVIRONMENT_VARIABLES)) {
             answer = System.getenv().get(localPart);
         }
+        else if (uri.equals(EXCHANGE_PROPERTY)) {
+            answer = exchange.getProperty(localPart);
+        }
+        else if (uri.equals(IN_HEADER)) {
+            answer = exchange.getIn().getHeader(localPart);
+        }
+        else if (uri.equals(OUT_HEADER)) {
+            answer = exchange.getOut().getHeader(localPart);
+        }
+
+        // TODO support exposing CamelContext properties/resources via XPath?
         return answer;
+    }
+
+    public void addVariable(String localPart, Object value) {
+        variables.put(localPart, value);
     }
 }

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/xpath/XPathBuilder.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/xpath/XPathBuilder.java?view=diff&rev=521692&r1=521691&r2=521692
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/xpath/XPathBuilder.java
(original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/builder/xpath/XPathBuilder.java
Fri Mar 23 05:15:40 2007
@@ -21,26 +21,27 @@
 import org.apache.camel.Expression;
 import org.apache.camel.Predicate;
 import org.apache.camel.RuntimeExpressionException;
-import org.apache.camel.builder.ExpressionFactory;
-import org.apache.camel.builder.PredicateFactory;
+import org.apache.camel.Message;
+import org.apache.camel.util.ObjectHelper;
 import org.w3c.dom.Document;
+import org.xml.sax.InputSource;
 
 import javax.xml.namespace.QName;
 import javax.xml.xpath.XPath;
 import javax.xml.xpath.XPathConstants;
-import javax.xml.xpath.XPathException;
 import javax.xml.xpath.XPathExpression;
 import javax.xml.xpath.XPathExpressionException;
 import javax.xml.xpath.XPathFactory;
 import javax.xml.xpath.XPathFactoryConfigurationException;
 import javax.xml.xpath.XPathFunctionResolver;
+import java.io.StringReader;
 
 /**
  * Creates an XPath expression builder
  *
  * @version $Revision$
  */
-public class XPathBuilder<E extends Exchange> implements ExpressionFactory<E>,
PredicateFactory<E> {
+public class XPathBuilder<E extends Exchange> implements Expression<E>, Predicate<E>
{
     private final String text;
     private XPathFactory xpathFactory;
     private Class documentType = Document.class;
@@ -48,6 +49,8 @@
     private String objectModelUri = null;
     private DefaultNamespaceContext namespaceContext;
     private XPathFunctionResolver functionResolver;
+    private XPathExpression expression;
+    private MessageVariableResolver variableResolver = new MessageVariableResolver();
 
     public static XPathBuilder xpath(String text) {
         return new XPathBuilder(text);
@@ -57,14 +60,19 @@
         this.text = text;
     }
 
-    public Expression<E> createExpression() {
-        return createExchangeXPathExpression();
+    @Override
+    public String toString() {
+        return "XPath: " + text;
     }
 
-    public Predicate<E> createPredicate() {
-        return createExchangeXPathExpression();
+    public boolean matches(E exchange) {
+        return ObjectHelper.toBoolean(evaluateAs(exchange, XPathConstants.BOOLEAN));
     }
-    
+
+    public Object evaluate(E exchange) {
+        return evaluateAs(exchange, resultType);
+    }
+
 
     // Builder methods
     //-------------------------------------------------------------------------
@@ -151,6 +159,15 @@
         return this;
     }
 
+    /**
+     * Registers a variable (in the global namespace) which can be referred to from XPath
expressions
+     */
+    public XPathBuilder<E> variable(String name, Object value) {
+        variableResolver.addVariable(name, value);
+        return this;
+    }
+
+
     // Properties
     //-------------------------------------------------------------------------
     public XPathFactory getXPathFactory() throws XPathFactoryConfigurationException {
@@ -207,21 +224,57 @@
         this.functionResolver = functionResolver;
     }
 
+    public XPathExpression getExpression() throws XPathFactoryConfigurationException, XPathExpressionException
{
+        if (expression == null) {
+            expression = createXPathExpression();
+        }
+        return expression;
+    }
+
     // Implementation methods
     //-------------------------------------------------------------------------
-    protected ExchangeXPathExpression<E> createExchangeXPathExpression() {
+
+
+    /**
+     * Evaluates the expression as the given result type
+     */
+    protected synchronized Object evaluateAs(E exchange, QName resultType) {
+        variableResolver.setExchange(exchange);
         try {
-            MessageVariableResolver variableResolver = new MessageVariableResolver();
-            XPathExpression expression = createXPathExpression(variableResolver);
-            return new ExchangeXPathExpression<E>(this, expression, variableResolver);
+            Object document = getDocument(exchange);
+            if (resultType != null) {
+                if (document instanceof InputSource) {
+                    InputSource inputSource = (InputSource) document;
+                    return getExpression().evaluate(inputSource, resultType);
+                }
+                else {
+                    return getExpression().evaluate(document, resultType);
+                }
+            }
+            else {
+                if (document instanceof InputSource) {
+                    InputSource inputSource = (InputSource) document;
+                    return getExpression().evaluate(inputSource);
+                }
+                else {
+                    return getExpression().evaluate(document);
+                }
+            }
+        }
+        catch (XPathExpressionException e) {
+            throw new InvalidXPathExpression(getText(), e);
         }
-        catch (XPathException e) {
-            throw new InvalidXPathExpression(text, e);
+        catch (XPathFactoryConfigurationException e) {
+            throw new InvalidXPathExpression(getText(), e);
         }
     }
 
-    protected XPathExpression createXPathExpression(MessageVariableResolver variableResolver)
throws XPathExpressionException, XPathFactoryConfigurationException {
+    protected XPathExpression createXPathExpression() throws XPathExpressionException, XPathFactoryConfigurationException
{
         XPath xPath = getXPathFactory().newXPath();
+
+        // lets now clear any factory references to avoid keeping them around
+        xpathFactory = null;
+
         xPath.setNamespaceContext(getNamespaceContext());
         xPath.setXPathVariableResolver(variableResolver);
         if (functionResolver != null) {
@@ -229,5 +282,27 @@
         }
         return xPath.compile(text);
     }
+
+    /**
+     * Strategy method to extract the document from the exchange
+     */
+    protected Object getDocument(E exchange) {
+        Message in = exchange.getIn();
+        Class type = getDocumentType();
+        Object answer = null;
+        if (type != null) {
+            answer = in.getBody(type);
+        }
+        if (answer == null) {
+            answer = in.getBody();
+        }
+
+        // lets try coerce some common types into something JAXP can deal with
+        if (answer instanceof String) {
+            answer = new InputSource(new StringReader(answer.toString()));
+        }
+        return answer;
+    }
+
 
 }

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultExchange.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultExchange.java?view=diff&rev=521692&r1=521691&r2=521692
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultExchange.java
(original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultExchange.java
Fri Mar 23 05:15:40 2007
@@ -41,6 +41,11 @@
         this.context = context;
     }
 
+    @Override
+    public String toString() {
+        return "Exchange[" + in + "]";
+    }
+
     public Exchange copy() {
         Exchange exchange = newInstance();
         exchange.copyFrom(this);

Modified: activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultMessage.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultMessage.java?view=diff&rev=521692&r1=521691&r2=521692
==============================================================================
--- activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultMessage.java
(original)
+++ activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/DefaultMessage.java
Fri Mar 23 05:15:40 2007
@@ -37,6 +37,11 @@
         return null;
     }
 
+    @Override
+    public String toString() {
+        return "Message: " + getBody();
+    }
+
     public void setHeader(String name, Object value) {
         if (headers == null) {
             headers = createHeaders();

Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/TestSupport.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/TestSupport.java?view=diff&rev=521692&r1=521691&r2=521692
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/TestSupport.java (original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/TestSupport.java Fri Mar
23 05:15:40 2007
@@ -44,41 +44,44 @@
     /**
      * Asserts the In message on the exchange contains the expected value
      */
-    protected void assertInMessageHeader(Exchange exchange, String name, Object expected)
{
-        assertMessageHeader(exchange.getIn(), name, expected);
+    protected Object assertInMessageHeader(Exchange exchange, String name, Object expected)
{
+        return assertMessageHeader(exchange.getIn(), name, expected);
     }
 
     /**
      * Asserts the Out message on the exchange contains the expected value
      */
-    protected void assertOutMessageHeader(Exchange exchange, String name, Object expected)
{
-        assertMessageHeader(exchange.getOut(), name, expected);
+    protected Object assertOutMessageHeader(Exchange exchange, String name, Object expected)
{
+        return assertMessageHeader(exchange.getOut(), name, expected);
     }
 
-    protected void assertMessageHeader(Message message, String name, Object expected) {
+    protected Object assertMessageHeader(Message message, String name, Object expected) {
         Object value = message.getHeader(name);
         assertEquals("Header: " + name + " on Message: " + message, expected, value);
+        return value;
     }
 
     /**
      * Asserts that the given expression when evaluated returns the given answer
      */
-    protected void assertExpression(Expression expression, Exchange exchange, Object expected)
{
+    protected Object assertExpression(Expression expression, Exchange exchange, Object expected)
{
         Object value = expression.evaluate(exchange);
 
         log.debug("Evaluated expression: " + expression + " on exchange: " + exchange + "
result: " + value);
 
         assertEquals("Expression: " + expression + " on Exchange: " + exchange, expected,
value);
+        return value;
     }
 
     /**
      * Asserts that the predicate returns the expected value on the exchange
      */
-    protected void assertPredicate(Predicate expression, Exchange exchange, boolean expected)
{
+    protected boolean assertPredicate(Predicate expression, Exchange exchange, boolean expected)
{
         boolean value = expression.matches(exchange);
 
         log.debug("Evaluated predicate: " + expression + " on exchange: " + exchange + "
result: " + value);
 
         assertEquals("Predicate: " + expression + " on Exchange: " + exchange, expected,
value);
+        return value;
     }
 }

Modified: activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/xpath/XPathTest.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/xpath/XPathTest.java?view=diff&rev=521692&r1=521691&r2=521692
==============================================================================
--- activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/xpath/XPathTest.java
(original)
+++ activemq/camel/trunk/camel-core/src/test/java/org/apache/camel/builder/xpath/XPathTest.java
Fri Mar 23 05:15:40 2007
@@ -17,37 +17,39 @@
  */
 package org.apache.camel.builder.xpath;
 
-import junit.framework.TestCase;
 import org.apache.camel.CamelContext;
 import org.apache.camel.Exchange;
 import org.apache.camel.Expression;
 import org.apache.camel.Message;
 import org.apache.camel.Predicate;
+import org.apache.camel.TestSupport;
+import static org.apache.camel.builder.xpath.XPathBuilder.*;
 import org.apache.camel.impl.DefaultCamelContext;
 import org.apache.camel.impl.DefaultExchange;
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
 
 import javax.xml.xpath.XPathFunctionResolver;
 
 /**
  * @version $Revision$
  */
-public class XPathTest extends TestCase {
-    private static final transient Log log = LogFactory.getLog(XPathTest.class);
+public class XPathTest extends TestSupport {
 
     public void testXPathExpressions() throws Exception {
-        assertExpression("/foo/bar/@xyz", "cheese", "<foo><bar xyz='cheese'/></foo>");
-        assertExpression("$name", "James", "<foo><bar xyz='cheese'/></foo>");
-        assertExpression("foo/bar", "cheese", "<foo><bar>cheese</bar></foo>");
-        assertExpression("foo/bar/text()", "cheese", "<foo><bar>cheese</bar></foo>");
+        assertExpression("/foo/bar/@xyz", "<foo><bar xyz='cheese'/></foo>",
"cheese");
+        assertExpression("$name", "<foo><bar xyz='cheese'/></foo>", "James");
+        assertExpression("foo/bar", "<foo><bar>cheese</bar></foo>",
"cheese");
+        assertExpression("foo/bar/text()", "<foo><bar>cheese</bar></foo>",
"cheese");
     }
 
     public void testXPathPredicates() throws Exception {
-        assertPredicate("/foo/bar/@xyz", true, "<foo><bar xyz='cheese'/></foo>");
-        assertPredicate("$name = 'James'", true, "<foo><bar xyz='cheese'/></foo>");
-        assertPredicate("$name = 'Hiram'", false, "<foo><bar xyz='cheese'/></foo>");
-        assertPredicate("/foo/notExist", false, "<foo><bar xyz='cheese'/></foo>");
+        assertPredicate("/foo/bar/@xyz", "<foo><bar xyz='cheese'/></foo>",
true);
+        assertPredicate("$name = 'James'", "<foo><bar xyz='cheese'/></foo>",
true);
+        assertPredicate("$name = 'Hiram'", "<foo><bar xyz='cheese'/></foo>",
false);
+        assertPredicate("/foo/notExist", "<foo><bar xyz='cheese'/></foo>",
false);
+    }
+
+    public void testXPathWithCustomVariable() throws Exception {
+        assertExpression(xpath("$name").variable("name", "Hiram"), "<foo/>", "Hiram");
     }
 
     public void testUsingJavaExtensions() throws Exception {
@@ -64,13 +66,13 @@
         if (instance instanceof XPathFunctionResolver) {
             XPathFunctionResolver functionResolver = (XPathFunctionResolver) instance;
 
-            XPathBuilder builder = XPathBuilder.xpath("java:"
+            XPathBuilder builder = xpath("java:"
                     + getClass().getName() + ".func(string(/header/value))")
                     .namespace("java", "http://xml.apache.org/xalan/java")
                     .functionResolver(functionResolver);
 
             String xml = "<header><value>12</value></header>";
-            Object value = assertExpression(builder.createExpression(), "modified12", xml);
+            Object value = assertExpression(builder, xml, "modified12");
             log.debug("Evaluated xpath: " + builder.getText() + " on XML: " + xml + " result:
" + value);
         }
     }
@@ -79,34 +81,46 @@
         return "modified" + s;
     }
 
-    protected void assertExpression(String xpath, String expected, String xml) {
-        Expression expression = XPathBuilder.xpath(xpath).createExpression();
+    protected Object assertExpression(String xpath, String xml, String expected) {
+        Expression expression = XPathBuilder.xpath(xpath);
+        return assertExpression(expression, xml, expected);
+    }
+
+    protected Object assertExpression(Expression expression, String xml, String expected)
{
+        return assertExpression(expression, createExchange(xml), expected);
+    }
+
+    /*
         Object value = assertExpression(expression, expected, xml);
 
         log.debug("Evaluated xpath: " + xpath + " on XML: " + xml + " result: " + value);
     }
 
+
     protected Object assertExpression(Expression expression, String expected, String xml)
{
         Exchange exchange = createExchange(xml);
         Object value = expression.evaluate(exchange);
         assertEquals("Expression: " + expression, expected, value);
         return value;
     }
+    */
 
-    protected void assertPredicate(String xpath, boolean expected, String xml) {
-        Predicate predicate = XPathBuilder.xpath(xpath).createPredicate();
-        boolean value = assertPredicate(predicate, expected, xml);
+    protected void assertPredicate(String xpath, String xml, boolean expected) {
+        Predicate predicate = XPathBuilder.xpath(xpath);
+        assertPredicate(predicate, createExchange(xml), expected);
+        //boolean value = assertPredicate(predicate, expected, xml);
 
-        log.debug("Evaluated xpath: " + xpath + " on XML: " + xml + " result: " + value);
+        //log.debug("Evaluated xpath: " + xpath + " on XML: " + xml + " result: " + value);
 
     }
-
+    /*
     protected boolean assertPredicate(Predicate predicate, boolean expected, String xml)
{
         Exchange exchange = createExchange(xml);
         boolean value = predicate.matches(exchange);
         assertEquals("Predicate: " + predicate, expected, value);
         return value;
     }
+    */
 
     protected Exchange createExchange(String xml) {
         CamelContext context = new DefaultCamelContext();

Modified: activemq/camel/trunk/camel-jbi/src/main/java/org/apache/camel/component/jbi/JbiMessage.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-jbi/src/main/java/org/apache/camel/component/jbi/JbiMessage.java?view=diff&rev=521692&r1=521691&r2=521692
==============================================================================
--- activemq/camel/trunk/camel-jbi/src/main/java/org/apache/camel/component/jbi/JbiMessage.java
(original)
+++ activemq/camel/trunk/camel-jbi/src/main/java/org/apache/camel/component/jbi/JbiMessage.java
Fri Mar 23 05:15:40 2007
@@ -40,6 +40,16 @@
     }
 
     @Override
+    public String toString() {
+        if (normalizedMessage != null) {
+            return "JbiMessage: " + normalizedMessage;
+        }
+        else {
+            return "JbiMessage: " + getBody();
+        }
+    }
+
+    @Override
     public JbiExchange getExchange() {
         return (JbiExchange) super.getExchange();
     }

Modified: activemq/camel/trunk/camel-jms/src/main/java/org/apache/camel/component/jms/JmsMessage.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-jms/src/main/java/org/apache/camel/component/jms/JmsMessage.java?view=diff&rev=521692&r1=521691&r2=521692
==============================================================================
--- activemq/camel/trunk/camel-jms/src/main/java/org/apache/camel/component/jms/JmsMessage.java
(original)
+++ activemq/camel/trunk/camel-jms/src/main/java/org/apache/camel/component/jms/JmsMessage.java
Fri Mar 23 05:15:40 2007
@@ -22,7 +22,6 @@
 import javax.jms.JMSException;
 import javax.jms.Message;
 import java.util.Enumeration;
-import java.util.HashMap;
 import java.util.Map;
 
 /**
@@ -38,6 +37,16 @@
 
     public JmsMessage(Message jmsMessage) {
         this.jmsMessage = jmsMessage;
+    }
+
+    @Override
+    public String toString() {
+        if (jmsMessage != null) {
+            return "JmsMessage: " + jmsMessage;
+        }
+        else {
+            return "JmsMessage: " + getBody();
+        }
     }
 
     @Override

Modified: activemq/camel/trunk/camel-script/pom.xml
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/camel-script/pom.xml?view=diff&rev=521692&r1=521691&r2=521692
==============================================================================
--- activemq/camel/trunk/camel-script/pom.xml (original)
+++ activemq/camel/trunk/camel-script/pom.xml Fri Mar 23 05:15:40 2007
@@ -38,6 +38,13 @@
       <groupId>org.apache.camel</groupId>
       <artifactId>camel-core</artifactId>
     </dependency>
+    <dependency>
+      <groupId>org.apache.camel</groupId>
+      <artifactId>camel-core</artifactId>
+      <type>test-jar</type>
+      <optional>true</optional>
+      <scope>test</scope>
+    </dependency>
 
     <dependency>
       <groupId>commons-logging</groupId>



Mime
View raw message