Skip to content

Commit

Permalink
Merge pull request #256 from lburgazzoli/cleanup-catalog-generator
Browse files Browse the repository at this point in the history
Improve catalog
  • Loading branch information
oscerd authored Mar 9, 2020
2 parents 8df3496 + a3d73f8 commit 4b73393
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,9 @@ public void execute() throws MojoExecutionException, MojoFailureException {
catalog.setRuntimeProvider(new DefaultRuntimeProvider());
runtimeSpec.applicationClass("org.apache.camel.k.main.Application");
runtimeSpec.addDependency("org.apache.camel.k", "camel-k-runtime-main");
runtimeSpec.putCapability(
"cron",
CamelCapability.forArtifact("org.apache.camel.k", "camel-k-runtime-cron"));
runtimeSpec.putCapability(
"health",
CamelCapability.forArtifact("org.apache.camel.k", "camel-k-runtime-health"));
Expand All @@ -137,6 +140,9 @@ public void execute() throws MojoExecutionException, MojoFailureException {
catalog.setRuntimeProvider(new QuarkusRuntimeProvider());
runtimeSpec.applicationClass("io.quarkus.runner.GeneratedMain");
runtimeSpec.addDependency("org.apache.camel.k", "camel-k-runtime-quarkus");
runtimeSpec.putCapability(
"cron",
CamelCapability.forArtifact("org.apache.camel.k", "camel-k-runtime-cron"));
runtimeSpec.putCapability(
"health",
CamelCapability.forArtifact("org.apache.camel.quarkus", "camel-quarkus-microprofile-health"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ public void process(MavenProject project, CamelCatalog catalog, CamelCatalogSpec
specBuilder.putArtifact("org.apache.camel.k", "camel-k-loader-js");
specBuilder.putArtifact("org.apache.camel.k", "camel-k-loader-xml");
specBuilder.putArtifact("org.apache.camel.k", "camel-k-loader-java");
specBuilder.putArtifact("org.apache.camel.k", "camel-k-loader-knative");

specBuilder.putArtifact(
new CamelArtifact.Builder()
Expand Down Expand Up @@ -153,7 +152,6 @@ public void process(MavenProject project, CamelCatalog catalog, CamelCatalogSpec
.groupId("org.apache.camel.k")
.artifactId("camel-k-runtime-knative")
.addDependencies(MavenArtifact.from("org.apache.camel.k", "camel-k-loader-yaml"))
.addDependencies(MavenArtifact.from("org.apache.camel.k", "camel-k-loader-knative"))
.addDependencies(MavenArtifact.from("org.apache.camel.k", "camel-knative-api"))
.addDependencies(MavenArtifact.from("org.apache.camel.k", "camel-knative"))
.addDependencies(MavenArtifact.from("org.apache.camel.k", "camel-knative-http"))
Expand Down Expand Up @@ -218,13 +216,6 @@ private static void processLoaders(CamelCatalog catalog, CamelCatalogSpec.Builde
.putMetadata("native", "false")
.build()
);
specBuilder.putLoader(
"knative-source",
CamelLoader.fromArtifact("org.apache.camel.k", "camel-k-quarkus-loader-knative")
.addDependency("org.apache.camel.k", "camel-k-quarkus-knative")
.putMetadata("native", "true")
.build()
);
} else {
specBuilder.putLoader(
"yaml",
Expand Down Expand Up @@ -262,13 +253,6 @@ private static void processLoaders(CamelCatalog catalog, CamelCatalogSpec.Builde
.addLanguage("java")
.build()
);
specBuilder.putLoader(
"knative-source",
CamelLoader.fromArtifact("org.apache.camel.k", "camel-k-loader-knative")
.addDependency("org.apache.camel.k", "camel-k-runtime-knative")
.build()
);

}
}
private static void processComponents(org.apache.camel.catalog.CamelCatalog catalog, Map<String, CamelArtifact> artifacts) {
Expand Down

0 comments on commit 4b73393

Please sign in to comment.