Skip to content

Commit 39200da

Browse files
committed
fix: properly index otherwise ignored dependency
Fixes #272. The core framework dependency needs to be a runtime dependency so that it gets put in the extension-using application. We also need to index the dependency explicitly because Quarkus doesn't do it automatically (as things might get unruly fast).
1 parent 13fc2c1 commit 39200da

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

operator-framework-quarkus-extension/deployment/src/main/java/io/javaoperatorsdk/quarkus/extension/deployment/QuarkusExtensionProcessor.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
import io.quarkus.deployment.builditem.CombinedIndexBuildItem;
2222
import io.quarkus.deployment.builditem.FeatureBuildItem;
2323
import io.quarkus.deployment.builditem.GeneratedClassBuildItem;
24+
import io.quarkus.deployment.builditem.IndexDependencyBuildItem;
2425
import io.quarkus.gizmo.ClassCreator;
2526
import io.quarkus.gizmo.ClassOutput;
2627
import io.quarkus.gizmo.MethodCreator;
@@ -55,6 +56,12 @@ FeatureBuildItem feature() {
5556
return new FeatureBuildItem(FEATURE);
5657
}
5758

59+
@BuildStep
60+
void indexSDKDependencies(BuildProducer<IndexDependencyBuildItem> indexDependency) {
61+
indexDependency.produce(
62+
new IndexDependencyBuildItem("io.javaoperatorsdk", "operator-framework-core"));
63+
}
64+
5865
@BuildStep
5966
@Record(ExecutionTime.RUNTIME_INIT)
6067
void createConfigurationServiceAndOperator(

operator-framework-quarkus-extension/runtime/pom.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
<groupId>io.javaoperatorsdk</groupId>
1919
<artifactId>operator-framework-core</artifactId>
2020
<version>${project.version}</version>
21-
<scope>compile</scope>
2221
</dependency>
2322
<dependency>
2423
<groupId>io.quarkus</groupId>

0 commit comments

Comments
 (0)