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 2014/12/30 11:48:37 UTC
[10/11] camel git commit: CAMEL-8189: Corrected package issue in
camel-archetype-scr and aligned properties to other archetypes
CAMEL-8189: Corrected package issue in camel-archetype-scr and aligned properties to other archetypes
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/00b50b45
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/00b50b45
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/00b50b45
Branch: refs/heads/master
Commit: 00b50b45ff68af0252c7e64331970adbf82ad695
Parents: fee22c8
Author: Andrew Block <an...@gmail.com>
Authored: Sun Dec 28 23:52:30 2014 -0500
Committer: Claus Ibsen <da...@apache.org>
Committed: Tue Dec 30 11:47:30 2014 +0100
----------------------------------------------------------------------
.../META-INF/maven/archetype-metadata.xml | 45 +++++++++++---
.../resources/archetype-resources/ReadMe.txt | 4 +-
.../main/resources/archetype-resources/pom.xml | 65 +++++---------------
.../src/main/java/__className__.java | 7 +--
.../main/java/internal/__className__Route.java | 3 +-
.../src/test/java/__className__Test.java | 3 +-
.../camel-scr-example/archetype.properties | 16 ++++-
7 files changed, 74 insertions(+), 69 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/00b50b45/tooling/archetypes/camel-archetype-scr/src/main/resources-filtered/META-INF/maven/archetype-metadata.xml
----------------------------------------------------------------------
diff --git a/tooling/archetypes/camel-archetype-scr/src/main/resources-filtered/META-INF/maven/archetype-metadata.xml b/tooling/archetypes/camel-archetype-scr/src/main/resources-filtered/META-INF/maven/archetype-metadata.xml
index a7d4d09..b926d12 100644
--- a/tooling/archetypes/camel-archetype-scr/src/main/resources-filtered/META-INF/maven/archetype-metadata.xml
+++ b/tooling/archetypes/camel-archetype-scr/src/main/resources-filtered/META-INF/maven/archetype-metadata.xml
@@ -21,17 +21,46 @@
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="archetypeGroupId">
- <defaultValue>${project.groupId}</defaultValue>
+ <requiredProperty key="className"/>
+ <requiredProperty key="camel-version">
+ <defaultValue>${project.version}</defaultValue>
</requiredProperty>
- <requiredProperty key="archetypeArtifactId">
- <defaultValue>${project.artifactId}</defaultValue>
+ <requiredProperty key="commons-lang-version">
+ <defaultValue>2.6</defaultValue>
</requiredProperty>
- <requiredProperty key="archetypeVersion">
- <defaultValue>${project.version}</defaultValue>
+ <requiredProperty key="slf4j-version">
+ <defaultValue>${slf4j-version}</defaultValue>
+ </requiredProperty>
+ <requiredProperty key="log4j-version">
+ <defaultValue>${log4j-version}</defaultValue>
+ </requiredProperty>
+ <requiredProperty key="maven-scm-provider-gitexe-version">
+ <defaultValue>1.9</defaultValue>
+ </requiredProperty>
+ <requiredProperty key="maven-bundle-plugin-version">
+ <defaultValue>${maven-bundle-version}</defaultValue>
+ </requiredProperty>
+ <requiredProperty key="maven-compiler-plugin-version">
+ <defaultValue>${maven-compiler-plugin-version}</defaultValue>
+ </requiredProperty>
+ <requiredProperty key="maven-resources-plugin-version">
+ <defaultValue>${maven-resources-plugin-version}</defaultValue>
+ </requiredProperty>
+ <requiredProperty key="maven-javadoc-plugin-version">
+ <defaultValue>${maven-javadoc-plugin-version}</defaultValue>
+ </requiredProperty>
+ <requiredProperty key="maven-source-plugin-version">
+ <defaultValue>2.3</defaultValue>
+ </requiredProperty>
+ <requiredProperty key="maven-release-plugin-version">
+ <defaultValue>2.5</defaultValue>
+ </requiredProperty>
+ <requiredProperty key="versions-maven-plugin-version">
+ <defaultValue>2.1</defaultValue>
+ </requiredProperty>
+ <requiredProperty key="maven-scr-plugin-version">
+ <defaultValue>1.19.0</defaultValue>
</requiredProperty>
- <requiredProperty key="groupId"/>
- <requiredProperty key="className"/>
</requiredProperties>
<fileSets>
<fileSet filtered="true" packaged="true" encoding="UTF-8">
http://git-wip-us.apache.org/repos/asf/camel/blob/00b50b45/tooling/archetypes/camel-archetype-scr/src/main/resources/archetype-resources/ReadMe.txt
----------------------------------------------------------------------
diff --git a/tooling/archetypes/camel-archetype-scr/src/main/resources/archetype-resources/ReadMe.txt b/tooling/archetypes/camel-archetype-scr/src/main/resources/archetype-resources/ReadMe.txt
index cd78e83..130bb8f 100644
--- a/tooling/archetypes/camel-archetype-scr/src/main/resources/archetype-resources/ReadMe.txt
+++ b/tooling/archetypes/camel-archetype-scr/src/main/resources/archetype-resources/ReadMe.txt
@@ -10,13 +10,13 @@ To deploy this project in Apache Karaf (2.4.0)
On Karaf command line:
# Add Camel feature repository
- features:chooseurl camel ${archetypeVersion}
+ features:chooseurl camel ${version}
# Install camel-scr feature
features:install camel-scr
# Install commons-lang, used in the example route to validate parameters
- osgi:install mvn:commons-lang/commons-lang/2.6
+ osgi:install mvn:commons-lang/commons-lang/${commons-lang-version}
# Install and start your bundle
osgi:install -s mvn:${groupId}/${artifactId}/${version}
http://git-wip-us.apache.org/repos/asf/camel/blob/00b50b45/tooling/archetypes/camel-archetype-scr/src/main/resources/archetype-resources/pom.xml
----------------------------------------------------------------------
diff --git a/tooling/archetypes/camel-archetype-scr/src/main/resources/archetype-resources/pom.xml b/tooling/archetypes/camel-archetype-scr/src/main/resources/archetype-resources/pom.xml
index 5a4228a..1a1e0f3 100644
--- a/tooling/archetypes/camel-archetype-scr/src/main/resources/archetype-resources/pom.xml
+++ b/tooling/archetypes/camel-archetype-scr/src/main/resources/archetype-resources/pom.xml
@@ -15,9 +15,6 @@
## See the License for the specific language governing permissions and
## limitations under the License.
## ------------------------------------------------------------------------
-<!--
-This file was generated from ${archetypeGroupId}/${archetypeArtifactId}/${archetypeVersion}
--->
<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">
@@ -28,14 +25,8 @@ This file was generated from ${archetypeGroupId}/${archetypeArtifactId}/${archet
<packaging>bundle</packaging>
<version>${version}</version>
- <name>${project.artifactId}</name>
- <url>http://www.myorganization.org</url>
-
- <scm>
- <connection>${my.scm.url}/${project.artifactId}.git</connection>
- <developerConnection>${my.scm.url}/${project.artifactId}.git</developerConnection>
- <tag>HEAD</tag>
- </scm>
+ <name>A Camel Route</name>
+ <url>http://www.myorganization.org</url>
<prerequisites>
<maven>3.0.4</maven>
@@ -44,33 +35,8 @@ This file was generated from ${archetypeGroupId}/${archetypeArtifactId}/${archet
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
- <camel-version>${archetypeVersion}</camel-version>
</properties>
- <distributionManagement>
- <repository>
- <id>release_deployment</id>
- <name>Internal Releases</name>
- <url>${my.release.url}</url>
- </repository>
- <snapshotRepository>
- <id>snapshot_deployment</id>
- <name>Internal Snapshots</name>
- <url>${my.snapshot.url}</url>
- </snapshotRepository>
- </distributionManagement>
-
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.apache.karaf</groupId>
- <artifactId>karaf</artifactId>
- <version>2.4.0</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- </dependencies>
- </dependencyManagement>
<dependencies>
<dependency>
@@ -81,21 +47,24 @@ This file was generated from ${archetypeGroupId}/${archetypeArtifactId}/${archet
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-scr</artifactId>
- <version>${archetypeVersion}</version>
+ <version>${camel-version}</version>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
+ <version>${commons-lang-version}</version>
</dependency>
<!-- logging -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
+ <version>${slf4j-version}</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
+ <version>${log4j-version}</version>
</dependency>
<!-- testing -->
@@ -112,7 +81,7 @@ This file was generated from ${archetypeGroupId}/${archetypeArtifactId}/${archet
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
- <version>3.1</version>
+ <version>${maven-compiler-plugin-version}</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
@@ -121,7 +90,7 @@ This file was generated from ${archetypeGroupId}/${archetypeArtifactId}/${archet
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
- <version>2.6</version>
+ <version>${maven-resources-plugin-version}</version>
<configuration>
<encoding>UTF-8</encoding>
</configuration>
@@ -129,34 +98,34 @@ This file was generated from ${archetypeGroupId}/${archetypeArtifactId}/${archet
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
- <version>2.3</version>
+ <version>${maven-source-plugin-version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
- <version>2.9.1</version>
+ <version>${maven-javadoc-plugin-version}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
- <version>2.5</version>
+ <version>${maven-release-plugin-version}</version>
<dependencies>
<dependency>
<groupId>org.apache.maven.scm</groupId>
<artifactId>maven-scm-provider-gitexe</artifactId>
- <version>1.9</version>
+ <version>${maven-scm-provider-gitexe-version}</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
- <version>2.1</version>
+ <version>${versions-maven-plugin-version}</version>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-scr-plugin</artifactId>
- <version>1.19.0</version>
+ <version>${maven-scr-plugin-version}</version>
<executions>
<execution>
<id>generate-scr-scrdescriptor</id>
@@ -170,14 +139,14 @@ This file was generated from ${archetypeGroupId}/${archetypeArtifactId}/${archet
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
- <version>2.4.0</version>
+ <version>${maven-bundle-plugin-version}</version>
<extensions>true</extensions>
<configuration>
<instructions>
<Export-Package/>
<Private-Package>
- ${groupId},
- ${groupId}.*
+ ${package},
+ ${package}.*
</Private-Package>
</instructions>
</configuration>
http://git-wip-us.apache.org/repos/asf/camel/blob/00b50b45/tooling/archetypes/camel-archetype-scr/src/main/resources/archetype-resources/src/main/java/__className__.java
----------------------------------------------------------------------
diff --git a/tooling/archetypes/camel-archetype-scr/src/main/resources/archetype-resources/src/main/java/__className__.java b/tooling/archetypes/camel-archetype-scr/src/main/resources/archetype-resources/src/main/java/__className__.java
index 3f50d60..c07f61f 100644
--- a/tooling/archetypes/camel-archetype-scr/src/main/resources/archetype-resources/src/main/java/__className__.java
+++ b/tooling/archetypes/camel-archetype-scr/src/main/resources/archetype-resources/src/main/java/__className__.java
@@ -17,14 +17,13 @@
## See the License for the specific language governing permissions and
## limitations under the License.
## ------------------------------------------------------------------------
-// This file was generated from ${archetypeGroupId}/${archetypeArtifactId}/${archetypeVersion}
-package ${groupId};
+package ${package};
import java.util.ArrayList;
import java.util.List;
import org.apache.camel.scr.AbstractCamelRunner;
-import ${groupId}.internal.${className}Route;
+import ${package}.internal.${className}Route;
import org.apache.camel.RoutesBuilder;
import org.apache.camel.spi.ComponentResolver;
import org.apache.felix.scr.annotations.*;
@@ -50,7 +49,7 @@ import org.apache.felix.scr.annotations.*;
})
public class ${className} extends AbstractCamelRunner {
- public static final String COMPONENT_LABEL = "${groupId}.${className}";
+ public static final String COMPONENT_LABEL = "${package}.${className}";
public static final String COMPONENT_DESCRIPTION = "This is the description for ${artifactId}.";
@Override
http://git-wip-us.apache.org/repos/asf/camel/blob/00b50b45/tooling/archetypes/camel-archetype-scr/src/main/resources/archetype-resources/src/main/java/internal/__className__Route.java
----------------------------------------------------------------------
diff --git a/tooling/archetypes/camel-archetype-scr/src/main/resources/archetype-resources/src/main/java/internal/__className__Route.java b/tooling/archetypes/camel-archetype-scr/src/main/resources/archetype-resources/src/main/java/internal/__className__Route.java
index 04d85d3..54b3de7 100644
--- a/tooling/archetypes/camel-archetype-scr/src/main/resources/archetype-resources/src/main/java/internal/__className__Route.java
+++ b/tooling/archetypes/camel-archetype-scr/src/main/resources/archetype-resources/src/main/java/internal/__className__Route.java
@@ -17,8 +17,7 @@
## See the License for the specific language governing permissions and
## limitations under the License.
## ------------------------------------------------------------------------
-// This file was generated from ${archetypeGroupId}/${archetypeArtifactId}/${archetypeVersion}
-package ${groupId}.internal;
+package ${package}.internal;
import org.apache.camel.LoggingLevel;
import org.apache.camel.builder.RouteBuilder;
http://git-wip-us.apache.org/repos/asf/camel/blob/00b50b45/tooling/archetypes/camel-archetype-scr/src/main/resources/archetype-resources/src/test/java/__className__Test.java
----------------------------------------------------------------------
diff --git a/tooling/archetypes/camel-archetype-scr/src/main/resources/archetype-resources/src/test/java/__className__Test.java b/tooling/archetypes/camel-archetype-scr/src/main/resources/archetype-resources/src/test/java/__className__Test.java
index b9791eb..65c0127 100644
--- a/tooling/archetypes/camel-archetype-scr/src/main/resources/archetype-resources/src/test/java/__className__Test.java
+++ b/tooling/archetypes/camel-archetype-scr/src/main/resources/archetype-resources/src/test/java/__className__Test.java
@@ -17,8 +17,7 @@
## See the License for the specific language governing permissions and
## limitations under the License.
## ------------------------------------------------------------------------
-// This file was generated from ${archetypeGroupId}/${archetypeArtifactId}/${archetypeVersion}
-package ${groupId};
+package ${package};
import java.util.List;
http://git-wip-us.apache.org/repos/asf/camel/blob/00b50b45/tooling/archetypes/camel-archetype-scr/src/test/resources/projects/camel-scr-example/archetype.properties
----------------------------------------------------------------------
diff --git a/tooling/archetypes/camel-archetype-scr/src/test/resources/projects/camel-scr-example/archetype.properties b/tooling/archetypes/camel-archetype-scr/src/test/resources/projects/camel-scr-example/archetype.properties
index ab56cf8..9fc70a0 100644
--- a/tooling/archetypes/camel-archetype-scr/src/test/resources/projects/camel-scr-example/archetype.properties
+++ b/tooling/archetypes/camel-archetype-scr/src/test/resources/projects/camel-scr-example/archetype.properties
@@ -19,6 +19,16 @@ artifactId = camel-scr-example
version = 1.0-SNAPSHOT
package = example
className = CamelScrExample
-archetypeGroupId = ${project.groupId}
-archetypeArtifactId = ${project.artifactId}
-archetypeVersion = ${project.version}
+camel-version = ${project.version}
+commons-lang-version = 2.6
+log4j-version = ${log4j-version}
+maven-compiler-plugin-version = ${maven-compiler-plugin-version}
+maven-resources-plugin-version = ${maven-resources-plugin-version}
+maven-javadoc-plugin-version = ${maven-javadoc-plugin-version}
+maven-source-plugin-version = 2.3
+maven-release-plugin-version = 2.5
+maven-scm-provider-gitexe-version = 1.9
+versions-maven-plugin-version = 2.1
+maven-scr-plugin-version = 1.19.0
+maven-bundle-plugin-version = ${maven-bundle-version}
+slf4j-version = ${slf4j-version}