You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2011/03/03 15:59:44 UTC
svn commit: r1076644 - in
/camel/trunk/tooling/archetypes/camel-archetype-component: ./
src/main/resources/META-INF/maven/ src/main/resources/archetype-resources/
src/main/resources/archetype-resources/src/main/java/
src/main/resources/archetype-resour...
Author: davsclaus
Date: Thu Mar 3 14:59:43 2011
New Revision: 1076644
URL: http://svn.apache.org/viewvc?rev=1076644&view=rev
Log:
CAMEL-3658: Migrated the component archetype to the new format. And fixed so it works.
Added:
camel/trunk/tooling/archetypes/camel-archetype-component/src/main/resources/META-INF/maven/archetype-metadata.xml (with props)
Removed:
camel/trunk/tooling/archetypes/camel-archetype-component/src/main/resources/META-INF/maven/archetype.xml
Modified:
camel/trunk/tooling/archetypes/camel-archetype-component/pom.xml
camel/trunk/tooling/archetypes/camel-archetype-component/src/main/resources/archetype-resources/pom.xml
camel/trunk/tooling/archetypes/camel-archetype-component/src/main/resources/archetype-resources/src/main/java/HelloWorldComponent.java
camel/trunk/tooling/archetypes/camel-archetype-component/src/main/resources/archetype-resources/src/main/java/HelloWorldConsumer.java
camel/trunk/tooling/archetypes/camel-archetype-component/src/main/resources/archetype-resources/src/main/java/HelloWorldEndpoint.java
camel/trunk/tooling/archetypes/camel-archetype-component/src/main/resources/archetype-resources/src/main/java/HelloWorldProducer.java
camel/trunk/tooling/archetypes/camel-archetype-component/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org/apache/camel/component/helloworld
camel/trunk/tooling/archetypes/camel-archetype-component/src/main/resources/archetype-resources/src/test/java/HelloWorldComponentTest.java
Modified: camel/trunk/tooling/archetypes/camel-archetype-component/pom.xml
URL: http://svn.apache.org/viewvc/camel/trunk/tooling/archetypes/camel-archetype-component/pom.xml?rev=1076644&r1=1076643&r2=1076644&view=diff
==============================================================================
--- camel/trunk/tooling/archetypes/camel-archetype-component/pom.xml (original)
+++ camel/trunk/tooling/archetypes/camel-archetype-component/pom.xml Thu Mar 3 14:59:43 2011
@@ -34,33 +34,26 @@
<description>Creates a new Camel component.</description>
<packaging>maven-archetype</packaging>
- <build>
+ <build>
<extensions>
<extension>
<groupId>org.apache.maven.archetype</groupId>
<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 file="${project.build.directory}/classes/archetype-resources/pom.xml" token="$CAMEL_VERSION_REPLACEME$" value="${project.version}" casesensitive="true" />
- <replace file="${project.build.directory}/classes/archetype-resources/pom.xml" token="$MAVEN_COMPILER_PLUGIN_VERSION_REPLACEME$" value="${maven-compiler-plugin-version}" casesensitive="true" />
- </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-component/src/main/resources/META-INF/maven/archetype-metadata.xml
URL: http://svn.apache.org/viewvc/camel/trunk/tooling/archetypes/camel-archetype-component/src/main/resources/META-INF/maven/archetype-metadata.xml?rev=1076644&view=auto
==============================================================================
--- camel/trunk/tooling/archetypes/camel-archetype-component/src/main/resources/META-INF/maven/archetype-metadata.xml (added)
+++ camel/trunk/tooling/archetypes/camel-archetype-component/src/main/resources/META-INF/maven/archetype-metadata.xml Thu Mar 3 14:59:43 2011
@@ -0,0 +1,69 @@
+<?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="slf4j-version">
+ <defaultValue>${slf4j-version}</defaultValue>
+ </requiredProperty>
+ </requiredProperties>
+ <fileSets>
+ <fileSet filtered="true" packaged="true" encoding="UTF-8">
+ <directory>src/main/java</directory>
+ <includes>
+ <include>**/*.java</include>
+ </includes>
+ </fileSet>
+ <fileSet filtered="true" encoding="UTF-8">
+ <directory>src/main/resources</directory>
+ <includes>
+ <include>**/*</include>
+ </includes>
+ </fileSet>
+ <fileSet filtered="true" packaged="true" encoding="UTF-8">
+ <directory>src/test/java</directory>
+ <includes>
+ <include>**/*.java</include>
+ </includes>
+ </fileSet>
+ <fileSet encoding="UTF-8">
+ <directory>src/data</directory>
+ <includes>
+ <include>**/*.xml</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-component/src/main/resources/META-INF/maven/archetype-metadata.xml
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: camel/trunk/tooling/archetypes/camel-archetype-component/src/main/resources/META-INF/maven/archetype-metadata.xml
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: camel/trunk/tooling/archetypes/camel-archetype-component/src/main/resources/META-INF/maven/archetype-metadata.xml
------------------------------------------------------------------------------
svn:mime-type = text/xml
Modified: camel/trunk/tooling/archetypes/camel-archetype-component/src/main/resources/archetype-resources/pom.xml
URL: http://svn.apache.org/viewvc/camel/trunk/tooling/archetypes/camel-archetype-component/src/main/resources/archetype-resources/pom.xml?rev=1076644&r1=1076643&r2=1076644&view=diff
==============================================================================
--- camel/trunk/tooling/archetypes/camel-archetype-component/src/main/resources/archetype-resources/pom.xml (original)
+++ camel/trunk/tooling/archetypes/camel-archetype-component/src/main/resources/archetype-resources/pom.xml Thu Mar 3 14:59:43 2011
@@ -29,10 +29,6 @@
<name>A Camel Component</name>
<url>http://www.myorganization.org</url>
- <properties>
- <camel-version>$CAMEL_VERSION_REPLACEME$</camel-version>
- </properties>
-
<dependencies>
<dependency>
<groupId>org.apache.camel</groupId>
@@ -42,17 +38,22 @@
<!-- for testing -->
<dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.8.1</version>
- <scope>test</scope>
- </dependency>
- <dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-test</artifactId>
<version>${camel-version}</version>
<scope>test</scope>
- </dependency>
+ </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>
@@ -62,7 +63,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
- <version>$MAVEN_COMPILER_PLUGIN_VERSION_REPLACEME$</version>
+ <version>${maven-compiler-plugin-version}</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
Modified: camel/trunk/tooling/archetypes/camel-archetype-component/src/main/resources/archetype-resources/src/main/java/HelloWorldComponent.java
URL: http://svn.apache.org/viewvc/camel/trunk/tooling/archetypes/camel-archetype-component/src/main/resources/archetype-resources/src/main/java/HelloWorldComponent.java?rev=1076644&r1=1076643&r2=1076644&view=diff
==============================================================================
--- camel/trunk/tooling/archetypes/camel-archetype-component/src/main/resources/archetype-resources/src/main/java/HelloWorldComponent.java (original)
+++ camel/trunk/tooling/archetypes/camel-archetype-component/src/main/resources/archetype-resources/src/main/java/HelloWorldComponent.java Thu Mar 3 14:59:43 2011
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package ${packageName};
+package ${package};
import java.util.Map;
Modified: camel/trunk/tooling/archetypes/camel-archetype-component/src/main/resources/archetype-resources/src/main/java/HelloWorldConsumer.java
URL: http://svn.apache.org/viewvc/camel/trunk/tooling/archetypes/camel-archetype-component/src/main/resources/archetype-resources/src/main/java/HelloWorldConsumer.java?rev=1076644&r1=1076643&r2=1076644&view=diff
==============================================================================
--- camel/trunk/tooling/archetypes/camel-archetype-component/src/main/resources/archetype-resources/src/main/java/HelloWorldConsumer.java (original)
+++ camel/trunk/tooling/archetypes/camel-archetype-component/src/main/resources/archetype-resources/src/main/java/HelloWorldConsumer.java Thu Mar 3 14:59:43 2011
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package ${packageName};
+package ${package};
import java.util.Date;
Modified: camel/trunk/tooling/archetypes/camel-archetype-component/src/main/resources/archetype-resources/src/main/java/HelloWorldEndpoint.java
URL: http://svn.apache.org/viewvc/camel/trunk/tooling/archetypes/camel-archetype-component/src/main/resources/archetype-resources/src/main/java/HelloWorldEndpoint.java?rev=1076644&r1=1076643&r2=1076644&view=diff
==============================================================================
--- camel/trunk/tooling/archetypes/camel-archetype-component/src/main/resources/archetype-resources/src/main/java/HelloWorldEndpoint.java (original)
+++ camel/trunk/tooling/archetypes/camel-archetype-component/src/main/resources/archetype-resources/src/main/java/HelloWorldEndpoint.java Thu Mar 3 14:59:43 2011
@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package ${packageName};
+package ${package};
import java.util.List;
import java.util.concurrent.CopyOnWriteArrayList;
Modified: camel/trunk/tooling/archetypes/camel-archetype-component/src/main/resources/archetype-resources/src/main/java/HelloWorldProducer.java
URL: http://svn.apache.org/viewvc/camel/trunk/tooling/archetypes/camel-archetype-component/src/main/resources/archetype-resources/src/main/java/HelloWorldProducer.java?rev=1076644&r1=1076643&r2=1076644&view=diff
==============================================================================
--- camel/trunk/tooling/archetypes/camel-archetype-component/src/main/resources/archetype-resources/src/main/java/HelloWorldProducer.java (original)
+++ camel/trunk/tooling/archetypes/camel-archetype-component/src/main/resources/archetype-resources/src/main/java/HelloWorldProducer.java Thu Mar 3 14:59:43 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.impl.DefaultConsumer;
Modified: camel/trunk/tooling/archetypes/camel-archetype-component/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org/apache/camel/component/helloworld
URL: http://svn.apache.org/viewvc/camel/trunk/tooling/archetypes/camel-archetype-component/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org/apache/camel/component/helloworld?rev=1076644&r1=1076643&r2=1076644&view=diff
==============================================================================
--- camel/trunk/tooling/archetypes/camel-archetype-component/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org/apache/camel/component/helloworld (original)
+++ camel/trunk/tooling/archetypes/camel-archetype-component/src/main/resources/archetype-resources/src/main/resources/META-INF/services/org/apache/camel/component/helloworld Thu Mar 3 14:59:43 2011
@@ -15,4 +15,4 @@
# limitations under the License.
#
-class=${packageName}.HelloWorldComponent
+class=${package}.HelloWorldComponent
Modified: camel/trunk/tooling/archetypes/camel-archetype-component/src/main/resources/archetype-resources/src/test/java/HelloWorldComponentTest.java
URL: http://svn.apache.org/viewvc/camel/trunk/tooling/archetypes/camel-archetype-component/src/main/resources/archetype-resources/src/test/java/HelloWorldComponentTest.java?rev=1076644&r1=1076643&r2=1076644&view=diff
==============================================================================
--- camel/trunk/tooling/archetypes/camel-archetype-component/src/main/resources/archetype-resources/src/test/java/HelloWorldComponentTest.java (original)
+++ camel/trunk/tooling/archetypes/camel-archetype-component/src/main/resources/archetype-resources/src/test/java/HelloWorldComponentTest.java Thu Mar 3 14:59:43 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.builder.RouteBuilder;
import org.apache.camel.component.mock.MockEndpoint;