You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by as...@apache.org on 2019/11/04 16:10:28 UTC
[camel-k] 04/38: feat(quarkus): Setup Camel Quarkus catalog
generate command
This is an automated email from the ASF dual-hosted git repository.
astefanutti pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-k.git
commit 7b8eddccf68e90f140a8ac4bbc61062c120f7f66
Author: Antonin Stefanutti <an...@stefanutti.fr>
AuthorDate: Tue Oct 22 15:20:01 2019 +0200
feat(quarkus): Setup Camel Quarkus catalog generate command
---
build/maven/pom-catalog.xml | 164 ++++++++++++++++++++++++++------------------
script/Makefile | 4 +-
script/build_catalog.sh | 21 +++---
3 files changed, 113 insertions(+), 76 deletions(-)
diff --git a/build/maven/pom-catalog.xml b/build/maven/pom-catalog.xml
index a1ec921..51d24a3 100644
--- a/build/maven/pom-catalog.xml
+++ b/build/maven/pom-catalog.xml
@@ -21,37 +21,109 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
-
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.camel.k</groupId>
<artifactId>camel-k-catalog-generator</artifactId>
<version>1.0.0</version>
- <build>
- <defaultGoal>generate-resources</defaultGoal>
- <plugins>
- <plugin>
- <groupId>org.apache.camel.k</groupId>
- <artifactId>camel-k-maven-plugin</artifactId>
- <version>${runtime.version}</version>
- <executions>
- <execution>
- <id>generate-catalog</id>
- <goals>
- <goal>generate-catalog</goal>
- </goals>
- </execution>
- </executions>
- <dependencies>
- <dependency>
- <groupId>org.apache.camel</groupId>
- <artifactId>camel-catalog</artifactId>
- <version>${camel.version}</version>
- </dependency>
- </dependencies>
- </plugin>
- </plugins>
- </build>
+ <profiles>
+ <profile>
+ <id>main</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+ <build>
+ <defaultGoal>generate-resources</defaultGoal>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.camel.k</groupId>
+ <artifactId>camel-k-maven-plugin</artifactId>
+ <version>${runtime.version}</version>
+ <executions>
+ <execution>
+ <id>generate-catalog</id>
+ <goals>
+ <goal>generate-catalog</goal>
+ </goals>
+ </execution>
+ </executions>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-catalog</artifactId>
+ <version>${camel.version}</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ <profile>
+ <id>quarkus</id>
+ <build>
+ <defaultGoal>generate-resources</defaultGoal>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.camel.k</groupId>
+ <artifactId>camel-k-maven-plugin</artifactId>
+ <version>${runtime.version}</version>
+ <executions>
+ <execution>
+ <id>generate-catalog</id>
+ <goals>
+ <goal>generate-catalog</goal>
+ </goals>
+ </execution>
+ </executions>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.camel</groupId>
+ <artifactId>camel-catalog</artifactId>
+ <version>${camel.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-catalog-quarkus</artifactId>
+ <version>${camel-quarkus.version}</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ <profile>
+ <id>staging</id>
+ <activation>
+ <property>
+ <name>staging.repo</name>
+ </property>
+ </activation>
+ <repositories>
+ <repository>
+ <id>staging</id>
+ <url>${staging.repo}</url>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
+ </repositories>
+ <pluginRepositories>
+ <pluginRepository>
+ <id>staging</id>
+ <url>${staging.repo}</url>
+ <releases>
+ <enabled>true</enabled>
+ </releases>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </pluginRepository>
+ </pluginRepositories>
+ </profile>
+ </profiles>
<repositories>
<repository>
@@ -99,44 +171,4 @@
</pluginRepository>
</pluginRepositories>
-
- <profiles>
- <profile>
- <id>staging</id>
- <activation>
- <property>
- <name>staging.repo</name>
- </property>
- </activation>
-
- <repositories>
- <repository>
- <id>staging</id>
- <url>${staging.repo}</url>
- <releases>
- <enabled>true</enabled>
- </releases>
- <snapshots>
- <enabled>false</enabled>
- </snapshots>
- </repository>
- </repositories>
-
- <pluginRepositories>
- <pluginRepository>
- <id>staging</id>
- <url>${staging.repo}</url>
- <releases>
- <enabled>true</enabled>
- </releases>
- <snapshots>
- <enabled>false</enabled>
- </snapshots>
- </pluginRepository>
- </pluginRepositories>
-
- </profile>
- </profiles>
-
-
</project>
diff --git a/script/Makefile b/script/Makefile
index a89df30..e639858 100644
--- a/script/Makefile
+++ b/script/Makefile
@@ -20,6 +20,7 @@ RUNTIME_VERSION := 1.0.6
RUNTIME_VERSION_CONSTRAINT := >=1.0.5
CAMEL_VERSION := 3.0.0-RC1
CAMEL_VERSION_CONSTRAINT := >=3.0.0-RC1
+CAMEL_QUARKUS_VERSION := 0.2.1-SNAPSHOT
KANIKO_VERSION := 0.9.0
BASE_IMAGE := fabric8/s2i-java:3.0-java8
LOCAL_REPOSITORY := /tmp/artifacts/m2
@@ -123,7 +124,8 @@ build-kamel:
go build $(GOFLAGS) -o kamel ./cmd/kamel/*.go
build-resources:
- ./script/build_catalog.sh $(CAMEL_VERSION) $(RUNTIME_VERSION) $(STAGING_RUNTIME_REPO)
+ ./script/build_catalog.sh $(CAMEL_VERSION) $(RUNTIME_VERSION) -Dstaging.repo=$(STAGING_RUNTIME_REPO) -Pmain -Dcatalog.file=camel-catalog-$(CAMEL_VERSION)-$(RUNTIME_VERSION).yaml
+ ./script/build_catalog.sh $(CAMEL_VERSION) $(RUNTIME_VERSION) -Dstaging.repo=$(STAGING_RUNTIME_REPO) -Pquarkus -Dcatalog.runtime=quarkus -Dcamel-quarkus.version=$(CAMEL_QUARKUS_VERSION) -Dcatalog.file=camel-catalog-quarkus-$(CAMEL_QUARKUS_VERSION)-$(RUNTIME_VERSION).yaml
./script/embed_resources.sh deploy
go run cmd/util/json-schema-gen/jsonschemagen.go --out=./assets/json-schema
diff --git a/script/build_catalog.sh b/script/build_catalog.sh
index c0eb9c6..f4b2ae4 100755
--- a/script/build_catalog.sh
+++ b/script/build_catalog.sh
@@ -18,14 +18,17 @@
location=$(dirname $0)
rootdir=$location/../
-if [ "$#" -lt 2 ] || [ "$#" -gt 3 ]; then
- echo "usage: $0 catalog.version runtime.version [staging.repo]"
- exit 1
-fi
-
-$rootdir/mvnw -q \
+if [ "$#" -ge 2 ]; then
+ camelVersion="$1"
+ runtimeVersion="$2"
+ shift 2
+ $rootdir/mvnw -q \
-f ${rootdir}/build/maven/pom-catalog.xml \
-Dcatalog.path=${rootdir}/deploy \
- -Dcamel.version=$1 \
- -Druntime.version=$2 \
- -Dstaging.repo=$3
+ -Dcamel.version=$camelVersion \
+ -Druntime.version=$runtimeVersion \
+ "$@"
+else
+ echo "usage: $0 catalog.version runtime.version catalog.runtime [staging.repo]"
+ exit 1
+fi