Skip to content

Commit

Permalink
[Fix_#3546] NodeInstanceFactoryProvided not included in native build
Browse files Browse the repository at this point in the history
  • Loading branch information
fjtirado committed Jun 4, 2024
1 parent 47e5732 commit 7bfccda
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
import org.jboss.jandex.IndexView;
import org.jboss.jandex.Indexer;
import org.jboss.logging.Logger;
import org.jbpm.workflow.instance.impl.NodeInstanceFactoryProvider;
import org.kie.efesto.quarkus.deployment.EfestoGeneratedClassBuildItem;
import org.kie.kogito.KogitoGAV;
import org.kie.kogito.codegen.api.Generator;
Expand All @@ -63,9 +64,11 @@
import io.quarkus.deployment.builditem.LiveReloadBuildItem;
import io.quarkus.deployment.builditem.nativeimage.NativeImageResourceBuildItem;
import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem;
import io.quarkus.deployment.builditem.nativeimage.ServiceProviderBuildItem;
import io.quarkus.deployment.index.IndexingUtil;
import io.quarkus.deployment.pkg.builditem.CurateOutcomeBuildItem;
import io.quarkus.deployment.pkg.builditem.OutputTargetBuildItem;
import io.quarkus.deployment.pkg.steps.NativeOrNativeSourcesBuild;
import io.quarkus.maven.dependency.Dependency;
import io.quarkus.maven.dependency.ResolvedDependency;
import io.quarkus.paths.PathCollection;
Expand Down Expand Up @@ -157,6 +160,11 @@ public KogitoGeneratedSourcesBuildItem generateSources(
return new KogitoGeneratedSourcesBuildItem(generatedFiles);
}

@BuildStep(onlyIf = NativeOrNativeSourcesBuild.class)
public void addNativeLoaders(BuildProducer<ServiceProviderBuildItem> serviceProvider) {
serviceProvider.produce(ServiceProviderBuildItem.allProvidersFromClassPath(NodeInstanceFactoryProvider.class.getCanonicalName()));
}

@BuildStep
public List<KogitoGeneratedClassesBuildItem> generateModel(
KogitoGeneratedSourcesBuildItem sources,
Expand Down

0 comments on commit 7bfccda

Please sign in to comment.