Skip to content
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

Maven property quarkus.profile should be picked up by quarkus-maven-plugin #13341

Closed
ge0ffrey opened this issue Nov 17, 2020 · 7 comments · Fixed by #15356
Closed

Maven property quarkus.profile should be picked up by quarkus-maven-plugin #13341

ge0ffrey opened this issue Nov 17, 2020 · 7 comments · Fixed by #15356
Labels
area/maven kind/bug Something isn't working
Milestone

Comments

@ge0ffrey
Copy link
Contributor

Given this pom.xml:

      <properties>
        <quarkus.profile>foo</quarkus.profile>
      </properties>

and this application.properties

hello-message=Hello
%foo.hello-message=Hi

the hello message should resolve to "Hi".

Reproduced with a "native" profile property in the code mentioned in this discussion:
https://quarkusio.zulipchat.com/#narrow/stream/187030-users/topic/Native.20profile.3A.20how.20to.20create.20one.3F

@ge0ffrey ge0ffrey added the kind/bug Something isn't working label Nov 17, 2020
@ghost ghost added the area/maven label Nov 17, 2020
@ghost
Copy link

ghost commented Nov 17, 2020

/cc @quarkusio/devtools

@geoand
Copy link
Contributor

geoand commented Nov 17, 2020

cc @aloubyansky

@ge0ffrey
Copy link
Contributor Author

Any change on this?

@aloubyansky
Copy link
Member

That's a bit tricky. At this point the project build properties aren't checked to contain quarkus.profile https://github.com/quarkusio/quarkus/blob/master/core/runtime/src/main/java/io/quarkus/runtime/configuration/ProfileManager.java#L41
And the profile is configured early https://github.com/quarkusio/quarkus/blob/master/core/runtime/src/main/java/io/quarkus/runtime/configuration/ConfigUtils.java#L74
before the config source are added to the builder (the build properties are not at the top) https://github.com/quarkusio/quarkus/blob/master/core/deployment/src/main/java/io/quarkus/deployment/ExtensionLoader.java#L146

cc @stuartwdouglas @dmlloyd

@ge0ffrey
Copy link
Contributor Author

ge0ffrey commented Feb 2, 2021

As this can't be solved easily, I've created #14757

@essobedo
Copy link
Contributor

A potential fix for this ticket #15356. I have not tested it in "native mode" but in "non native mode", it seems to work unless I missed something

@ge0ffrey
Copy link
Contributor Author

Thanks @essobedo !

Christopher-Chianelli added a commit to Christopher-Chianelli/optaplanner-quickstarts that referenced this issue Jan 31, 2022
Christopher-Chianelli added a commit to Christopher-Chianelli/optaplanner-quickstarts that referenced this issue Jan 31, 2022
ge0ffrey pushed a commit to apache/incubator-kie-optaplanner-quickstarts that referenced this issue Feb 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/maven kind/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants