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

Set current project file when initializing the Maven resolver in the bootstrap provider #23035

Conversation

aloubyansky
Copy link
Member

This helps when for example dev mode is launched for a module targeted with -pl and the parent POM enables that module in a profile. Although in such a case the workspace discovery might not be including all the modules enabled in the profile. To enable all the modules, quarkus.bootstrap.effective-model-builder still has to be enabled.

This little change also may appear as a slight optimization resolving the current project path.

@quarkus-bot quarkus-bot bot added area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins area/maven labels Jan 19, 2022
@famod
Copy link
Member

famod commented Jan 19, 2022

Well, in a sample project I'm still seeing the same exception as in https://quarkusio.zulipchat.com/#narrow/stream/187030-users/topic/NPE.20when.20using.20quarkus.3Adev/near/268544477

Listening for transport dt_socket at address: 5005
Exception in thread "main" java.lang.RuntimeException: java.lang.NullPointerException
        at io.quarkus.deployment.dev.DevModeMain.start(DevModeMain.java:138)
        at io.quarkus.deployment.dev.DevModeMain.main(DevModeMain.java:62)
Caused by: java.lang.NullPointerException
        at io.quarkus.deployment.dev.DevModeMain.start(DevModeMain.java:90)
        ... 1 more

I added some output right above the code you changed and I don't see it, so that part is not even invoked?

@aloubyansky
Copy link
Member Author

What's your use-case @famod? It fixes what @gwenneg reported.

@famod
Copy link
Member

famod commented Jan 20, 2022

I'll push a reproducer, stay tuned!

@famod
Copy link
Member

famod commented Jan 20, 2022

@aloubyansky here we go: https://github.com/famod/modmono-quarkus/tree/npe-profiled-modules-dev (notice the branch)

  • mvn clean install -DskipTests
  • mvn -pl dist quarkus:dev

@aloubyansky
Copy link
Member Author

Excellent, thanks!

@aloubyansky aloubyansky force-pushed the set-current-project-dir-bootstrap-provider branch from cb4b3c7 to 1c177ac Compare January 20, 2022 22:14
@aloubyansky
Copy link
Member Author

Fixed, thanks @famod !

Copy link
Member

@famod famod left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@aloubyansky aloubyansky merged commit 74b8d3b into quarkusio:main Jan 21, 2022
@quarkus-bot quarkus-bot bot added this to the 2.8 - main milestone Jan 21, 2022
@gsmet gsmet modified the milestones: 2.8 - main, 2.7.0.Final Jan 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/devtools Issues/PR related to maven, gradle, platform and cli tooling/plugins area/maven
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants