Author: davsclaus
Date: Thu Mar  3 16:51:42 2011
New Revision: 1076676

URL: http://svn.apache.org/viewvc?rev=1076676&view=rev
Log:
CAMEL-3658: Migrated the scala archetype to the new format. And fixed so it 
works.

Added:
    
camel/trunk/tooling/archetypes/camel-archetype-scala/src/main/resources/META-INF/maven/archetype-metadata.xml
   (with props)
Removed:
    
camel/trunk/tooling/archetypes/camel-archetype-scala/src/main/resources/META-INF/maven/archetype.xml
Modified:
    
camel/trunk/tooling/archetypes/camel-archetype-java/src/main/resources/archetype-resources/pom.xml
    camel/trunk/tooling/archetypes/camel-archetype-scala/pom.xml
    
camel/trunk/tooling/archetypes/camel-archetype-scala/src/main/resources/archetype-resources/ReadMe.txt
    
camel/trunk/tooling/archetypes/camel-archetype-scala/src/main/resources/archetype-resources/pom.xml
    
camel/trunk/tooling/archetypes/camel-archetype-scala/src/main/resources/archetype-resources/src/main/resources/log4j.properties
    
camel/trunk/tooling/archetypes/camel-archetype-scala/src/main/resources/archetype-resources/src/main/scala/MyRouteBuilder.scala

Modified: 
camel/trunk/tooling/archetypes/camel-archetype-java/src/main/resources/archetype-resources/pom.xml
URL: 
http://svn.apache.org/viewvc/camel/trunk/tooling/archetypes/camel-archetype-java/src/main/resources/archetype-resources/pom.xml?rev=1076676&r1=1076675&r2=1076676&view=diff
==============================================================================
--- 
camel/trunk/tooling/archetypes/camel-archetype-java/src/main/resources/archetype-resources/pom.xml
 (original)
+++ 
camel/trunk/tooling/archetypes/camel-archetype-java/src/main/resources/archetype-resources/pom.xml
 Thu Mar  3 16:51:42 2011
@@ -40,6 +40,8 @@
       <artifactId>camel-spring</artifactId>
       <version>${camel-version}</version>
     </dependency>
+    
+    <!-- logging -->
     <dependency>
       <groupId>org.slf4j</groupId>
       <artifactId>slf4j-log4j12</artifactId>

Modified: camel/trunk/tooling/archetypes/camel-archetype-scala/pom.xml
URL: 
http://svn.apache.org/viewvc/camel/trunk/tooling/archetypes/camel-archetype-scala/pom.xml?rev=1076676&r1=1076675&r2=1076676&view=diff
==============================================================================
--- camel/trunk/tooling/archetypes/camel-archetype-scala/pom.xml (original)
+++ camel/trunk/tooling/archetypes/camel-archetype-scala/pom.xml Thu Mar  3 
16:51:42 2011
@@ -41,30 +41,19 @@
         <artifactId>archetype-packaging</artifactId>
       </extension>
     </extensions>
-    <plugins>
-      <plugin>
-        <groupId>org.apache.maven.plugins</groupId>
-        <artifactId>maven-antrun-plugin</artifactId>
-        <executions>
-          <execution>
-            <phase>process-resources</phase>
-            <goals>
-              <goal>run</goal>
-            </goals>
-            <configuration>
-              <tasks>
-                <replace casesensitive="true" 
file="${project.build.directory}/classes/archetype-resources/pom.xml">
-                  <replacefilter token="$CAMEL_VERSION_REPLACEME$" 
value="${project.version}" />
-                  <replacefilter token="$SCALA_VERSION_REPLACEME$" 
value="${scala-version}" />
-                  <replacefilter token="$SCALA_PLUGIN_VERSION_REPLACEME$" 
value="${scala-plugin-version}" />
-                  <replacefilter token="$LOG4J_VERSION_REPLACEME$" 
value="${log4j-version}" /> 
-                </replace>
-              </tasks>
-            </configuration>
-          </execution>
-        </executions>
-      </plugin>
-    </plugins>
+    <resources>
+      <resource>
+        <directory>src/main/resources</directory>
+        <filtering>false</filtering>
+      </resource> 
+      <resource>
+        <directory>src/main/resources</directory>
+        <filtering>true</filtering>
+        <includes>
+          <include>**/archetype-metadata.xml</include>
+        </includes>
+      </resource>
+    </resources>
   </build>
 
 </project>

Added: 
camel/trunk/tooling/archetypes/camel-archetype-scala/src/main/resources/META-INF/maven/archetype-metadata.xml
URL: 
http://svn.apache.org/viewvc/camel/trunk/tooling/archetypes/camel-archetype-scala/src/main/resources/META-INF/maven/archetype-metadata.xml?rev=1076676&view=auto
==============================================================================
--- 
camel/trunk/tooling/archetypes/camel-archetype-scala/src/main/resources/META-INF/maven/archetype-metadata.xml
 (added)
+++ 
camel/trunk/tooling/archetypes/camel-archetype-scala/src/main/resources/META-INF/maven/archetype-metadata.xml
 Thu Mar  3 16:51:42 2011
@@ -0,0 +1,63 @@
+<?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-descriptor 
xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0
 http://maven.apache.org/xsd/archetype-descriptor-1.0.0.xsd"; 
name="camel-archetype-java"
+    
xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0";
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
+  <requiredProperties>
+    <requiredProperty key="camel-version">
+      <defaultValue>${project.version}</defaultValue>
+    </requiredProperty>
+    <requiredProperty key="log4j-version">
+      <defaultValue>${log4j-version}</defaultValue>
+    </requiredProperty>
+    <requiredProperty key="maven-compiler-plugin-version">
+      <defaultValue>${maven-compiler-plugin-version}</defaultValue>
+    </requiredProperty>
+    <requiredProperty key="scala-version">
+      <defaultValue>${scala-version}</defaultValue>
+    </requiredProperty>
+    <requiredProperty key="scala-plugin-version">
+      <defaultValue>${scala-plugin-version}</defaultValue>
+    </requiredProperty>
+    <requiredProperty key="slf4j-version">
+      <defaultValue>${slf4j-version}</defaultValue>
+    </requiredProperty>
+  </requiredProperties>
+  <fileSets>
+    <fileSet filtered="true" packaged="true" encoding="UTF-8">
+      <directory>src/main/scala</directory>
+      <includes>
+        <include>**/*.scala</include>
+      </includes>
+    </fileSet>
+    <fileSet filtered="true" encoding="UTF-8">
+      <directory>src/main/resources</directory>
+      <includes>
+        <include>**/*</include>
+      </includes>
+    </fileSet>
+    <fileSet encoding="UTF-8">
+      <directory></directory>
+      <includes>
+        <include>ReadMe.txt</include>
+      </includes>
+    </fileSet>
+  </fileSets>
+</archetype-descriptor>

Propchange: 
camel/trunk/tooling/archetypes/camel-archetype-scala/src/main/resources/META-INF/maven/archetype-metadata.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: 
camel/trunk/tooling/archetypes/camel-archetype-scala/src/main/resources/META-INF/maven/archetype-metadata.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Propchange: 
camel/trunk/tooling/archetypes/camel-archetype-scala/src/main/resources/META-INF/maven/archetype-metadata.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Modified: 
camel/trunk/tooling/archetypes/camel-archetype-scala/src/main/resources/archetype-resources/ReadMe.txt
URL: 
http://svn.apache.org/viewvc/camel/trunk/tooling/archetypes/camel-archetype-scala/src/main/resources/archetype-resources/ReadMe.txt?rev=1076676&r1=1076675&r2=1076676&view=diff
==============================================================================
--- 
camel/trunk/tooling/archetypes/camel-archetype-scala/src/main/resources/archetype-resources/ReadMe.txt
 (original)
+++ 
camel/trunk/tooling/archetypes/camel-archetype-scala/src/main/resources/archetype-resources/ReadMe.txt
 Thu Mar  3 16:51:42 2011
@@ -1,15 +1,15 @@
 Camel Router with Scala DSL Project
 ===================================
 
+To compile you run:
+
+    mvn install
+
 To run this router either embed the jar inside Spring
 or to run the route from within maven try
 
     mvn camel:run
     
-This project builds an OSGi bundle that can be used to
-embed the Camel routes in ServiceMix Kernel or another
-OSGi runtime.
-
 For more help see the Apache Camel documentation
 
     http://camel.apache.org/

Modified: 
camel/trunk/tooling/archetypes/camel-archetype-scala/src/main/resources/archetype-resources/pom.xml
URL: 
http://svn.apache.org/viewvc/camel/trunk/tooling/archetypes/camel-archetype-scala/src/main/resources/archetype-resources/pom.xml?rev=1076676&r1=1076675&r2=1076676&view=diff
==============================================================================
--- 
camel/trunk/tooling/archetypes/camel-archetype-scala/src/main/resources/archetype-resources/pom.xml
 (original)
+++ 
camel/trunk/tooling/archetypes/camel-archetype-scala/src/main/resources/archetype-resources/pom.xml
 Thu Mar  3 16:51:42 2011
@@ -23,18 +23,48 @@
 
   <groupId>${groupId}</groupId>
   <artifactId>${artifactId}</artifactId>
-  <packaging>bundle</packaging>
+  <packaging>jar</packaging>
   <version>${version}</version>
 
   <name>Camel :: A RouteBuilder for the Scala DSL</name>
   <url>http://www.myorganization.org</url>
 
-  <properties>
-    <camel-version>$CAMEL_VERSION_REPLACEME$</camel-version>
-    <scala-version>$SCALA_VERSION_REPLACEME$</scala-version>
-    
<scala-plugin-version>$SCALA_PLUGIN_VERSION_REPLACEME$</scala-plugin-version>
-    <log4j-version>$LOG4J_VERSION_REPLACEME$</log4j-version>
-  </properties>
+  <dependencies>
+    <dependency>
+      <groupId>org.apache.camel</groupId>
+      <artifactId>camel-core</artifactId>
+      <version>${camel-version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.camel</groupId>
+      <artifactId>camel-scala</artifactId>
+      <version>${camel-version}</version>
+    </dependency>
+    <dependency>
+      <groupId>org.apache.camel</groupId>
+      <artifactId>camel-spring</artifactId>
+      <version>${camel-version}</version>
+    </dependency> 
+       
+    <!-- scala -->
+    <dependency>
+      <groupId>org.scala-lang</groupId>
+      <artifactId>scala-library</artifactId>
+      <version>${scala-version}</version>
+    </dependency>
+
+    <!-- logging -->
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-log4j12</artifactId>
+      <version>${slf4j-version}</version>
+    </dependency>
+    <dependency>
+      <groupId>log4j</groupId> 
+      <artifactId>log4j</artifactId> 
+      <version>${log4j-version}</version> 
+    </dependency>
+  </dependencies>
 
   <build>
     <sourceDirectory>src/main/scala</sourceDirectory>
@@ -55,23 +85,6 @@
         </executions>
       </plugin>
       
-      <!-- bundle plugin to package the RouteBuilders in an OSGi bundle -->
-      <plugin>
-        <groupId>org.apache.felix</groupId>
-           <artifactId>maven-bundle-plugin</artifactId>
-           <extensions>true</extensions>
-           <configuration>
-          <excludeDependencies>true</excludeDependencies>
-             <instructions>
-               <Bundle-Name>${artifactId}</Bundle-Name>
-               <Bundle-SymbolicName>${artifactId}</Bundle-SymbolicName>
-               <Export-Package>${package}*</Export-Package>
-               <Implementation-Title>Apache Camel Scala DSL 
Router</Implementation-Title>
-               
<Implementation-Version>${project.version}</Implementation-Version>
-             </instructions>
-           </configuration>
-      </plugin>
-      
       <!-- configure the eclipse plugin to generate eclipse project 
descriptors for a Scala project --> 
       <plugin>
         <groupId>org.apache.maven.plugins</groupId>
@@ -101,39 +114,4 @@
     </plugins>
   </build>
 
-  <dependencies>
-    <dependency>
-      <groupId>org.apache.camel</groupId>
-      <artifactId>camel-core</artifactId>
-      <version>${camel-version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.camel</groupId>
-      <artifactId>camel-scala</artifactId>
-      <version>${camel-version}</version>
-    </dependency>
-    <dependency>
-      <groupId>org.apache.camel</groupId>
-      <artifactId>camel-spring</artifactId>
-      <version>${camel-version}</version>
-    </dependency>    
-    <dependency>
-      <groupId>org.scala-lang</groupId>
-      <artifactId>scala-library</artifactId>
-      <version>${scala-version}</version>
-    </dependency>
-    <!-- test dependencies -->
-    <dependency>
-      <groupId>org.apache.camel</groupId>
-      <artifactId>camel-core</artifactId>
-      <type>test-jar</type>
-      <scope>test</scope>
-      <version>${camel-version}</version>
-    </dependency>
-    <dependency>
-      <groupId>log4j</groupId> 
-      <artifactId>log4j</artifactId> 
-      <version>${log4j-version}</version> 
-    </dependency>
-  </dependencies>
 </project>

Modified: 
camel/trunk/tooling/archetypes/camel-archetype-scala/src/main/resources/archetype-resources/src/main/resources/log4j.properties
URL: 
http://svn.apache.org/viewvc/camel/trunk/tooling/archetypes/camel-archetype-scala/src/main/resources/archetype-resources/src/main/resources/log4j.properties?rev=1076676&r1=1076675&r2=1076676&view=diff
==============================================================================
--- 
camel/trunk/tooling/archetypes/camel-archetype-scala/src/main/resources/archetype-resources/src/main/resources/log4j.properties
 (original)
+++ 
camel/trunk/tooling/archetypes/camel-archetype-scala/src/main/resources/archetype-resources/src/main/resources/log4j.properties
 Thu Mar  3 16:51:42 2011
@@ -16,19 +16,15 @@
 ## ------------------------------------------------------------------------
 
 #
-# The logging properties used for eclipse testing, We want to see debug output 
on the console.
+# The logging properties used
 #
 log4j.rootLogger=INFO, out
 
 # uncomment the following line to turn on Camel debugging
 #log4j.logger.org.apache.camel=DEBUG
 
-# uncomment the following line to turn on ActiveMQ debugging
-#log4j.logger.org.apache.activemq=DEBUG
-
 log4j.logger.org.springframework=WARN
 
-
 # CONSOLE appender not used by default
 log4j.appender.out=org.apache.log4j.ConsoleAppender
 log4j.appender.out.layout=org.apache.log4j.PatternLayout

Modified: 
camel/trunk/tooling/archetypes/camel-archetype-scala/src/main/resources/archetype-resources/src/main/scala/MyRouteBuilder.scala
URL: 
http://svn.apache.org/viewvc/camel/trunk/tooling/archetypes/camel-archetype-scala/src/main/resources/archetype-resources/src/main/scala/MyRouteBuilder.scala?rev=1076676&r1=1076675&r2=1076676&view=diff
==============================================================================
--- 
camel/trunk/tooling/archetypes/camel-archetype-scala/src/main/resources/archetype-resources/src/main/scala/MyRouteBuilder.scala
 (original)
+++ 
camel/trunk/tooling/archetypes/camel-archetype-scala/src/main/resources/archetype-resources/src/main/scala/MyRouteBuilder.scala
 Thu Mar  3 16:51:42 2011
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package ${packageName}
+package ${package}
 
 import org.apache.camel.Exchange
 import org.apache.camel.scala.dsl.builder.RouteBuilder
@@ -25,7 +25,7 @@ import org.apache.camel.scala.dsl.builde
 class MyRouteBuilder extends RouteBuilder {
 
    //an example for the simple DSL syntax...
-   "timer://foo?fixedRate=true&delay=0&period=10000" setbody("simple test") to 
"log:simple"
+   "timer://foo?fixedRate=true&delay=0&period=10s" setbody("simple test") to 
"log:simple"
 
    // an example of a Processor method
    val myProcessorMethod = (exchange: Exchange) => {
@@ -33,7 +33,7 @@ class MyRouteBuilder extends RouteBuilde
    }
    
    // ...and another one using Scala blocks
-   "timer://foo?fixedRate=true&delay=5000&period=10000" ==> {
+   "timer://foo?fixedRate=true&delay=5s&period=10s" ==> {
       process(myProcessorMethod)
       to("log:block")
    }


Reply via email to