Creating & Using Maven Archetypes
Вставка
- Опубліковано 7 вер 2024
- Having a consistent and efficient way to start up new Java projects can be very helpful and also allow you to ensure that coding and development standards are maintained. In this video, we will show you how you can create a Maven Archetype from an existing project, customize it, and use to to bootstrap new Java projects quickly.
Lab Instructions: appdev.consult...
Could this be used to not only set up a Java Spring project, but also a frontend project? For example a react app set up by the same archetype? Or would you have some other recommendation for this
I think that it probably could be used to bootstrap a frontend project since you can add scripting and post actions to an Archetype.
@@CloudNativeDevelopment I see, that makes sense, thanks for the reply!
Did you find or build such an archetype? I'm currently creating one with Java 17, Spring, MongoDB, React because this is the stack i use often.
@@WisomofHal Perhaps we should do a new tutorial to show how to create such an archetype.
Thanks for the video, I have successfully created archetype project but I want some dynamic naming way. For example I can give the class name as per my wish while generating the new project, how can I achieve that ?
Yes, you certainly can. Name the class something like __clientApp__.java, and the name will be set to the value of the "clientApp" property that you would define in the archetype-metadata.xml as a "requiredProperty".
How to add this archetype to Intellij New project wizard ??
Check their documentation here: www.jetbrains.com/help/idea/maven-support.html#maven_archetype
thanks. the video is very blurred though...
UA-cam automatically adapts the quality based on your connection speed. You might try forcing it to 1080p and see if that helps. When I view it at 1080p it's quite clear.
Thanks for the info, what shortcut did you use to open a new window at folder?
I did not use a shortcut. IntelliJ IDEA just has a tab at the bottom which will open a terminal in the project root directory.
@@CloudNativeDevelopment Thanks for replying I was inferring to 6:33 timestamp
@@gcajay8225 Oh! I see... I didn't use a shortcut, I used a command. When you use the JetBrains toolbox, it can create commands for your IDEs. In this case, I ran the commend `idea /path/to/folder`. I also have this mapped as an action in my file browser (Thunar in XFCE on Linux) so that I can right-click on a directory and "Open In IntelliJ"
11:55
Was there an issue that you noted? Happy to try to improve or adjust!