Detecting dev mode in an extension runtime module

683 views
Skip to first unread message

Tomas Hofman

unread,
Apr 29, 2021, 10:33:17 AM4/29/21
to Quarkus Development mailing list

Hello,

I'm looking for a way to detect that an app is running in the dev mode.

Specifically I would like to make Hibernate ORM extension to not throw away metadata (a RecordedState) in dev mode here:


The point is that those metadata are useful / necessary to generate DevUI pages for the extension, which is what I'm trying to do... (a work-in-progress PR is here: https://github.com/quarkusio/quarkus/pull/16764)

Thanks for any suggestions!

Ladislav Thon

unread,
Apr 29, 2021, 10:37:51 AM4/29/21
to tho...@redhat.com, Quarkus Development mailing list
Perhaps you're looking for `LaunchMode.current()`?

LT

čt 29. 4. 2021 v 16:33 odesílatel Tomas Hofman <tho...@redhat.com> napsal:
--
You received this message because you are subscribed to the Google Groups "Quarkus Development mailing list" group.
To unsubscribe from this group and stop receiving emails from it, send an email to quarkus-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/quarkus-dev/d7c30329-8396-4c03-b9fe-43afb7587ff6n%40googlegroups.com.

Georgios Andrianakis

unread,
Apr 29, 2021, 10:38:50 AM4/29/21
to Tomas Hofman, Quarkus Development mailing list
Hi Tomas,

Basically you need to check io.quarkus.runtime.LaunchMode (you can find plenty of examples in the codebase).

--

Tomas Hofman

unread,
Apr 29, 2021, 10:40:32 AM4/29/21
to Quarkus Development mailing list
That's exactly it, thank you both :).
Reply all
Reply to author
Forward
0 new messages