-
Notifications
You must be signed in to change notification settings - Fork 3k
Pull native profile up to integration-tests-parent #14501
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
Conversation
|
I've added an example ( |
|
I like this idea! We definitely need some standardization... |
|
Looks good to me. Thanks @famod! |
|
Ok, unless @gsmet throws in a timely veto, I'll finalize this and see what CI in my fork is saying (the fun part 😉). |
|
@galderz There are commented out failsafe |
|
Yes, that is old (legacy) uber-jar config which can and should be replaced |
Ok. After my change there will be a few usages left: This should be cleaned up in a subsequent PR. |
|
@famod if you update the code using https://github.com/quarkusio/quarkus/blob/master/devtools/maven/src/main/java/io/quarkus/maven/BuildMojo.java#L33 that'll help. |
You mean <quarkus.package.uber-jar>true</quarkus.package.uber-jar>instead of <quarkus.package.type>uber-jar</quarkus.package.type>? |
|
Just look for the uses of that constant. QuarkusBootstrapProvider is actually setting that deprecated property. Which results in the error you posted above. |
|
The next CI run should hopefully be all green! The problem was how I was setting |
|
@geoand it took me a while to figure out what's going on in the last failure I'm having but turns out it is "caused" by #14387. |
|
Oh, wow! Indeed, that will be needed if this is to work. +1 from me |
|
@famod you mean that in this case the native profile will be present in the parent but not the current project? |
|
@aloubyansky yes, that's the thing with Maven profiles in the parent: they are not "inherited"! Maven applies the profile in/for the parent when building the model for it which is then merged with the child model. |
|
So I think I'm done with this. I double checked everything. I did squash but I think those three distinct commits make sense since they address different things. |
| run: tar -xzf maven-repo.tgz -C ~ | ||
| - name: Build with Maven | ||
| shell: bash | ||
| run: mvn -B --settings .github/mvn-settings.xml -DskipDocs -Dno-native -Dformat.skip -pl !integration-tests/gradle -pl !integration-tests/maven -pl !integration-tests/devtools install |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-Dno-native must stem from the early times of Quarkus as I couldn't find any reference to it.
Since I had to introduce a few new no-native profiles, I wanted to avoid confusion and so I removed this system property.
| private boolean isNativeProfileEnabled(MavenProject mavenProject) { | ||
| // gotcha: mavenProject.getActiveProfiles() does not always contain all active profiles (sic!), | ||
| // but getInjectedProfileIds() does (which has to be "flattened" first) | ||
| Stream<String> activeProfileIds = mavenProject.getInjectedProfileIds().values().stream().flatMap(List<String>::stream); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great to know!
geoand
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this a lot. Big +1 from me, but let's hear from @aloubyansky as well
aloubyansky
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good one @famod Thanks!
|
I had a quick look around and it seems no critical open PR will be affected by this (in terms of merge conflicts etc.) so I'll go ahead and merge this. |
So this is what the IMO "least painful" solution would look like to pull up and unify the
nativeMaven profile inintegration-tests/pom.xml.I'd lie by saying I like flag files but standard Maven profile activation features are a bit limited.
More details can be found here: https://quarkusio.zulipchat.com/#narrow/stream/187038-dev/topic/Moving.20native.20profile.20to.20IT.20parent.3F
Do we want to continue that path? @aloubyansky @geoand @gsmet
PS:
mongodb-rest-data-panacheis a good example that shows the need for unification:native.surefire.skip(just like ~8 other modules)native-image(just like 103 other modules)and in general we don't need to repeat things like
${project.build.directory}/${project.build.finalName}-runnerover and over again anymore.