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/1ddb834e Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/1ddb834e Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/1ddb834e Branch: refs/heads/master Commit: 1ddb834e327aab28c114f3faf389b08079aef8ab Parents: 1783b28 Author: Claus Ibsen <davscl...@apache.org> Authored: Sun Apr 3 09:50:36 2016 +0200 Committer: Claus Ibsen <davscl...@apache.org> Committed: Sun Apr 3 10:03:30 2016 +0200 ---------------------------------------------------------------------- .../main/resources/archetype-resources/pom.xml | 7 +- .../META-INF/maven/archetype-metadata.xml | 5 +- .../main/resources/archetype-resources/pom.xml | 81 ++++++++++++-------- 3 files changed, 56 insertions(+), 37 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/1ddb834e/tooling/archetypes/camel-archetype-blueprint/src/main/resources/archetype-resources/pom.xml ---------------------------------------------------------------------- diff --git a/tooling/archetypes/camel-archetype-blueprint/src/main/resources/archetype-resources/pom.xml b/tooling/archetypes/camel-archetype-blueprint/src/main/resources/archetype-resources/pom.xml index 9e9d02d..c089534 100644 --- a/tooling/archetypes/camel-archetype-blueprint/src/main/resources/archetype-resources/pom.xml +++ b/tooling/archetypes/camel-archetype-blueprint/src/main/resources/archetype-resources/pom.xml @@ -15,7 +15,8 @@ ## 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> @@ -24,7 +25,7 @@ <version>${version}</version> <packaging>jar</packaging> - <name>Camel Blueprint Route</name> + <name>A Camel Blueprint Route</name> <properties> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> @@ -122,7 +123,7 @@ </configuration> </plugin> - <!-- to run the example using mvn camel:run --> + <!-- to run the example using mvn camel:run --> <plugin> <groupId>org.apache.camel</groupId> <artifactId>camel-maven-plugin</artifactId> http://git-wip-us.apache.org/repos/asf/camel/blob/1ddb834e/tooling/archetypes/camel-archetype-spring-dm/src/main/resources-filtered/META-INF/maven/archetype-metadata.xml ---------------------------------------------------------------------- diff --git a/tooling/archetypes/camel-archetype-spring-dm/src/main/resources-filtered/META-INF/maven/archetype-metadata.xml b/tooling/archetypes/camel-archetype-spring-dm/src/main/resources-filtered/META-INF/maven/archetype-metadata.xml index ac6b834..55c6c36 100644 --- a/tooling/archetypes/camel-archetype-spring-dm/src/main/resources-filtered/META-INF/maven/archetype-metadata.xml +++ b/tooling/archetypes/camel-archetype-spring-dm/src/main/resources-filtered/META-INF/maven/archetype-metadata.xml @@ -34,7 +34,10 @@ <defaultValue>${maven-resources-plugin-version}</defaultValue> </requiredProperty> <requiredProperty key="maven-bundle-plugin-version"> - <defaultValue>${maven-bundle-version}</defaultValue> + <defaultValue>${maven-bundle-plugin-version}</defaultValue> + </requiredProperty> + <requiredProperty key="maven-jar-plugin-version"> + <defaultValue>${maven-jar-plugin-version}</defaultValue> </requiredProperty> <requiredProperty key="slf4j-version"> <defaultValue>${slf4j-version}</defaultValue> http://git-wip-us.apache.org/repos/asf/camel/blob/1ddb834e/tooling/archetypes/camel-archetype-spring-dm/src/main/resources/archetype-resources/pom.xml ---------------------------------------------------------------------- diff --git a/tooling/archetypes/camel-archetype-spring-dm/src/main/resources/archetype-resources/pom.xml b/tooling/archetypes/camel-archetype-spring-dm/src/main/resources/archetype-resources/pom.xml index 8063266..55f11d7 100644 --- a/tooling/archetypes/camel-archetype-spring-dm/src/main/resources/archetype-resources/pom.xml +++ b/tooling/archetypes/camel-archetype-spring-dm/src/main/resources/archetype-resources/pom.xml @@ -21,59 +21,61 @@ <groupId>${groupId}</groupId> <artifactId>${artifactId}</artifactId> - <packaging>jar</packaging> <version>${version}</version> + <packaging>jar</packaging> <name>A Camel Spring-DM Route</name> - <url>http://www.myorganization.org</url> <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-spring</artifactId> - <version>${camel-version}</version> + <version>\${camel-version}</version> </dependency> - <!-- logging --> + <!-- Testing --> <dependency> - <groupId>org.slf4j</groupId> - <artifactId>slf4j-api</artifactId> - <version>${slf4j-version}</version> + <groupId>org.apache.camel</groupId> + <artifactId>camel-test-spring</artifactId> + <version>\${camel-version}</version> + <scope>test</scope> </dependency> <dependency> <groupId>org.slf4j</groupId> <artifactId>slf4j-log4j12</artifactId> - <version>${slf4j-version}</version> + <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-spring</artifactId> - <version>${camel-version}</version> + <version>\${log4j-version}</version> <scope>test</scope> </dependency> + </dependencies> <build> - <defaultGoal>install</defaultGoal> - <plugins> + + <!-- compiler plugin --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> @@ -92,27 +94,40 @@ </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> - - <!-- 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>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> + + <!-- to run the example using mvn camel:run --> + <plugin> + <groupId>org.apache.camel</groupId> + <artifactId>camel-maven-plugin</artifactId> + <version>\${camel-version}</version> + </plugin> </plugins> </build>