You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2020/12/06 11:37:52 UTC
[camel] branch master updated: CAMEL-15854: camel-allcomponents
should also include other components. CAMEL-15854: prepare apache camel
assembly during build of catalog CAMEL-15854: apache assembly to use
camel-allcomponents as source
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
The following commit(s) were added to refs/heads/master by this push:
new 1a935d5 CAMEL-15854: camel-allcomponents should also include other components. CAMEL-15854: prepare apache camel assembly during build of catalog CAMEL-15854: apache assembly to use camel-allcomponents as source
1a935d5 is described below
commit 1a935d51cd9a33c9659c9fd2f0290b36f5f2acc8
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Sun Dec 6 12:34:24 2020 +0100
CAMEL-15854: camel-allcomponents should also include other components.
CAMEL-15854: prepare apache camel assembly during build of catalog
CAMEL-15854: apache assembly to use camel-allcomponents as source
---
apache-camel/src/main/descriptors/common-bin.xml | 11 +-
catalog/camel-catalog/pom.xml | 4 +-
core/camel-allcomponents/pom.xml | 220 ++++++++++++++++++++-
parent/pom.xml | 15 +-
...eleasePomMojo.java => PrepareAssemblyMojo.java} | 69 +++----
.../maven/packaging/PrepareComponentMojo.java | 11 +-
6 files changed, 269 insertions(+), 61 deletions(-)
diff --git a/apache-camel/src/main/descriptors/common-bin.xml b/apache-camel/src/main/descriptors/common-bin.xml
index 0c6a863..66e092a 100644
--- a/apache-camel/src/main/descriptors/common-bin.xml
+++ b/apache-camel/src/main/descriptors/common-bin.xml
@@ -26,7 +26,6 @@
<scope>runtime</scope>
<includes>
<!-- camel core -->
- <include>org.apache.camel:apt</include>
<include>org.apache.camel:camel-api</include>
<include>org.apache.camel:camel-util</include>
<include>org.apache.camel:camel-management-api</include>
@@ -52,6 +51,7 @@
<include>org.apache.camel:camel-caffeine-lrucache</include>
<include>org.apache.camel:camel-xml-io</include>
<include>org.apache.camel:camel-xml-jaxb</include>
+ <include>org.apache.camel:camel-xml-jaxp</include>
<!-- NOTE: auto-generated list of components when building camel catalog -->
<!-- camel components: START -->
@@ -66,6 +66,7 @@
<include>org.apache.camel:camel-as2-api</include>
<include>org.apache.camel:camel-asn1</include>
<include>org.apache.camel:camel-asterisk</include>
+ <include>org.apache.camel:camel-atlasmap</include>
<include>org.apache.camel:camel-atmos</include>
<include>org.apache.camel:camel-atmosphere-websocket</include>
<include>org.apache.camel:camel-atom</include>
@@ -140,16 +141,19 @@
<include>org.apache.camel:camel-consul</include>
<include>org.apache.camel:camel-controlbus</include>
<include>org.apache.camel:camel-corda</include>
+ <include>org.apache.camel:camel-core-languages</include>
<include>org.apache.camel:camel-couchbase</include>
<include>org.apache.camel:camel-couchdb</include>
<include>org.apache.camel:camel-cron</include>
<include>org.apache.camel:camel-crypto</include>
<include>org.apache.camel:camel-crypto-cms</include>
+ <include>org.apache.camel:camel-csimple-joor</include>
<include>org.apache.camel:camel-csv</include>
<include>org.apache.camel:camel-cxf</include>
<include>org.apache.camel:camel-cxf-transport</include>
<include>org.apache.camel:camel-dataformat</include>
<include>org.apache.camel:camel-dataset</include>
+ <include>org.apache.camel:camel-datasonnet</include>
<include>org.apache.camel:camel-debezium-common</include>
<include>org.apache.camel:camel-debezium-mongodb</include>
<include>org.apache.camel:camel-debezium-mysql</include>
@@ -168,7 +172,6 @@
<include>org.apache.camel:camel-ehcache</include>
<include>org.apache.camel:camel-elasticsearch-rest</include>
<include>org.apache.camel:camel-elsql</include>
- <include>org.apache.camel:camel-elytron</include>
<include>org.apache.camel:camel-etcd</include>
<include>org.apache.camel:camel-etcd3</include>
<include>org.apache.camel:camel-exec</include>
@@ -239,12 +242,14 @@
<include>org.apache.camel:camel-johnzon</include>
<include>org.apache.camel:camel-jolt</include>
<include>org.apache.camel:camel-jooq</include>
+ <include>org.apache.camel:camel-joor</include>
<include>org.apache.camel:camel-jpa</include>
<include>org.apache.camel:camel-jsch</include>
<include>org.apache.camel:camel-jslt</include>
<include>org.apache.camel:camel-json-validator</include>
<include>org.apache.camel:camel-jsonapi</include>
<include>org.apache.camel:camel-jsonata</include>
+ <include>org.apache.camel:camel-jsonb</include>
<include>org.apache.camel:camel-jsonpath</include>
<include>org.apache.camel:camel-jt400</include>
<include>org.apache.camel:camel-jta</include>
@@ -255,6 +260,7 @@
<include>org.apache.camel:camel-ldap</include>
<include>org.apache.camel:camel-ldif</include>
<include>org.apache.camel:camel-leveldb</include>
+ <include>org.apache.camel:camel-leveldb-legacy</include>
<include>org.apache.camel:camel-log</include>
<include>org.apache.camel:camel-lra</include>
<include>org.apache.camel:camel-lucene</include>
@@ -403,6 +409,7 @@
<include>org.apache.camel:camel-workday</include>
<include>org.apache.camel:camel-xchange</include>
<include>org.apache.camel:camel-xj</include>
+ <include>org.apache.camel:camel-xml-jaxp</include>
<include>org.apache.camel:camel-xmlsecurity</include>
<include>org.apache.camel:camel-xmpp</include>
<include>org.apache.camel:camel-xpath</include>
diff --git a/catalog/camel-catalog/pom.xml b/catalog/camel-catalog/pom.xml
index 345e84f..cf3b7dc 100644
--- a/catalog/camel-catalog/pom.xml
+++ b/catalog/camel-catalog/pom.xml
@@ -121,9 +121,11 @@
<artifactId>camel-package-maven-plugin</artifactId>
<executions>
<execution>
- <!-- prepare the catalog, readme files, etc. -->
<goals>
+ <!-- prepare the catalog, readme files, etc. -->
<goal>prepare-catalog</goal>
+ <!-- prepare apache-camel assembly -->
+ <goal>prepare-assembly</goal>
</goals>
<phase>process-resources</phase>
</execution>
diff --git a/core/camel-allcomponents/pom.xml b/core/camel-allcomponents/pom.xml
index dba0b8e..ea655fc 100644
--- a/core/camel-allcomponents/pom.xml
+++ b/core/camel-allcomponents/pom.xml
@@ -64,6 +64,10 @@
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
+ <artifactId>camel-as2-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
<artifactId>camel-as2</artifactId>
</dependency>
<dependency>
@@ -96,6 +100,10 @@
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
+ <artifactId>camel-attachments</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
<artifactId>camel-avro-rpc</artifactId>
</dependency>
<dependency>
@@ -176,6 +184,10 @@
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
+ <artifactId>camel-aws-xray</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
<artifactId>camel-aws2-athena</artifactId>
</dependency>
<dependency>
@@ -300,6 +312,10 @@
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
+ <artifactId>camel-box-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
<artifactId>camel-box</artifactId>
</dependency>
<dependency>
@@ -324,6 +340,10 @@
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
+ <artifactId>camel-cdi</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
<artifactId>camel-chatscript</artifactId>
</dependency>
<dependency>
@@ -360,10 +380,6 @@
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
- <artifactId>camel-core-languages</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
<artifactId>camel-couchbase</artifactId>
</dependency>
<dependency>
@@ -384,10 +400,18 @@
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
+ <artifactId>camel-csimple-joor</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
<artifactId>camel-csv</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
+ <artifactId>camel-cxf-transport</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
<artifactId>camel-cxf</artifactId>
</dependency>
<dependency>
@@ -404,6 +428,10 @@
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
+ <artifactId>camel-debezium-common</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
<artifactId>camel-debezium-mongodb</artifactId>
</dependency>
<dependency>
@@ -472,6 +500,10 @@
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
+ <artifactId>camel-etcd3</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
<artifactId>camel-etcd</artifactId>
</dependency>
<dependency>
@@ -488,6 +520,10 @@
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
+ <artifactId>camel-fhir-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
<artifactId>camel-fhir</artifactId>
</dependency>
<dependency>
@@ -604,14 +640,30 @@
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
+ <artifactId>camel-headersmap</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
<artifactId>camel-hl7</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
+ <artifactId>camel-http-base</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-http-common</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
<artifactId>camel-http</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
+ <artifactId>camel-hystrix</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
<artifactId>camel-ical</artifactId>
</dependency>
<dependency>
@@ -656,6 +708,10 @@
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
+ <artifactId>camel-jasypt</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
<artifactId>camel-jaxb</artifactId>
</dependency>
<dependency>
@@ -680,6 +736,10 @@
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
+ <artifactId>camel-jetty-common</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
<artifactId>camel-jetty</artifactId>
</dependency>
<dependency>
@@ -760,6 +820,10 @@
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
+ <artifactId>camel-jta</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
<artifactId>camel-kafka</artifactId>
</dependency>
<dependency>
@@ -784,10 +848,22 @@
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
+ <artifactId>camel-leveldb-legacy</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-leveldb</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
<artifactId>camel-log</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
+ <artifactId>camel-lra</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
<artifactId>camel-lucene</artifactId>
</dependency>
<dependency>
@@ -816,6 +892,18 @@
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
+ <artifactId>camel-microprofile-config</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-microprofile-fault-tolerance</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-microprofile-health</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
<artifactId>camel-microprofile-metrics</artifactId>
</dependency>
<dependency>
@@ -896,18 +984,38 @@
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
+ <artifactId>camel-olingo2-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
<artifactId>camel-olingo2</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
+ <artifactId>camel-olingo4-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
<artifactId>camel-olingo4</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
+ <artifactId>camel-openapi-java</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
<artifactId>camel-openstack</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
+ <artifactId>camel-opentelemetry</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-opentracing</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
<artifactId>camel-optaplanner</artifactId>
</dependency>
<dependency>
@@ -928,6 +1036,10 @@
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
+ <artifactId>camel-platform-http-vertx</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
<artifactId>camel-platform-http</artifactId>
</dependency>
<dependency>
@@ -960,14 +1072,30 @@
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
+ <artifactId>camel-reactive-executor-vertx</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
<artifactId>camel-reactive-streams</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
+ <artifactId>camel-reactor</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-redis</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
<artifactId>camel-ref</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
+ <artifactId>camel-resilience4j</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
<artifactId>camel-rest-openapi</artifactId>
</dependency>
<dependency>
@@ -984,6 +1112,10 @@
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
+ <artifactId>camel-ribbon</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
<artifactId>camel-robotframework</artifactId>
</dependency>
<dependency>
@@ -992,6 +1124,10 @@
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
+ <artifactId>camel-rxjava</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
<artifactId>camel-saga</artifactId>
</dependency>
<dependency>
@@ -1032,6 +1168,10 @@
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
+ <artifactId>camel-shiro</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
<artifactId>camel-sip</artifactId>
</dependency>
<dependency>
@@ -1092,14 +1232,26 @@
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
+ <artifactId>camel-spring-javaconfig</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
<artifactId>camel-spring-ldap</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
+ <artifactId>camel-spring-main</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
<artifactId>camel-spring-redis</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
+ <artifactId>camel-spring-security</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
<artifactId>camel-spring-ws</artifactId>
</dependency>
<dependency>
@@ -1136,6 +1288,10 @@
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
+ <artifactId>camel-swagger-java</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
<artifactId>camel-syslog</artifactId>
</dependency>
<dependency>
@@ -1152,6 +1308,46 @@
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
+ <artifactId>camel-test-cdi</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-test-junit5</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-test-spring-junit5</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-test-spring</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-test</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-testcontainers-junit5</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-testcontainers-spring-junit5</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-testcontainers-spring</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-testcontainers</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-threadpoolfactory-vertx</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
<artifactId>camel-thrift</artifactId>
</dependency>
<dependency>
@@ -1164,6 +1360,10 @@
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
+ <artifactId>camel-tracing</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
<artifactId>camel-twilio</artifactId>
</dependency>
<dependency>
@@ -1172,6 +1372,10 @@
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
+ <artifactId>camel-undertow-spring-security</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
<artifactId>camel-undertow</artifactId>
</dependency>
<dependency>
@@ -1244,10 +1448,6 @@
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
- <artifactId>camel-xml-jaxp</artifactId>
- </dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
<artifactId>camel-xmlsecurity</artifactId>
</dependency>
<dependency>
@@ -1288,6 +1488,10 @@
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
+ <artifactId>camel-zipkin</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
<artifactId>camel-zookeeper-master</artifactId>
</dependency>
<dependency>
diff --git a/parent/pom.xml b/parent/pom.xml
index e8cfb8a..e636492 100644
--- a/parent/pom.xml
+++ b/parent/pom.xml
@@ -1220,6 +1220,11 @@
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
+ <artifactId>camel-csimple-joor</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
<artifactId>camel-csv</artifactId>
<version>${project.version}</version>
</dependency>
@@ -1795,6 +1800,11 @@
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
+ <artifactId>camel-leveldb-legacy</artifactId>
+ <version>${project.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
<artifactId>camel-leveldb</artifactId>
<version>${project.version}</version>
</dependency>
@@ -2638,11 +2648,6 @@
<artifactId>camel-zookeeper</artifactId>
<version>${project.version}</version>
</dependency>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-csimple-joor</artifactId>
- <version>${project.version}</version>
- </dependency>
<!-- camel components: END -->
<!-- NOTE: auto-generated list of starter components when building camel catalog -->
diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareReleasePomMojo.java b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareAssemblyMojo.java
similarity index 76%
rename from tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareReleasePomMojo.java
rename to tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareAssemblyMojo.java
index 1ec4dc6..418dfd2 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareReleasePomMojo.java
+++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareAssemblyMojo.java
@@ -18,10 +18,10 @@ package org.apache.camel.maven.packaging;
import java.io.File;
import java.io.IOException;
-import java.util.HashSet;
-import java.util.Set;
import java.util.SortedSet;
import java.util.TreeSet;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
import org.apache.camel.tooling.util.PackageHelper;
import org.apache.camel.tooling.util.Strings;
@@ -34,11 +34,13 @@ import org.apache.maven.plugins.annotations.Parameter;
import org.apache.maven.project.MavenProject;
import org.apache.maven.project.MavenProjectHelper;
+import static org.apache.camel.tooling.util.PackageHelper.loadText;
+
/**
* Prepares the apache-camel/pom.xml and common-bin to keep the Camel artifacts up-to-date.
*/
-@Mojo(name = "prepare-release-pom", threadSafe = true)
-public class PrepareReleasePomMojo extends AbstractMojo {
+@Mojo(name = "prepare-assembly", threadSafe = true)
+public class PrepareAssemblyMojo extends AbstractMojo {
/**
* The maven project.
@@ -61,8 +63,8 @@ public class PrepareReleasePomMojo extends AbstractMojo {
/**
* The directory for components
*/
- @Parameter(defaultValue = "${project.build.directory}/../../../components")
- protected File componentsDir;
+ @Parameter(defaultValue = "${project.build.directory}/../../../core/camel-allcomponents/pom.xml")
+ protected File allComponentsPomFile;
/**
* Maven ProjectHelper.
@@ -78,24 +80,31 @@ public class PrepareReleasePomMojo extends AbstractMojo {
*/
@Override
public void execute() throws MojoExecutionException, MojoFailureException {
- updatePomAndCommonBin(componentsDir, "org.apache.camel", "camel components");
+ updatePomAndCommonBin(allComponentsPomFile, "org.apache.camel", "camel components");
}
- protected void updatePomAndCommonBin(File dir, String groupId, String token)
+ protected void updatePomAndCommonBin(File allComponentsPom, String groupId, String token)
throws MojoExecutionException, MojoFailureException {
SortedSet<String> artifactIds = new TreeSet<>();
+ final String pomText;
try {
- Set<File> poms = new HashSet<>();
- findComponentPoms(dir, poms);
- for (File pom : poms) {
- String aid = asArtifactId(pom);
- if (isValidArtifactId(aid)) {
- artifactIds.add(aid);
- }
- }
+ pomText = loadText(allComponentsPom);
} catch (IOException e) {
- throw new MojoFailureException("Error due " + e.getMessage(), e);
+ throw new MojoExecutionException("Error loading camel-allcomponents pom.xml file", e);
+ }
+
+ final String before = Strings.before(pomText, "<dependencies>");
+ final String after = Strings.after(pomText, "</dependencies>");
+
+ final String between = pomText.substring(before.length(), pomText.length() - after.length());
+
+ Pattern pattern = Pattern.compile(
+ "<dependency>\\s*<groupId>(?<groupId>.*)</groupId>\\s*<artifactId>(?<artifactId>.*)</artifactId>\\s*</dependency>");
+ Matcher matcher = pattern.matcher(between);
+ TreeSet<String> dependencies = new TreeSet<>();
+ while (matcher.find()) {
+ artifactIds.add(matcher.group(2));
}
getLog().debug("ArtifactIds: " + artifactIds);
@@ -136,32 +145,6 @@ public class PrepareReleasePomMojo extends AbstractMojo {
+ " dependencies");
}
- private void findComponentPoms(File parentDir, Set<File> components) {
- File[] files = parentDir.listFiles();
- if (files != null) {
- for (File file : files) {
- if (file.isDirectory() && file.getName().startsWith("camel-")) {
- findComponentPoms(file, components);
- } else if (parentDir.getName().startsWith("camel-") && file.getName().equals("pom.xml")) {
- components.add(file);
- }
- }
- }
- }
-
- private String asArtifactId(File pom) throws IOException {
- String text = PackageHelper.loadText(pom);
- text = Strings.after(text, "</parent>");
- if (text != null) {
- return Strings.between(text, "<artifactId>", "</artifactId>");
- }
- return null;
- }
-
- private boolean isValidArtifactId(String aid) {
- return aid != null && !aid.endsWith("-maven-plugin") && !aid.endsWith("-parent");
- }
-
private boolean updateXmlFile(File file, String token, String changed, String spaces) throws MojoExecutionException {
String start = "<!-- " + token + ": START -->";
String end = "<!-- " + token + ": END -->";
diff --git a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareComponentMojo.java b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareComponentMojo.java
index 5c6930d..e7c559a 100644
--- a/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareComponentMojo.java
+++ b/tooling/maven/camel-package-maven-plugin/src/main/java/org/apache/camel/maven/packaging/PrepareComponentMojo.java
@@ -142,6 +142,11 @@ public class PrepareComponentMojo extends AbstractGeneratorMojo {
new PackageOtherMojo(
getLog(), project, projectHelper, otherOutDir,
schemaOutDir, buildContext).prepareOthers();
+ // skip maven plugins or from core as core is maintained manually
+ boolean skip = project.getArtifactId().endsWith("-maven-plugin");
+ if (!skip) {
+ count = 1;
+ }
}
// whether to sync pom
@@ -154,8 +159,10 @@ public class PrepareComponentMojo extends AbstractGeneratorMojo {
}
}
- // Update all component pom sync point
- if (count > 0 && (val == null || val.equals("true"))) {
+ // skip from core folder as they are manitained manually in parent and should not be in all-components
+ boolean core = project.getParentArtifact() != null && project.getParentArtifact().getArtifactId().equals("core");
+ if (!core && count > 0 && (val == null || val.equals("true"))) {
+ // Update all component pom sync point
syncParentPomFile();
syncAllComponentsPomFile();
}