Repository: camel Updated Branches: refs/heads/master a583dd369 -> b8abe8d43
CAMEL-9787: Migrate Maven Archetypes to new build system Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/b8abe8d4 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/b8abe8d4 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/b8abe8d4 Branch: refs/heads/master Commit: b8abe8d43f5897834e98858e3eaddbe6010a61a0 Parents: 1ddb834 Author: Claus Ibsen <davscl...@apache.org> Authored: Sun Apr 3 10:03:12 2016 +0200 Committer: Claus Ibsen <davscl...@apache.org> Committed: Sun Apr 3 10:03:30 2016 +0200 ---------------------------------------------------------------------- parent/pom.xml | 1 + .../META-INF/maven/archetype-metadata.xml | 33 ++----- .../main/resources/archetype-resources/pom.xml | 94 +++++++++++--------- .../camel-scr-example/archetype.properties | 11 +-- 4 files changed, 67 insertions(+), 72 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/b8abe8d4/parent/pom.xml ---------------------------------------------------------------------- diff --git a/parent/pom.xml b/parent/pom.xml index b169801..b6dde19 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -396,6 +396,7 @@ <maven-resources-plugin-version>2.7</maven-resources-plugin-version> <maven-reporting-api-version>2.2.1</maven-reporting-api-version> <maven-reporting-impl-version>2.0.5</maven-reporting-impl-version> + <maven-scr-plugin-version>1.19.0</maven-scr-plugin-version> <maven-shade-plugin-version>2.4.1</maven-shade-plugin-version> <maven-surefire-report-plugin-version>2.13</maven-surefire-report-plugin-version> <maven-war-plugin-version>2.6</maven-war-plugin-version> http://git-wip-us.apache.org/repos/asf/camel/blob/b8abe8d4/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 b926d12..9dfd796 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 @@ -25,20 +25,17 @@ <requiredProperty key="camel-version"> <defaultValue>${project.version}</defaultValue> </requiredProperty> - <requiredProperty key="commons-lang-version"> - <defaultValue>2.6</defaultValue> - </requiredProperty> - <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> + <defaultValue>${maven-bundle-plugin-version}</defaultValue> + </requiredProperty> + <requiredProperty key="maven-scr-plugin-version"> + <defaultValue>${maven-scr-plugin-version}</defaultValue> + </requiredProperty> + <requiredProperty key="maven-jar-plugin-version"> + <defaultValue>${maven-jar-plugin-version}</defaultValue> </requiredProperty> <requiredProperty key="maven-compiler-plugin-version"> <defaultValue>${maven-compiler-plugin-version}</defaultValue> @@ -46,20 +43,8 @@ <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 key="slf4j-version"> + <defaultValue>${slf4j-version}</defaultValue> </requiredProperty> </requiredProperties> <fileSets> http://git-wip-us.apache.org/repos/asf/camel/blob/b8abe8d4/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 bea2cf2..3a1f799 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 @@ -1,20 +1,20 @@ <?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. - ## ------------------------------------------------------------------------ +## ------------------------------------------------------------------------ +## 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"> @@ -22,51 +22,61 @@ <groupId>${groupId}</groupId> <artifactId>${artifactId}</artifactId> - <packaging>jar</packaging> <version>${version}</version> + <packaging>jar</packaging> - <name>Camel SCR route</name> + <name>A Camel SCR Route</name> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> + + <camel-version>${camel-version}</camel-version> + + <slf4j-version>${slf4j-version}</slf4j-version> + <log4j-version>${log4j-version}</log4j-version> </properties> <dependencies> + + <!-- Camel --> <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-core</artifactId> - <version>${camel-version}</version> + <version>\${camel-version}</version> </dependency> <dependency> <groupId>org.apache.camel</groupId> <artifactId>camel-scr</artifactId> - <version>${camel-version}</version> + <version>\${camel-version}</version> </dependency> - <!-- logging --> + <!-- Testing --> + <dependency> + <groupId>org.apache.camel</groupId> + <artifactId>camel-test</artifactId> + <version>\${camel-version}</version> + <scope>test</scope> + </dependency> <dependency> <groupId>org.slf4j</groupId> - <artifactId>slf4j-api</artifactId> - <version>${slf4j-version}</version> + <artifactId>slf4j-log4j12</artifactId> + <version>\${slf4j-version}</version> + <scope>test</scope> </dependency> <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> - <version>${log4j-version}</version> - </dependency> - - <!-- testing --> - <dependency> - <groupId>org.apache.camel</groupId> - <artifactId>camel-test</artifactId> - <version>${camel-version}</version> + <version>\${log4j-version}</version> <scope>test</scope> </dependency> + </dependencies> <build> <plugins> + + <!-- compiler plugin --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> @@ -85,6 +95,7 @@ </configuration> </plugin> + <!-- to include SRC descriptors in MANIFEST.MF file --> <plugin> <groupId>org.apache.felix</groupId> <artifactId>maven-scr-plugin</artifactId> @@ -99,28 +110,31 @@ </execution> </executions> </plugin> - - <!-- to generate the MANIFEST-FILE of the bundle --> + <!-- to generate the MANIFEST.MF of the bundle --> <plugin> <groupId>org.apache.felix</groupId> <artifactId>maven-bundle-plugin</artifactId> <version>${maven-bundle-plugin-version}</version> - <extensions>true</extensions> + <extensions>false</extensions> <executions> <execution> <id>bundle-manifest</id> - <phase>process-classes</phase> + <phase>prepare-package</phase> <goals> <goal>manifest</goal> </goals> </execution> </executions> + </plugin> + <!-- to include MANIFEST.MF in the bundle --> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-jar-plugin</artifactId> + <version>${maven-jar-plugin-version}</version> <configuration> - <instructions> - <Bundle-SymbolicName>${artifactId}</Bundle-SymbolicName> - <Private-Package>${package}.*</Private-Package> - <Import-Package>*</Import-Package> - </instructions> + <archive> + <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile> + </archive> </configuration> </plugin> http://git-wip-us.apache.org/repos/asf/camel/blob/b8abe8d4/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 9fc70a0..aba6b05 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 @@ -20,15 +20,10 @@ version = 1.0-SNAPSHOT package = example className = CamelScrExample camel-version = ${project.version} -commons-lang-version = 2.6 log4j-version = ${log4j-version} +maven-bundle-plugin-version = ${maven-bundle-plugin-version} maven-compiler-plugin-version = ${maven-compiler-plugin-version} +maven-jar-plugin-version = ${maven-jar-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} +maven-scr-plugin-version = ${maven-scr-plugin-version} slf4j-version = ${slf4j-version}