1

I have a quarkus app, https://github.com/Epic-Breakfast-Productions/OpenQuarterMaster/tree/main/software/open-qm-base-station that relies on a dependency I make and build locally (it is available in the local maven repo). I have taken the steps necessary to make this work with Quarkus (empty beans.xml file), and works fine when operating in regular jar mode.

However, when I operate in Native mode, the code can't make heads or tails of the objects from the dependency, typically throwing fits when de/serialization happens:

Caused by: com.fasterxml.jackson.databind.exc.InvalidDefinitionException: No serializer found for class com.ebp.openQuarterMaster.lib.core.rest.ErrorMessage and no properties discovered to create BeanSerializer (to avoid exception, disable SerializationFeature.FAIL_ON_EMPTY_BEANS)

I have tests running that confirm this (and seen in practice); when running in dev/ jar mode everything is fine. Native is a no-go. Is there anything I am missing on how to bring in non-jandex dependencies? I have attempted jandex plugins before but never seen them actually function.

To be clear:

./gradlew test -> works fine

./gradlew testNative -> fails

If testing for yourself, you will need to publish the dependency locally before attempting the quarkus app using ./gradlew publishToMavenLocal: https://github.com/Epic-Breakfast-Productions/OpenQuarterMaster/tree/main/software/libs/open-qm-core

Snappawapa
  • 1,697
  • 3
  • 20
  • 42

1 Answers1

1

Quarkus Native not includes external dependencies. You needs to include by yourself

Link to SoF response

Quorcs
  • 26
  • 1
  • This solution seems.... silly. Is thee a plan to provide an easier solution in the future? – Snappawapa Nov 17 '21 at 14:34
  • You can builds the uber-jar with all dependencies. Or if you use the Docker you can write Dockerfile in such a way that all your files and dependencies got into work dirrectory – Quorcs Nov 17 '21 at 18:21