This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 40ccfd1b1a97e9f79251e7eb42aeac115d58d27d
Author: Claus Ibsen <claus.ib...@gmail.com>
AuthorDate: Tue Oct 19 19:10:22 2021 +0200

    Remove old cruft about spring aop
---
 components/camel-spring-xml/pom.xml                | 19 ------
 .../aop/SpringAopClassLevelCamelBeanTest.java      | 70 ----------------------
 .../aop/SpringAopClassLevelCamelBeanTest.xml       | 56 -----------------
 parent/pom.xml                                     |  1 -
 4 files changed, 146 deletions(-)

diff --git a/components/camel-spring-xml/pom.xml 
b/components/camel-spring-xml/pom.xml
index cf73715..85f3c21 100644
--- a/components/camel-spring-xml/pom.xml
+++ b/components/camel-spring-xml/pom.xml
@@ -155,25 +155,6 @@
             <scope>test</scope>
         </dependency>
 
-        <!-- for testing Spring AOP at class level -->
-        <dependency>
-            <groupId>org.aspectj</groupId>
-            <artifactId>aspectjrt</artifactId>
-            <version>${aspectj-version}</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>org.aspectj</groupId>
-            <artifactId>aspectjweaver</artifactId>
-            <version>${aspectj-version}</version>
-            <scope>test</scope>
-        </dependency>
-        <dependency>
-            <groupId>cglib</groupId>
-            <artifactId>cglib</artifactId>
-            <version>${cglib-version}</version>
-            <scope>test</scope>
-        </dependency>
         <dependency>
             <groupId>org.assertj</groupId>
             <artifactId>assertj-core</artifactId>
diff --git 
a/components/camel-spring-xml/src/test/java/org/apache/camel/spring/aop/SpringAopClassLevelCamelBeanTest.java
 
b/components/camel-spring-xml/src/test/java/org/apache/camel/spring/aop/SpringAopClassLevelCamelBeanTest.java
deleted file mode 100644
index 786e8ce..0000000
--- 
a/components/camel-spring-xml/src/test/java/org/apache/camel/spring/aop/SpringAopClassLevelCamelBeanTest.java
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.apache.camel.spring.aop;
-
-import org.apache.camel.CamelExecutionException;
-import org.apache.camel.component.mock.MockEndpoint;
-import org.apache.camel.spring.SpringTestSupport;
-import org.junit.jupiter.api.Test;
-import org.springframework.context.support.AbstractXmlApplicationContext;
-import org.springframework.context.support.ClassPathXmlApplicationContext;
-
-import static org.junit.jupiter.api.Assertions.assertEquals;
-import static org.junit.jupiter.api.Assertions.fail;
-
-/**
- * Spring AOP will proxy a bean at class level which is also a bean that Camel 
should invoke using its bean component.
- * The test should test that Camel bean binding annotations works.
- */
-public class SpringAopClassLevelCamelBeanTest extends SpringTestSupport {
-
-    @Override
-    protected AbstractXmlApplicationContext createApplicationContext() {
-        return new 
ClassPathXmlApplicationContext("org/apache/camel/spring/aop/SpringAopClassLevelCamelBeanTest.xml");
-    }
-
-    @Test
-    public void testSpringAopOk() throws Exception {
-        MockEndpoint mock = getMockEndpoint("mock:result");
-        mock.expectedBodiesReceived("Bye World");
-        mock.expectedHeaderReceived("foo", 123);
-
-        template.sendBodyAndHeader("direct:start", "Hello World", "foo", 
"ABC");
-
-        assertMockEndpointsSatisfied();
-    }
-
-    @Test
-    public void testSpringAopException() throws Exception {
-        MockEndpoint mock = getMockEndpoint("mock:result");
-        mock.expectedMessageCount(0);
-
-        try {
-            template.sendBodyAndHeader("direct:start", "Hello World", "foo", 
"Damn");
-            fail("Should have thrown exception");
-        } catch (CamelExecutionException e) {
-            assertIsInstanceOf(IllegalArgumentException.class, e.getCause());
-        }
-
-        assertMockEndpointsSatisfied();
-
-        ExceptionInterceptor ei = 
context.getRegistry().lookupByNameAndType("exceptionInterceptor", 
ExceptionInterceptor.class);
-        IllegalArgumentException iae = 
assertIsInstanceOf(IllegalArgumentException.class, ei.getE());
-        assertEquals("Foo has not expected value ABC but Damn", 
iae.getMessage());
-    }
-
-}
diff --git 
a/components/camel-spring-xml/src/test/resources/org/apache/camel/spring/aop/SpringAopClassLevelCamelBeanTest.xml
 
b/components/camel-spring-xml/src/test/resources/org/apache/camel/spring/aop/SpringAopClassLevelCamelBeanTest.xml
deleted file mode 100644
index 5bd31b2..0000000
--- 
a/components/camel-spring-xml/src/test/resources/org/apache/camel/spring/aop/SpringAopClassLevelCamelBeanTest.xml
+++ /dev/null
@@ -1,56 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
-
-    Licensed to the Apache Software Foundation (ASF) under one or more
-    contributor license agreements.  See the NOTICE file distributed with
-    this work for additional information regarding copyright ownership.
-    The ASF licenses this file to You under the Apache License, Version 2.0
-    (the "License"); you may not use this file except in compliance with
-    the License.  You may obtain a copy of the License at
-
-         http://www.apache.org/licenses/LICENSE-2.0
-
-    Unless required by applicable law or agreed to in writing, software
-    distributed under the License is distributed on an "AS IS" BASIS,
-    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-    See the License for the specific language governing permissions and
-    limitations under the License.
-
--->
-<beans xmlns="http://www.springframework.org/schema/beans";
-       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
-       xmlns:context="http://www.springframework.org/schema/context";
-       xmlns:aop="http://www.springframework.org/schema/aop";
-       xsi:schemaLocation="
-       http://www.springframework.org/schema/beans 
http://www.springframework.org/schema/beans/spring-beans.xsd
-       http://www.springframework.org/schema/context 
http://www.springframework.org/schema/context/spring-context.xsd
-       http://www.springframework.org/schema/aop 
http://www.springframework.org/schema/aop/spring-aop.xsd
-       http://camel.apache.org/schema/spring 
http://camel.apache.org/schema/spring/camel-spring.xsd
-    ">
-
-    <context:component-scan base-package="org.apache.camel.spring.aop"/>
-
-    <aop:config>
-        <aop:pointcut id="servicePointcut" expression="execution(* 
org.apache.camel.spring.aop.*Bean+.*(..))"/>
-
-        <aop:aspect id="exceptionAspect" ref="exceptionInterceptor">
-            <aop:after-throwing
-                    method="logException"
-                    pointcut-ref="servicePointcut"
-                    throwing="e"/>
-        </aop:aspect>
-    </aop:config>
-
-    <bean id="exceptionInterceptor" 
class="org.apache.camel.spring.aop.ExceptionInterceptor"/>
-
-    <bean id="myBean" class="org.apache.camel.spring.aop.MyCoolAopBean"/>
-
-    <camelContext xmlns="http://camel.apache.org/schema/spring";>
-        <route>
-            <from uri="direct:start"/>
-            <to uri="bean:myBean"/>
-            <to uri="mock:result"/>
-        </route>
-    </camelContext>
-
-</beans>
diff --git a/parent/pom.xml b/parent/pom.xml
index 10127d6..aa461a4 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -66,7 +66,6 @@
         <arquillian-version>1.6.0.Final</arquillian-version>
         
<arquillian-weld-embedded-version>2.0.0.Final</arquillian-weld-embedded-version>
         <asm-version>8.0.1</asm-version>
-        <aspectj-version>1.9.7</aspectj-version>
         <assertj-version>3.21.0</assertj-version>
         <asterisk-java-version>3.12.0</asterisk-java-version>
         <atlasmap-version>2.3.1</atlasmap-version>

Reply via email to