-
Notifications
You must be signed in to change notification settings - Fork 40.5k
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
Native profile should configure execution in pluginManagement #33184
Comments
It's a bit strange to configure |
I want to set a default buildpack builder for my multi-module project.
|
I think you should configure that in plugin management so that it only affects modules that need to use Boot's Maven plugin:
|
This is exactly what I did in the first place, but same error. |
Please share a sample project. As Andy explained, the root should not enable the Spring Boot plugin so requesting process-aot to skip isn't the right way to fix whatever you're experiencing. |
Nevermind, I can see that our |
Actually, I am having second thoughts about this. @alexandreroman can you please share a sample project? I am assuming you're using Spring Boot's starter parent. Are all modules Spring Boot applications or do you have library or non-apps there? |
@snicoll I'm using the Spring Boot starter as a parent, all modules are Spring Boot apps. Here's my public repo. If you look at the |
I am afraid that's really working so far for that reason alone. Our parent is meant to provide an out-of-the-box experience for an app, not a project. If you want to use our parent with a multi-module build, additional care is required. For instance, if you add a module that isn't an application, this will fail as well:
If you run
Also, the reachability metadata is enabled with the native profile, which means we attempt to build the metadata for each module. It's more than the Spring Boot plugin. Long story short, I don't think our parent is the best option for a multi-module project with the native profile. I don't see how we could make this more flexible. Flagging for team attention. |
As a Maven user, I don't expect any plugins dealing with source code to fail if the packaging is set to |
I am aware of that. I am just saying that even if we do this (we could), your setup will work by accident more than anything else. Please review the comment. |
I've been looking at various use cases and it's increasingly apparent the current arrangement is not suited to a multi-modules build. See https://gist.github.com/snicoll/4ac487e2b671100647d8cb42ca05ae0e for a summary. |
As I suspected, changing There are a number of sample projects in this PR to the smoke tests repo that summarizes it all. |
When using Spring Boot Maven plugin 3.0.0-RC2 with a multi-module Maven project, the plugin fails to run at the parent level when packaging is set to
pom
.It turns out that the
process-aot
target is trying to run, but since there is no source code the plugins fails:As a workaround, I set
<skip>true</skip>
when the Maven project packaging is set topom
.The text was updated successfully, but these errors were encountered: