Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve catalog #256

Merged
merged 2 commits into from
Mar 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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