-
-
Notifications
You must be signed in to change notification settings - Fork 36
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
Executors not working in a multi-module project with more than one level of folders #200
Comments
Thanks for using the plugin and for your kudos! Don't hesitate to star ⭐ the project on GitHub ;-) Regarding the issue, it looks indeed like a bug, as when the I'll have a look into it, stay tune! |
🤟 Great! Yes, I've been digging through the code and I've seen the loop causing this that tries to locate the parent pom.xml. Thank you for your quick response ⭐ ⭐ ⭐ |
🎉 This issue has been resolved in version 9.0.2 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Thank you 🤟 I've been testing the new release but it is still not working because it is not taking into consideration the path of the submodule when looking for it in the parent |
Hi @datencia, thanks for trying out the multi-module feature and for your PR But unfortunately, I think your proposed implementation is not correct either... There is a misconception on how the structure of a true nested multi-modules project should look like. I looked at Spring Boot own project on Github, which is imho, a very good example of how a truly nested multi-modules project should be structured. This is what I learned: For Maven(Until 2.2.x, Spring Boot project was using Maven as build system) ├── spring-boot-tests/ Main Takeaways
For Gradle(Since 2.3.x, Spring Boot project now uses Gradle as build system) ├── spring-boot-tests/ Main Takeaways
So based on that, I will rework/improve and better document the nested mutli-module support, following the best practices from Spring Boot project, as described above. Stay tuned! |
mmm I see, but imho it is merely a way of organizing the modules and not a good practice itself. This organization may make sense within the scope of a project that requires it, but other projects do not need to create an intermediate pom.xml. I'm going to try to use this workaround of an intermediate pom.xml but I guess I'll have to add another maven wrapper there for it to work, right? |
Suggestion: make the root module path configurable at the plugin level to avoid these problems by locating the Maven wrapper so you don't have to search by code for its location. |
Hi @datencia
OK, granted that the intermediary But, I'm curious... in your case:
Yes that right, The current code expect the parent module to declare the child module as a direct module (i.e
I would like the plugin to ease/automate that as much as possible, to avoid yet another config to manage for end-users. Not sure if most of them will ever need such detail of customization... |
In my case, I have an structure like this (reduced for simplicity, the names are for guidance only) managing 3 independent apps, e.g. 2 spring boot applications and one angular/react app:
The parent <modules>
<module>apps/backend</module>
<module>apps/rest-api</module>
</modules>
I have thinking about it, reading the Maven docs (I have not been able to look at gradle) I think that if the plugin offered a way to indicate the path to the maven wrapper (or by default use the root folder of the project as it usually happens) you could avoid having to locate it manually, and combining it with the use of the ArtifactId instead of using the path would avoid having to calculate/locate the module that contains it. Inspecting the Maven help
Note the point I have been testing a while this approach (to be honest, I didn't know about it) and works, e.g. ./mvnw clean -pl :backend` Where By using the artifactId I don't need to know the path of the module. |
Thanks for your Input @datencia I like the idea of using the I thought about it at the beginning, don't remember why I discarded the idea at the time... but it seems the best solution. I will dig a little more and gather knowledge for Gradle as well, to provide the most unified and simple solution for users. Don't hesitate to continue sharing your feedback, much appreciated 👍🏾 |
Running into the same issue after wondering why my CI timeouted after 40 minutes. I'm using Gradle and @nxrocks/nx-quarkus. Is there any progress on this issue so far? |
First of all, thank you for this amazing work.
This plugin is very useful for managing monorepos with Nx and Spring Boot 👏 🥇
Plugin Name
@nxrocks/nx-spring-boot
Nx Report
Expected Behaviour
Executor option
"runFromParentModule": true
should locate the parent module (if using a multi-module project) when the submodules are located in a subfolder (with more than one level of nesting).Actual Behaviour
Executors for submodules (in a multi-module project) are not working when using the option
runFromParentModule
option and the maven wrapper if the submodules are located in a folder with more than 1 level of nesting, e.g.Note the
demo
module folder which is not a direct folder ofdemo-parent
. Thedemo-parent
contains the maven wrapper.When running a task (e.g.
nx run demo:clean
it seems like the executor cannot find the parent module and never ends.Steps to reproduce the behaviour
@nxrocks/nx-spring-boot
plugindemo
anddemo-parent
)demo
into an intermediary subfolder (modifying itsproject.json
file according)nx run demo:clean
The text was updated successfully, but these errors were encountered: