IntelliJ add Maven support to an existing project

Reference: Convert a regular project into a maven project

  1. Open the existing project in IntelliJ
  2. In the Project tool window, right-click your project and select Add Framework Support.
  3. In the dialog that opens, select Maven from the options on the left and click OK.
  4. Open the generated POM and specify a groupId. The artifactId and version are specified automatically.
  5. Add more depcendencies by updating pom.xml.

For instance, add Junit5 support:

  1. Open project level pom.xml
  2. Press Alt+Insert. Select In the dialog that opens, enter junit and select org.junit.jupiter:junit-jupiter.
  3. Click Load Maven Changes in the top right corner.
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容