This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git
commit 0e12ba3f538da3669e10198cdbb849f2b988889f Author: Claus Ibsen <claus.ib...@gmail.com> AuthorDate: Sun May 24 17:46:37 2020 +0200 CAMEL-15043: Polished Camel Maven archetypes --- .../META-INF/maven/archetype-metadata.xml | 3 -- .../src/main/resources/archetype-resources/pom.xml | 23 +---------- .../src/main/resources/archetype-resources/pom.xml | 46 +++++++++++++++++----- .../META-INF/maven/archetype-metadata.xml | 3 -- .../src/main/resources/archetype-resources/pom.xml | 12 +++--- .../META-INF/maven/archetype-metadata.xml | 12 ------ .../src/main/resources/archetype-resources/pom.xml | 9 +++++ 7 files changed, 52 insertions(+), 56 deletions(-) diff --git a/archetypes/camel-archetype-component/src/main/resources-filtered/META-INF/maven/archetype-metadata.xml b/archetypes/camel-archetype-component/src/main/resources-filtered/META-INF/maven/archetype-metadata.xml index 4cdc5b5..ca6ce58 100644 --- a/archetypes/camel-archetype-component/src/main/resources-filtered/META-INF/maven/archetype-metadata.xml +++ b/archetypes/camel-archetype-component/src/main/resources-filtered/META-INF/maven/archetype-metadata.xml @@ -35,9 +35,6 @@ <requiredProperty key="maven-resources-plugin-version"> <defaultValue>${maven-resources-plugin-version}</defaultValue> </requiredProperty> - <requiredProperty key="camel-bundle-plugin-version"> - <defaultValue>${camel-bundle-plugin-version}</defaultValue> - </requiredProperty> <requiredProperty key="slf4j-version"> <defaultValue>${slf4j-version}</defaultValue> </requiredProperty> diff --git a/archetypes/camel-archetype-component/src/main/resources/archetype-resources/pom.xml b/archetypes/camel-archetype-component/src/main/resources/archetype-resources/pom.xml index 967d6c63..4a58e74 100644 --- a/archetypes/camel-archetype-component/src/main/resources/archetype-resources/pom.xml +++ b/archetypes/camel-archetype-component/src/main/resources/archetype-resources/pom.xml @@ -92,7 +92,7 @@ </configuration> </plugin> - <!-- generate components meta-data --> + <!-- generate camel meta-data --> <plugin> <groupId>org.apache.camel</groupId> <artifactId>camel-package-maven-plugin</artifactId> @@ -131,27 +131,6 @@ </executions> </plugin> - <!-- OSGi support (remove if not using OSGi) --> - <plugin> - <groupId>org.apache.camel</groupId> - <artifactId>camel-bundle-plugin</artifactId> - <version>${camelVersion}</version> - <configuration> - <instructions> - <Bundle-SymbolicName>${groupId}.${artifactId}</Bundle-SymbolicName> - <Export-Service>org.apache.camel.spi.ComponentResolver;component=${scheme}</Export-Service> - </instructions> - </configuration> - <executions> - <execution> - <id>bundle-manifest</id> - <phase>prepare-package</phase> - <goals> - <goal>manifest</goal> - </goals> - </execution> - </executions> - </plugin> </plugins> </build> diff --git a/archetypes/camel-archetype-dataformat/src/main/resources/archetype-resources/pom.xml b/archetypes/camel-archetype-dataformat/src/main/resources/archetype-resources/pom.xml index 96876af..3e956ae 100644 --- a/archetypes/camel-archetype-dataformat/src/main/resources/archetype-resources/pom.xml +++ b/archetypes/camel-archetype-dataformat/src/main/resources/archetype-resources/pom.xml @@ -48,7 +48,7 @@ <dependency> <groupId>org.apache.camel</groupId> - <artifactId>camel-core</artifactId> + <artifactId>camel-support</artifactId> </dependency> <!-- logging --> @@ -90,17 +90,43 @@ </configuration> </plugin> - <!-- to generate the MANIFEST-FILE of the bundle --> + <!-- generate camel meta-data --> <plugin> <groupId>org.apache.camel</groupId> - <artifactId>camel-bundle-plugin</artifactId> - <version>${camelVersion}</version> - <configuration> - <instructions> - <Bundle-SymbolicName>${groupId}.${artifactId}</Bundle-SymbolicName> - <Export-Service>org.apache.camel.spi.DataFormatResolver;dataformat=${scheme}</Export-Service> - </instructions> - </configuration> + <artifactId>camel-package-maven-plugin</artifactId> + <version>${camel-version}</version> + <executions> + <execution> + <id>generate</id> + <goals> + <goal>generate-component</goal> + </goals> + <phase>process-classes</phase> + </execution> + </executions> + </plugin> + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>build-helper-maven-plugin</artifactId> + <executions> + <execution> + <phase>initialize</phase> + <goals> + <goal>add-source</goal> + <goal>add-resource</goal> + </goals> + <configuration> + <sources> + <source>src/generated/java</source> + </sources> + <resources> + <resource> + <directory>src/generated/resources</directory> + </resource> + </resources> + </configuration> + </execution> + </executions> </plugin> </plugins> diff --git a/archetypes/camel-archetype-java/src/main/resources-filtered/META-INF/maven/archetype-metadata.xml b/archetypes/camel-archetype-java/src/main/resources-filtered/META-INF/maven/archetype-metadata.xml index dbd20db..f548a55 100644 --- a/archetypes/camel-archetype-java/src/main/resources-filtered/META-INF/maven/archetype-metadata.xml +++ b/archetypes/camel-archetype-java/src/main/resources-filtered/META-INF/maven/archetype-metadata.xml @@ -24,9 +24,6 @@ <requiredProperty key="camel-version"> <defaultValue>${project.version}</defaultValue> </requiredProperty> - <requiredProperty key="exec-maven-plugin-version"> - <defaultValue>${exec-maven-plugin-version}</defaultValue> - </requiredProperty> <requiredProperty key="maven-compiler-plugin-version"> <defaultValue>${maven-compiler-plugin-version}</defaultValue> </requiredProperty> diff --git a/archetypes/camel-archetype-java/src/main/resources/archetype-resources/pom.xml b/archetypes/camel-archetype-java/src/main/resources/archetype-resources/pom.xml index f790759..d488658 100644 --- a/archetypes/camel-archetype-java/src/main/resources/archetype-resources/pom.xml +++ b/archetypes/camel-archetype-java/src/main/resources/archetype-resources/pom.xml @@ -95,14 +95,14 @@ </configuration> </plugin> - <!-- Allows the example to be run via 'mvn compile exec:java' --> + <!-- Allows the example to be run via 'mvn camel:run' --> <plugin> - <groupId>org.codehaus.mojo</groupId> - <artifactId>exec-maven-plugin</artifactId> - <version>${exec-maven-plugin-version}</version> + <groupId>org.apache.camel</groupId> + <artifactId>camel-maven-plugin</artifactId> + <version>${camel-version}</version> <configuration> - <mainClass>${package}.MainApp</mainClass> - <includePluginDependencies>false</includePluginDependencies> + <logClasspath>true</logClasspath> + <mainClass>${package}.MyApplication</mainClass> </configuration> </plugin> diff --git a/archetypes/camel-archetype-spring-boot/src/main/resources-filtered/META-INF/maven/archetype-metadata.xml b/archetypes/camel-archetype-spring-boot/src/main/resources-filtered/META-INF/maven/archetype-metadata.xml index fe2e747..ba5c861 100644 --- a/archetypes/camel-archetype-spring-boot/src/main/resources-filtered/META-INF/maven/archetype-metadata.xml +++ b/archetypes/camel-archetype-spring-boot/src/main/resources-filtered/META-INF/maven/archetype-metadata.xml @@ -27,21 +27,9 @@ <requiredProperty key="spring-boot-version"> <defaultValue>${spring-boot-version}</defaultValue> </requiredProperty> - <requiredProperty key="log4j-version"> - <defaultValue>${log4j-version}</defaultValue> - </requiredProperty> - <requiredProperty key="maven-war-plugin-version"> - <defaultValue>${maven-war-plugin-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="slf4j-version"> - <defaultValue>${slf4j-version}</defaultValue> - </requiredProperty> </requiredProperties> <fileSets> <fileSet filtered="true" packaged="true" encoding="UTF-8"> diff --git a/archetypes/camel-archetype-spring-boot/src/main/resources/archetype-resources/pom.xml b/archetypes/camel-archetype-spring-boot/src/main/resources/archetype-resources/pom.xml index cb20660..d300343 100644 --- a/archetypes/camel-archetype-spring-boot/src/main/resources/archetype-resources/pom.xml +++ b/archetypes/camel-archetype-spring-boot/src/main/resources/archetype-resources/pom.xml @@ -102,6 +102,15 @@ <build> <plugins> <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <version>${maven-compiler-plugin-version}</version> + <configuration> + <source>1.8</source> + <target>1.8</target> + </configuration> + </plugin> + <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <version>${spring.boot-version}</version>