I am trying to write a quarkus native application right now. It should be possible to configure a boolean value which then tells the application to only supply the REST-API given by the program or to supply both, the REST-API and the command line application (which is something POSIX related).
Now I have the problem that when running the code with the @Startup combined with @PostConstruct annotation the "only supply REST" part works but the POSIX one doesnt anymore because it contains an endless loop and blocks the initialization of the REST-API via Quarkus, so the application never reaches the point where the REST-Service would be initialized. If I try via @QuarkusMain however the POSIX-part works because the REST-API is being initialized before the command line application is being executed, the "only REST-API" part however doesnt work because after one run through the application of course exits. This isnt the goal though, it should still keep running to keep supplying the REST-Service.
I have really tried everything which came to my mind but I think its just not possible combining these two use cases. I also think it could be really hard to understand the problem, so if you need any more information please reach out to me.
Cheers, Paul