Maven multiple parents for project

Hi, I would like to share some code between my frontend and backend application and I would like to do that by having a maven Parent for the whole project with 3 submodules. I will call them: - root - whole project parent project - frontend - just frontend specific code - backend - spring boot project - common - shared code but I don't want to make root being a child of spring boot. backend has to be a child for spring boot, but it would have to be a child of root too. I dont know hot to say this better.
10 Replies
JavaBot
JavaBot7mo ago
This post has been reserved for your question.
Hey @NeoCortex97! Please use /close or the Close Post button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
stechy1
stechy17mo ago
Hello, you cannot have multiple parents of a project
NeoCortex97
NeoCortex97OP7mo ago
Thank you for confirming. So let me phrase this question a little differently: Can I have a spring application as a maven module with a different parent? Like frontend and common have parent set to root and backend has it set to spring boot. I did not find any documentation on that on the maven side.
JavaBot
JavaBot7mo ago
If you are finished with your post, please close it. If you are not, please ignore this message. Note that you will not be able to send further messages here after this post have been closed but you will be able to create new posts.
Peter Rader
Peter Rader7mo ago
You can have multiple parents of a project.
JavaBot
JavaBot7mo ago
💤 Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived. If your question was not answered yet, feel free to re-open this post or create a new one. In case your post is not getting any attention, you can try to use /help ping. Warning: abusing this will result in moderative actions taken against you.
NeoCortex97
NeoCortex97OP7mo ago
Is there anything special i should keep in Mind for that?
JavaBot
JavaBot7mo ago
💤 Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived. If your question was not answered yet, feel free to re-open this post or create a new one. In case your post is not getting any attention, you can try to use /help ping. Warning: abusing this will result in moderative actions taken against you.
Peter Rader
Peter Rader7mo ago
Stack Overflow
What should be the parent of a Maven submodule?
I'm trying to understand what is the recommended way to have multi module projects with Spring Boot and Maven. I found a Spring article but I don't understand the given source code. This is the sou...
JavaBot
JavaBot7mo ago
💤 Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived. If your question was not answered yet, feel free to re-open this post or create a new one. In case your post is not getting any attention, you can try to use /help ping. Warning: abusing this will result in moderative actions taken against you.
Want results from more Discord servers?
Add your server