Create Multi-Module Maven Project in IntelliJ IDEA
HTML-код
- Опубликовано: 11 сен 2024
- In this video, you will learn how to develop a multi-module Java Maven project in IntelliJ IDEA. In details, I will show you:
- Create a Maven root project
- Create the 1st module for Shared library project
- Create the 2nd module for Console app project
- Create the 3rd module for Desktop app project
Also, you will learn how to build the whole multi-module Maven project in IntelliJ IDEA using Maven goal mvn install.
Thanks! I've been searching my butt off to get this information. It's a great presentation that shows exactly what to do in IntelliJ. Community version works a bit different in that you have to click a button in the opening screen to make it Maven.😀
glad this video helped. You're welcome.
I had no idea how to do this, but the explanation you give along with the images was very understandable. Greetings.
Glad it was helpful!
Thank you! Great explanation, simple and to the point! Awesome dude!
Glad I could help
Very good ! Thank you !
I really liked the images at the beginning, it helps visualize the structure a lot !
Glad you liked it!
Straight to the point. Great explanation!
thanks a lot. Glad it helped.
Man... You just saved my ass, thanks for your knowledge
glad it helped.
Thank you!!!!👍👍👍💪💪💪!
You're welcome!
Thank you bro ❤️
Welcome 😊
best explained
thank you
thanks
You're welcome!
Hello, your videos are very cool. I have a question, if I work with Spring Boot, can I create a multi-module project configured to use different versions of Spring Boot? That is, in one module I work with version 2.3.x and in another module with version 2.7. x. I was trying but it didn't work out, I'm sure it can, but the configuration doesn't work out, do you know how I could structure it? Thank you for the answer you can give me. Or you could make a video on that subject, greetings friend.
😄
I think that only works if you do not inherit parent pom in the child modules. So you can specify Spring Boot version for each module individually.
@@CodeJava Thanks for the quick response, I'll try again, greetings friend
Great tutorial. Thank you! I have one question. After performing the "mvn install" that builds the jar files how would you run them as stand-alone applications? I right-click on the .jar file and get the "no main manifest attribute..." error when attempting to run. Do you have the pom.xml code that would build them as executable jars?
you should have spring boot maven build plugin:
org.springframework.boot
spring-boot-maven-plugin
actually you would need to create a manifest file that points to the class containing the 'public static void main()' method (that starts your app). You can then run the jar using:
java -jar
What would be the process of deploying them?
If you deploy the project on Heroku, parameterize the executable jar file via config var for each module. I'll publish a video about deploying this kind of project on Heroku.
@@CodeJava Thank you. I will be waiting.