You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by js...@apache.org on 2007/06/19 19:48:32 UTC

svn commit: r548807 - in /activemq/camel/trunk/tooling: ./ archetypes/ archetypes/camel-router/ archetypes/camel-router/src/ archetypes/camel-router/src/main/ archetypes/camel-router/src/main/resources/ archetypes/camel-router/src/main/resources/META-I...

Author: jstrachan
Date: Tue Jun 19 10:48:30 2007
New Revision: 548807

URL: http://svn.apache.org/viewvc?view=rev&rev=548807
Log:
added a simple archetype to get folks creating new routers easily

Added:
    activemq/camel/trunk/tooling/archetypes/
    activemq/camel/trunk/tooling/archetypes/camel-router/
    activemq/camel/trunk/tooling/archetypes/camel-router/pom.xml
    activemq/camel/trunk/tooling/archetypes/camel-router/src/
    activemq/camel/trunk/tooling/archetypes/camel-router/src/main/
    activemq/camel/trunk/tooling/archetypes/camel-router/src/main/resources/
    activemq/camel/trunk/tooling/archetypes/camel-router/src/main/resources/META-INF/
    activemq/camel/trunk/tooling/archetypes/camel-router/src/main/resources/META-INF/maven/
    activemq/camel/trunk/tooling/archetypes/camel-router/src/main/resources/META-INF/maven/archetype.xml
    activemq/camel/trunk/tooling/archetypes/camel-router/src/main/resources/archetype-resources/
    activemq/camel/trunk/tooling/archetypes/camel-router/src/main/resources/archetype-resources/ReadMe.txt
    activemq/camel/trunk/tooling/archetypes/camel-router/src/main/resources/archetype-resources/pom.xml
    activemq/camel/trunk/tooling/archetypes/camel-router/src/main/resources/archetype-resources/src/
    activemq/camel/trunk/tooling/archetypes/camel-router/src/main/resources/archetype-resources/src/main/
    activemq/camel/trunk/tooling/archetypes/camel-router/src/main/resources/archetype-resources/src/main/java/
    activemq/camel/trunk/tooling/archetypes/camel-router/src/main/resources/archetype-resources/src/main/java/MyRouteBuilder.java
    activemq/camel/trunk/tooling/archetypes/camel-router/src/main/resources/archetype-resources/src/main/resources/
    activemq/camel/trunk/tooling/archetypes/camel-router/src/main/resources/archetype-resources/src/main/resources/META-INF/
    activemq/camel/trunk/tooling/archetypes/camel-router/src/main/resources/archetype-resources/src/main/resources/META-INF/spring/
    activemq/camel/trunk/tooling/archetypes/camel-router/src/main/resources/archetype-resources/src/main/resources/META-INF/spring/camel-context.xml
    activemq/camel/trunk/tooling/archetypes/camel-router/src/main/resources/archetype-resources/src/main/resources/log4j.properties
    activemq/camel/trunk/tooling/archetypes/pom.xml
Modified:
    activemq/camel/trunk/tooling/pom.xml

Added: activemq/camel/trunk/tooling/archetypes/camel-router/pom.xml
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/tooling/archetypes/camel-router/pom.xml?view=auto&rev=548807
==============================================================================
--- activemq/camel/trunk/tooling/archetypes/camel-router/pom.xml (added)
+++ activemq/camel/trunk/tooling/archetypes/camel-router/pom.xml Tue Jun 19 10:48:30 2007
@@ -0,0 +1,34 @@
+<?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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.apache.camel</groupId>
+    <artifactId>camel-parent</artifactId>
+    <version>1.0-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>camel-router</artifactId>
+  <name>Camel :: Archetypes :: Router</name>
+
+</project>

Added: activemq/camel/trunk/tooling/archetypes/camel-router/src/main/resources/META-INF/maven/archetype.xml
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/tooling/archetypes/camel-router/src/main/resources/META-INF/maven/archetype.xml?view=auto&rev=548807
==============================================================================
--- activemq/camel/trunk/tooling/archetypes/camel-router/src/main/resources/META-INF/maven/archetype.xml (added)
+++ activemq/camel/trunk/tooling/archetypes/camel-router/src/main/resources/META-INF/maven/archetype.xml Tue Jun 19 10:48:30 2007
@@ -0,0 +1,30 @@
+<?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.
+
+-->
+<archetype>
+  <id>camel-router</id>
+  
+  <sources>
+    <source>src/main/java/MyRouteBuilder.java</source>
+  </sources>
+  <resources>
+    <resource>src/main/resources/META-INF/spring/camel-context.xml</resource>
+    <resource>src/main/resources/log4j.properties</resource>
+  </resources>
+</archetype>

Added: activemq/camel/trunk/tooling/archetypes/camel-router/src/main/resources/archetype-resources/ReadMe.txt
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/tooling/archetypes/camel-router/src/main/resources/archetype-resources/ReadMe.txt?view=auto&rev=548807
==============================================================================
--- activemq/camel/trunk/tooling/archetypes/camel-router/src/main/resources/archetype-resources/ReadMe.txt (added)
+++ activemq/camel/trunk/tooling/archetypes/camel-router/src/main/resources/archetype-resources/ReadMe.txt Tue Jun 19 10:48:30 2007
@@ -0,0 +1,12 @@
+Camel Router Project
+====================
+
+To run this router either embed the jar inside Spring
+or to run the route from within maven try
+
+    mvn camel:run
+
+For more help see the Apache Camel documentation
+
+    http://activemq.apache.org/camel/
+    
\ No newline at end of file

Added: activemq/camel/trunk/tooling/archetypes/camel-router/src/main/resources/archetype-resources/pom.xml
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/tooling/archetypes/camel-router/src/main/resources/archetype-resources/pom.xml?view=auto&rev=548807
==============================================================================
--- activemq/camel/trunk/tooling/archetypes/camel-router/src/main/resources/archetype-resources/pom.xml (added)
+++ activemq/camel/trunk/tooling/archetypes/camel-router/src/main/resources/archetype-resources/pom.xml Tue Jun 19 10:48:30 2007
@@ -0,0 +1,67 @@
+<?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.
+
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>${groupId}</groupId>
+  <artifactId>${artifactId}</artifactId>
+  <packaging>jar</packaging>
+  <version>${version}</version>
+
+  <name>A Camel Route</name>
+  <url>http://www.myorganization.org</url>
+
+  <properties>
+    <camel-version>1.0-SNAPSHOT</camel-version>
+  </properties>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.camel</groupId>
+      <artifactId>camel-spring</artifactId>
+      <version>${camel-version}</version>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <defaultGoal>install</defaultGoal>
+
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <configuration>
+          <source>1.5</source>
+          <target>1.5</target>
+        </configuration>
+      </plugin>
+
+      <!-- allows the route to be ran via 'mvn camel:run' -->
+      <plugin>
+        <groupId>org.apache.camel</groupId>
+        <artifactId>camel-maven-plugin</artifactId>
+        <version>${camel-version}</version>
+      </plugin>
+
+    </plugins>
+  </build>
+</project>

Added: activemq/camel/trunk/tooling/archetypes/camel-router/src/main/resources/archetype-resources/src/main/java/MyRouteBuilder.java
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/tooling/archetypes/camel-router/src/main/resources/archetype-resources/src/main/java/MyRouteBuilder.java?view=auto&rev=548807
==============================================================================
--- activemq/camel/trunk/tooling/archetypes/camel-router/src/main/resources/archetype-resources/src/main/java/MyRouteBuilder.java (added)
+++ activemq/camel/trunk/tooling/archetypes/camel-router/src/main/resources/archetype-resources/src/main/java/MyRouteBuilder.java Tue Jun 19 10:48:30 2007
@@ -0,0 +1,38 @@
+/**
+ *
+ * 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 ${packageName};
+
+import org.apache.camel.Exchange;
+import org.apache.camel.Processor;
+import org.apache.camel.builder.RouteBuilder;
+
+/**
+ * A Camel Router
+ *
+ * @version $Revision: 1.1 $
+ */
+public class MyRouteBuilder extends RouteBuilder {
+
+    public void configure() {
+
+        // TODO create Camel routes here. For example:-
+        //
+        // from("activemq:test.MyQueue").to("file://test");
+
+    }
+}

Added: activemq/camel/trunk/tooling/archetypes/camel-router/src/main/resources/archetype-resources/src/main/resources/META-INF/spring/camel-context.xml
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/tooling/archetypes/camel-router/src/main/resources/archetype-resources/src/main/resources/META-INF/spring/camel-context.xml?view=auto&rev=548807
==============================================================================
--- activemq/camel/trunk/tooling/archetypes/camel-router/src/main/resources/archetype-resources/src/main/resources/META-INF/spring/camel-context.xml (added)
+++ activemq/camel/trunk/tooling/archetypes/camel-router/src/main/resources/archetype-resources/src/main/resources/META-INF/spring/camel-context.xml Tue Jun 19 10:48:30 2007
@@ -0,0 +1,30 @@
+<?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.
+-->
+
+<!-- Configures the Camel Context-->
+
+<beans xmlns="http://www.springframework.org/schema/beans"
+       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+       xsi:schemaLocation="
+       http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
+       http://activemq.apache.org/camel/schema/camel-1.0.xsd http://activemq.apache.org/camel/schema/camel-1.0.xsd">
+
+  <camelContext id="camel" xmlns="http://activemq.apache.org/camel/schema/camel-1.0.xsd" packages="org.apache.camel.example.spring">
+  </camelContext>
+
+</beans>

Added: activemq/camel/trunk/tooling/archetypes/camel-router/src/main/resources/archetype-resources/src/main/resources/log4j.properties
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/tooling/archetypes/camel-router/src/main/resources/archetype-resources/src/main/resources/log4j.properties?view=auto&rev=548807
==============================================================================
--- activemq/camel/trunk/tooling/archetypes/camel-router/src/main/resources/archetype-resources/src/main/resources/log4j.properties (added)
+++ activemq/camel/trunk/tooling/archetypes/camel-router/src/main/resources/archetype-resources/src/main/resources/log4j.properties Tue Jun 19 10:48:30 2007
@@ -0,0 +1,32 @@
+## ------------------------------------------------------------------------
+## 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.
+## ------------------------------------------------------------------------
+
+#
+# The logging properties used for eclipse testing, We want to see debug output on the console.
+#
+log4j.rootLogger=INFO, out
+
+#log4j.logger.org.apache.activemq=DEBUG
+
+#log4j.logger.org.apache.camel=DEBUG
+log4j.logger.org.apache.camel.impl.converter=INFO
+
+# CONSOLE appender not used by default
+log4j.appender.out=org.apache.log4j.ConsoleAppender
+log4j.appender.out.layout=org.apache.log4j.PatternLayout
+log4j.appender.out.layout.ConversionPattern=[%30.30t] %-30.30c{1} %-5p %m%n
+#log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n

Added: activemq/camel/trunk/tooling/archetypes/pom.xml
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/tooling/archetypes/pom.xml?view=auto&rev=548807
==============================================================================
--- activemq/camel/trunk/tooling/archetypes/pom.xml (added)
+++ activemq/camel/trunk/tooling/archetypes/pom.xml Tue Jun 19 10:48:30 2007
@@ -0,0 +1,38 @@
+<?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.
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+  <modelVersion>4.0.0</modelVersion>
+
+  <parent>
+    <groupId>org.apache.camel</groupId>
+    <artifactId>camel-parent</artifactId>
+    <version>1.0-SNAPSHOT</version>
+  </parent>
+
+  <artifactId>archetypes</artifactId>
+  <name>Camel :: Archetypes</name>
+  <description>Camel Archetypes</description>
+  <packaging>pom</packaging>
+
+  <modules>
+    <module>camel-router</module>
+  </modules>
+
+</project>
\ No newline at end of file

Modified: activemq/camel/trunk/tooling/pom.xml
URL: http://svn.apache.org/viewvc/activemq/camel/trunk/tooling/pom.xml?view=diff&rev=548807&r1=548806&r2=548807
==============================================================================
--- activemq/camel/trunk/tooling/pom.xml (original)
+++ activemq/camel/trunk/tooling/pom.xml Tue Jun 19 10:48:30 2007
@@ -14,7 +14,9 @@
   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.
---><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+-->
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
 
   <modelVersion>4.0.0</modelVersion>
 
@@ -30,6 +32,7 @@
   <packaging>pom</packaging>
 
   <modules>
+    <module>archetypes</module>
     <module>maven</module>
   </modules>