Setting Up a Maven Project from Scratch: Screencapture Demo with Voiceover

preview_player
Показать описание
This demonstration video shows you how to quickly set up a new Maven project in the IntelliJ IDEA.

Mac OS Monterey Version 12.6
IntelliJ IDEA 2022.2 Community Edition

Setting Up a Maven Project in IntelliJ IDEA
-------------------------------------------------------------------
1. Create a new project
2. Select Maven from left-hand menu list
3. Select Project SKD from top (Next)
Note: I had to downgrade to SDK version 17 to get this to work.
4. Provide group ID and Artifact ID, e.g., RSL, "HelloMavenWorld"
5. Choose "Enable Auto-Import" from bottom right
7. Show "src" directory structure
8. Open "Maven Projects" window (bottom, left corner)
9. Expand Maven example to show standard phases and plugins

Creating a New Dependency
----------------------------------------------
11. Select "Code" menu, select "Generate..."
12. Choose "Dependency Template"
13. Type "junit" in artifact ID + "junit" in group ID + "4.12" in version
14. Hit "Refresh" button/icon in top, right
15. Expand Maven example to show dependencies
16. Show "External Libraries" in left-hand menu

Running Hello Maven World
---------------------------------------------
1. Click on src + main + java (left-hand project directory)
2. Right-click on java
3. Select new java class
4. Add the name, e.g., "HelloMavenWorld"
5. Add the source code for Hello Maven World.
6. Right-click on HelloMavenWorld in the directory tree on the left.
7. Select "Run" from the menu.

A Really Great Maven Tutorial
Рекомендации по теме