You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by gn...@apache.org on 2020/02/05 08:58:44 UTC

[camel] 03/04: Fix components generation

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

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

commit f5fd9ec9da8e23ba9d79cea49211032867a86d30
Author: Guillaume Nodet <gn...@gmail.com>
AuthorDate: Wed Feb 5 09:55:59 2020 +0100

    Fix components generation
---
 components/pom.xml                                                    | 2 ++
 .../main/java/org/apache/camel/maven/packaging/SpiGeneratorMojo.java  | 4 ++--
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/components/pom.xml b/components/pom.xml
index 154ca5d..4007cf8 100644
--- a/components/pom.xml
+++ b/components/pom.xml
@@ -373,6 +373,8 @@
 
     <properties>
         <camel.osgi.manifest>${project.build.outputDirectory}/META-INF/MANIFEST.MF</camel.osgi.manifest>
+
+        <camel-prepare-component>true</camel-prepare-component>
     </properties>
 
     <build>
diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/SpiGeneratorMojo.java b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/SpiGeneratorMojo.java
index d1a4077..a2fb53c 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/SpiGeneratorMojo.java
+++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/SpiGeneratorMojo.java
@@ -193,9 +193,9 @@ public class SpiGeneratorMojo extends AbstractGeneratorMojo {
                 indices.add(new IndexReader(is).read());
             }
             for (String cpe : project.getCompileClasspathElements()) {
-                if (cpe.matches("/camel-[^/]+.jar")) {
+                if (cpe.matches(".*/(camel|spi-annotations)-[^/]+.jar")) {
                     try (JarFile jf = new JarFile(cpe)) {
-                        JarEntry indexEntry = jf.getJarEntry("MANIFEST/jandex.idx");
+                        JarEntry indexEntry = jf.getJarEntry("META-INF/jandex.idx");
                         if (indexEntry != null) {
                             try (InputStream is = jf.getInputStream(indexEntry)) {
                                 indices.add(new IndexReader(is).read());