-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Building a native app with a custom profile does not work #3062
Comments
@gsmet do you mind doing a first level investigation? |
On it. |
@agoncal the last command with native should be If you're referring to the profile displayed during the tests, the tests start a totally new process via failsafe so you need to pass the profile there. BTW, the profile should be If you're referring to the profile you obtain when running the native executable once you have it, then it's
Then you obtain:
Not sure I answer your question though so feel free to provide more information if I don't. |
@gsmet Hum.... getting confused here. Let's take the default behaviour. When I build a native app, the
Now, if I specify a specific profile (eg.
So, what you are saying @gsmet is that if I build the native app with a specific profile, the profile is not used ( There are pros and cons in this approach. The pro is that the native app is bundled with all the configuration of all the profiles, and that the same native app can then be executed in Again, I don't know what's your take and what you have in mind (cc @emmanuelbernard). |
I think we have conflated a few things possibly and will need a clearer doc and maybe some changes. I've started a discussion on Zulip but we will capture it either here or via email. |
You are pointing to the surefire tests. They don't test native mode. The native mode is tested by the failsafe IT. If you enable the failsafe one, you will see the native executable is tested with the
Again, you're pointing to the JVM tests, not the native tests.
Yes it's the expected behavior. So that you can switch to different profiles at runtime. That can be discussed for sure. But at least, it's behaving as expected (except for the native executable being tested with the |
BTW conversations are also happening here https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/quarkus-dev/NFpDtpRVZ7Y/3G7WmRMJDAAJ |
We have created a new issue to track the changes we want to make based on this conversation and others on quarkus-dev |
Describe the bug
Despite the default profiles (dev, test, prod), Quarkus allows to have custom profiles (eg. staging). Activating a custom profile when developping works, but not when building a native app.
Expected behavior
Such command should work. It sets the
quarkus-profile
tostaging
and then builds the native app. But in fact, theprod
profile is used instead:Actual behavior
While developping, it is easy to use a custom profile just by setting the
quarkus-profile
variable and execute:But when we set the
quarkus-profile
variable to build a native app, the following command uses theprod
profile instead of thestaging
profile.To Reproduce
Create any Hello World application and add the following code so it displays the active profile (thanks to
ProfileManager.getActiveProfile()
):When executing in dev mode, the
dev
profile is displayed in the console:When setting the
quarkus-profile
variable tostaging
, thestaging
profile is displayed in the consoleBut when I build a native app using the
quarkus-profile
variable, theprod
profile is displayed in the console, not thestaging
:Environment (please complete the following information):
uname -a
orver
: Darwin iMac-Pro-de-Antonio.local 18.6.0 Darwin Kernel Version 18.6.0: Thu Apr 25 23:16:27 PDT 2019; root:xnu-4903.261.4~2/RELEASE_X86_64 x86_64java -version
: java version "11.0.3" 2019-04-16 LTSJava(TM) SE Runtime Environment 18.9 (build 11.0.3+12-LTS)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.3+12-LTS, mixed mode)
The text was updated successfully, but these errors were encountered: