Reference: Convert a regular project into a maven project
- Open the existing project in IntelliJ
- In the
Project
tool window, right-click your project and selectAdd Framework Support
. - In the dialog that opens, select
Maven
from the options on the left and clickOK
. - Open the generated POM and specify a
groupId
. The artifactId and version are specified automatically. - Add more depcendencies by updating
pom.xml
.
For instance, add Junit5
support:
- Open project level
pom.xml
- Press
Alt
+Insert
. Select In the dialog that opens, enterjunit
and selectorg.junit.jupiter:junit-jupiter
. - Click
Load Maven Changes
in the top right corner.
网友评论