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
⌛
This post has been reserved for your question.
Hey @NeoCortex97! Please useTIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here./close
or theClose 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.
Hello, you cannot have multiple parents of a project
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.
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.
You can have multiple parents of a project.
💤
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.
Is there anything special i should keep in Mind for that?
💤
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.
Yes, you need to import the parents. See this post: https://stackoverflow.com/questions/77805795/what-should-be-the-parent-of-a-maven-submodule/77805904#77805904
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...
💤
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.