You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2020/03/23 13:11:23 UTC

[camel-karaf] 02/02: Better Maven POM with maven-jar-plugin configuration specific for OSGi stuff

This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-karaf.git

commit 3c6c507ab25001e35abdc7694ae5aa97ea133949
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon Mar 23 14:10:40 2020 +0100

    Better Maven POM with maven-jar-plugin configuration specific for OSGi stuff
---
 catalog/camel-catalog-provider-karaf/pom.xml  | 15 ++++++
 components/pom.xml                            | 10 ++++
 core/pom.xml                                  | 10 ++++
 platforms/pom.xml                             | 70 +++++++++++++++++++++++++++
 pom.xml                                       | 10 ----
 tooling/camel-karaf-docs-maven-plugin/pom.xml |  2 +-
 6 files changed, 106 insertions(+), 11 deletions(-)

diff --git a/catalog/camel-catalog-provider-karaf/pom.xml b/catalog/camel-catalog-provider-karaf/pom.xml
index 0e16e5b..5a2ea9a 100644
--- a/catalog/camel-catalog-provider-karaf/pom.xml
+++ b/catalog/camel-catalog-provider-karaf/pom.xml
@@ -77,6 +77,21 @@
                 <artifactId>camel-bundle-plugin</artifactId>
             </plugin>
 
+            <!-- update docs -->
+            <plugin>
+                <groupId>org.apache.camel.karaf</groupId>
+                <artifactId>camel-karaf-docs-maven-plugin</artifactId>
+                <version>${project.version}</version>
+                <executions>
+                    <execution>
+                        <goals>
+                            <goal>update-doc-components-list</goal>
+                        </goals>
+                        <phase>process-resources</phase>
+                    </execution>
+                </executions>
+            </plugin>
+
         </plugins>
 
     </build>
diff --git a/components/pom.xml b/components/pom.xml
index 3ad2047..1914ce9 100644
--- a/components/pom.xml
+++ b/components/pom.xml
@@ -97,6 +97,16 @@
                     </execution>
                 </executions>
             </plugin>
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-jar-plugin</artifactId>
+                    <version>${maven-jar-plugin-version}</version>
+                    <configuration>
+                        <archive>
+                            <manifestFile>${camel.osgi.manifest}</manifestFile>
+                        </archive>
+                    </configuration>
+                </plugin>
         </plugins>
     </build>
 
diff --git a/core/pom.xml b/core/pom.xml
index e2e21a4..fcc891b 100644
--- a/core/pom.xml
+++ b/core/pom.xml
@@ -136,6 +136,16 @@
                     </execution>
                 </executions>
             </plugin>
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-jar-plugin</artifactId>
+                    <version>${maven-jar-plugin-version}</version>
+                    <configuration>
+                        <archive>
+                            <manifestFile>${camel.osgi.manifest}</manifestFile>
+                        </archive>
+                    </configuration>
+                </plugin>
         </plugins>
     </build>
 
diff --git a/platforms/pom.xml b/platforms/pom.xml
index 058c6a6..febb293 100644
--- a/platforms/pom.xml
+++ b/platforms/pom.xml
@@ -33,4 +33,74 @@
     <modules>
         <module>karaf</module>
     </modules>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.camel</groupId>
+                <artifactId>camel-bundle-plugin</artifactId>
+                <version>${project.version}</version>
+                <extensions>false</extensions>
+                <configuration>
+                    <supportIncrementalBuild>true</supportIncrementalBuild>
+                    <noWarningProjectTypes>pom</noWarningProjectTypes>
+                    <excludeDependencies>${camel.osgi.exclude.dependencies}</excludeDependencies>
+                    <instructions>
+                        <Bundle-Name>${project.artifactId}</Bundle-Name>
+                        <Bundle-SymbolicName>${camel.osgi.symbolic.name}</Bundle-SymbolicName>
+                        <Bundle-Activator>${camel.osgi.activator}</Bundle-Activator>
+                        <Import-Package>${camel.osgi.import}</Import-Package>
+                        <Export-Package>${camel.osgi.export}</Export-Package>
+                        <DynamicImport-Package>${camel.osgi.dynamic}</DynamicImport-Package>
+                        <Private-Package>${camel.osgi.private.pkg}</Private-Package>
+                        <Require-Capability>${camel.osgi.require.capability}</Require-Capability>
+                        <Provide-Capability>${camel.osgi.provide.capability}</Provide-Capability>
+                        <Implementation-Title>Apache Camel</Implementation-Title>
+                        <Implementation-Version>${project.version}</Implementation-Version>
+                        <Karaf-Info>Camel;${project.artifactId}=${project.version}</Karaf-Info>
+                        <_versionpolicy>${camel.osgi.import.default.version}</_versionpolicy>
+                        <_failok>${camel.osgi.failok}</_failok>
+                        <_removeheaders>Bnd-LastModified</_removeheaders>
+                        <_plugin>
+                            org.apache.felix.bundleplugin.BlueprintPlugin,
+                            aQute.lib.spring.SpringXMLType,
+                            org.apache.felix.bundleplugin.JpaPlugin,
+                            org.apache.camel.maven.bundle.CamelPlugin
+                        </_plugin>
+                    </instructions>
+                </configuration>
+                <executions>
+                    <execution>
+                        <id>versions</id>
+                        <phase>validate</phase>
+                        <goals>
+                            <goal>cleanVersions</goal>
+                        </goals>
+                        <configuration>
+                            <versions>
+                                <camel.osgi.version.clean>${project.version}</camel.osgi.version.clean>
+                            </versions>
+                        </configuration>
+                    </execution>
+                    <execution>
+                        <id>bundle-manifest</id>
+                        <phase>prepare-package</phase>
+                        <goals>
+                            <goal>manifest</goal>
+                        </goals>
+                    </execution>
+                </executions>
+            </plugin>
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-jar-plugin</artifactId>
+                    <version>${maven-jar-plugin-version}</version>
+                    <configuration>
+                        <archive>
+                            <manifestFile>${camel.osgi.manifest}</manifestFile>
+                        </archive>
+                    </configuration>
+                </plugin>
+        </plugins>
+    </build>
 </project>
diff --git a/pom.xml b/pom.xml
index 11c86c8..2faefc6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -895,16 +895,6 @@
                     <encoding>UTF-8</encoding>
                 </configuration>
             </plugin>
-                <plugin>
-                    <groupId>org.apache.maven.plugins</groupId>
-                    <artifactId>maven-jar-plugin</artifactId>
-                    <version>${maven-jar-plugin-version}</version>
-                    <configuration>
-                        <archive>
-                            <manifestFile>${camel.osgi.manifest}</manifestFile>
-                        </archive>
-                    </configuration>
-                </plugin>
         </plugins>
 
         <pluginManagement>
diff --git a/tooling/camel-karaf-docs-maven-plugin/pom.xml b/tooling/camel-karaf-docs-maven-plugin/pom.xml
index 164416a..ff5517f 100644
--- a/tooling/camel-karaf-docs-maven-plugin/pom.xml
+++ b/tooling/camel-karaf-docs-maven-plugin/pom.xml
@@ -28,7 +28,7 @@
     </parent>
 
     <artifactId>camel-karaf-docs-maven-plugin</artifactId>
-    <packaging>jar</packaging>
+    <packaging>maven-plugin</packaging>
     <name>Camel Karaf Tooling :: Docs Maven Plugin</name>
 
     <properties>