KaotoIO / kaoto

Next version of the UI of the Kaoto project
Apache License 2.0
22 stars 21 forks source link

feat(catalog): Dynamically build Camel Catalog #1169

Closed lordrip closed 1 week ago

lordrip commented 1 week ago

Context

This commit adds a Camel Catalog generator CLI to build the following structure:

dist/
├─ camel-main/
│  ├─ 4.4.0/
│  ├─ 4.6.0/
├─ camel-quarkus/
│  ├─ 3.8.0/
├─ camel-springboot/
│  ├─ 4.4.0/
│  ├─ 4.6.0/
├─ index.json

How to run?

# Install dependencies
./mvnw clean install;

# Package and run
./mvnw package; java -jar ./target/catalog-generator-0.0.1-SNAPSHOT.jar -o ./dist/camel-catalog -k 4.6.0 -m 4.6.0 -m 4.4.0 -q 3.8.0 -s 4.6.0

Alternatively, yarn can be used as well:

yarn workspace @kaoto/catalog-generator run build

This will generate:

Usage

usage: catalog-generator
 -k,--kamelets <kameletsVersion>   Kamelets catalog version
 -m,--main <version>               Camel Main version
 -o,--output <outputDir>           Output directory. It will be cleaned
                                   before generating the catalogs
 -q,--quarkus <version>            Camel Extensions for Quarkus version
 -s,--springboot <version>         Camel SpringBoot version
 -v,--verbose                      Be more verbose

fix: https://github.com/KaotoIO/kaoto/issues/1109

lhein commented 1 week ago

addressed the mentioned problems in https://github.com/lordrip/kaoto/pull/30

apupier commented 1 week ago

it doesn't compile

[@kaoto/catalog-generator]: [ERROR] /__w/kaoto/kaoto/packages/catalog-generator/src/main/java/io/kaoto/camelcatalog/Build.java:[19,20] cannot find symbol
[@kaoto/catalog-generator]: [ERROR]   symbol:   variable Level
[@kaoto/catalog-generator]: [ERROR]   location: class io.kaoto.camelcatalog.Build

the import package is missing.

lhein commented 1 week ago

My PR should have the fix

lhein commented 1 week ago

yep, that was caused by accepting your PR suggestions.

lhein commented 1 week ago

cleaned up the history on the PR for this PR :D So you only need to squash rename after u merged