Skip to content

Commit

Permalink
[resolves #2751] Remove support for camel-script
Browse files Browse the repository at this point in the history
  • Loading branch information
tdiesler committed Jul 15, 2019
1 parent 17fd0e5 commit 22c3529
Show file tree
Hide file tree
Showing 21 changed files with 37 additions and 266 deletions.
18 changes: 0 additions & 18 deletions docs/guide/components/camel-script.adoc

This file was deleted.

2 changes: 0 additions & 2 deletions docs/guide/components/index.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,6 @@ include::camel-saxon.adoc[]

include::camel-schematron.adoc[]

include::camel-script.adoc[]

include::camel-servicenow.adoc[]

include::camel-servlet.adoc[]
Expand Down
67 changes: 1 addition & 66 deletions feature/modules/etc/smartics/camel-modules.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1200,7 +1200,7 @@
<include module="org.springframework.boot" />
</apply-to-dependencies>
<dependencies>
<module name="org.apache.camel.script.groovy" />
<module name="org.codehaus.groovy" export="true"/>
<module name="org.slf4j"/>
</dependencies>
</module>
Expand Down Expand Up @@ -2555,71 +2555,6 @@
</dependencies>
</module>

<module name="org.apache.camel.component.script">
<include artifact="org.apache.camel:camel-script">
<filter>
<exclude path="org/apache/camel/script/osgi**" />
</filter>
</include>
<apply-to-dependencies skip="true">
<include module="org.apache.camel.apt" />
<include module="org.springframework.boot" />
<include module="org.osgi.core" />
</apply-to-dependencies>
<dependencies>
<module name="javax.api"/>
<module name="org.apache.camel.script.groovy" export="true" services="export"/>
<module name="org.apache.camel.script.rhino" services="export"/>
<module name="org.beanshell" export="true" services="export">
<exports>
<include path="bsh/engine"/>
<exclude path="bsh**"/>
</exports>
</module>
<module name="org.slf4j"/>
</dependencies>
</module>

<module name="org.apache.camel.script.groovy">
<properties>
<property name="jboss.api" value="private"/>
</properties>
<include artifact="org.codehaus.groovy:groovy" />
<include artifact="org.codehaus.groovy:groovy-jsr223" />
<include artifact="org.codehaus.groovy:groovy-xml" />
<dependencies>
<module name="javax.api"/>
<module name="org.slf4j"/>
<module name="sun.jdk">
<imports>
<include path="sun/misc/Unsafe"/>
</imports>
</module>
</dependencies>
<exports>
<exclude path="groovy/json/internal"/>
<exclude path="groovyjarjarantlr/**"/>
<exclude path="groovyjarjarasm/**"/>
<exclude path="groovyjarjarpicocli/**"/>
<exclude path="groovyjarjarcommonscli/**"/>
<exclude path="org/apache/groovy/internal**"/>
<exclude path="org/codehaus"/>
</exports>
</module>

<module name="org.apache.camel.script.rhino">
<properties>
<property name="jboss.api" value="private"/>
</properties>
<include artifact=":scriptengines-javascript" />
<include artifact=":livetribe-jsr223" />
<include artifact="rhino:js" />
<dependencies>
<module name="javax.api"/>
<module name="org.slf4j"/>
</dependencies>
</module>

<module name="org.apache.camel.component.servicenow">
<include artifact="org.apache.camel:camel-servicenow"/>
<apply-to-dependencies skip="true">
Expand Down
37 changes: 27 additions & 10 deletions feature/modules/etc/smartics/other-modules.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1853,16 +1853,6 @@
</dependencies>
</module>

<module name="org.beanshell">
<properties>
<property name="jboss.api" value="private"/>
</properties>
<include artifact="org.apache-extras.beanshell:bsh" />
<dependencies>
<module name="javax.api" />
</dependencies>
</module>

<module name="org.bitbucket.jose4j">
<properties>
<property name="jboss.api" value="private"/>
Expand Down Expand Up @@ -1902,6 +1892,33 @@
</dependencies>
</module>

<module name="org.codehaus.groovy">
<properties>
<property name="jboss.api" value="private"/>
</properties>
<include artifact="org.codehaus.groovy:groovy" />
<include artifact="org.codehaus.groovy:groovy-jsr223" />
<include artifact="org.codehaus.groovy:groovy-xml" />
<dependencies>
<module name="javax.api"/>
<module name="org.slf4j"/>
<module name="sun.jdk">
<imports>
<include path="sun/misc/Unsafe"/>
</imports>
</module>
</dependencies>
<exports>
<exclude path="groovy/json/internal"/>
<exclude path="groovyjarjarantlr/**"/>
<exclude path="groovyjarjarasm/**"/>
<exclude path="groovyjarjarpicocli/**"/>
<exclude path="groovyjarjarcommonscli/**"/>
<exclude path="org/apache/groovy/internal**"/>
<exclude path="org/codehaus"/>
</exports>
</module>

<module name="org.codelibs.jhighlight">
<properties>
<property name="jboss.api" value="private"/>
Expand Down
13 changes: 0 additions & 13 deletions feature/modules/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,6 @@
<groupId>javax.cache</groupId>
<artifactId>cache-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache-extras.beanshell</groupId>
<artifactId>bsh</artifactId>
</dependency>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-camel</artifactId>
Expand Down Expand Up @@ -779,10 +775,6 @@
<groupId>org.apache.camel</groupId>
<artifactId>camel-schematron</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-script</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-servlet</artifactId>
Expand Down Expand Up @@ -1040,11 +1032,6 @@
<groupId>org.infinispan</groupId>
<artifactId>infinispan-jcache</artifactId>
</dependency>
<dependency>
<groupId>rhino</groupId>
<artifactId>js</artifactId>
</dependency>

<dependency>
<groupId>org.wildfly</groupId>
<artifactId>wildfly-galleon-pack</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<artifact name="${org.apache.camel:camel-groovy}" />
</resources>
<dependencies>
<module name="org.apache.camel.script.groovy" />
<module name="org.codehaus.groovy" export="true" />
<module name="org.slf4j" />
<module name="javax.xml.bind.api" />
<module name="org.apache.camel.core" />
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<module xmlns="urn:jboss:module:1.1" name="org.apache.camel.script.groovy">
<module xmlns="urn:jboss:module:1.1" name="org.codehaus.groovy">
<properties>
<property name="jboss.api" value="private" />
</properties>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* #L%
*/

package org.wildfly.camel.test.script;
package org.wildfly.camel.test.groovy;

import javax.annotation.Resource;

Expand All @@ -32,7 +32,7 @@
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.wildfly.camel.test.script.subA.CustomGroovyShellFactory;
import org.wildfly.camel.test.groovy.subA.CustomGroovyShellFactory;
import org.wildfly.extension.camel.CamelAware;

@CamelAware
Expand All @@ -46,7 +46,7 @@ public class GroovyShellFactoryTest {
public static JavaArchive deployment() {
final JavaArchive archive = ShrinkWrap.create(JavaArchive.class, "script-tests.jar");
archive.addPackage(CustomGroovyShellFactory.class.getPackage());
archive.addAsResource("script/groovy-transform-camel-context.xml");
archive.addAsResource("groovy/groovy-transform-camel-context.xml");
archive.addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
return archive;
}
Expand All @@ -55,15 +55,13 @@ public static JavaArchive deployment() {
public void testGroovy() throws Exception {
ProducerTemplate producer = camelctx.createProducerTemplate();
String result = producer.requestBody("direct:start", "Kermit", String.class);

Assert.assertEquals("Hello Kermit", result);
}

@Test
public void testGroovyWithHeader() throws Exception {
ProducerTemplate producer = camelctx.createProducerTemplate();
String result = producer.requestBodyAndHeader("direct:start", "Kermit", "locale", "es", String.class);

Assert.assertEquals("Hola Kermit", result);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* #L%
*/

package org.wildfly.camel.test.script.subA;
package org.wildfly.camel.test.groovy.subA;

import org.apache.camel.Exchange;
import org.apache.camel.language.groovy.GroovyShellFactory;
Expand All @@ -31,7 +31,7 @@ public class CustomGroovyShellFactory implements GroovyShellFactory {

public GroovyShell createGroovyShell(Exchange exchange) {
ImportCustomizer importCustomizer = new ImportCustomizer();
importCustomizer.addStaticStars("org.wildfly.camel.test.script.subA.CustomUtils");
importCustomizer.addStaticStars("org.wildfly.camel.test.groovy.subA.CustomUtils");
CompilerConfiguration configuration = new CompilerConfiguration();
configuration.addCompilationCustomizers(importCustomizer);
ClassLoader classLoader = exchange.getContext().getApplicationContextClassLoader();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* #L%
*/

package org.wildfly.camel.test.script.subA;
package org.wildfly.camel.test.groovy.subA;

public final class CustomUtils {

Expand Down
Loading

0 comments on commit 22c3529

Please sign in to comment.