Maven in IntelliJ IDEA



  • Suppose I created a project in the environment. IntelliJ IDEA Not a maven project and working on it. In a while, I thought I wanted to use it. maven'Tom through a development environment like if I did it by creating a maven project. Is there any way to connect to the project? maven ?



  • To collect the project mavenI need to add the necessary pom.xml files, and the structure of the project, please lead to maven'ovsky.

    For example, your code is in the folder. my-project♪ Here we go. pom.xml at the root of this folder:

    <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
      <modelVersion>4.0.0</modelVersion>
    

    <groupId>foo.bar</groupId>
    <artifactId>my-project</artifactId>
    <name>My Fancy Project</name>
    <version>0.0.1</version>

    <dependencies>
    <!-- Здесь указываем все необходимые зависимости -->
    </dependencies>
    </project>

    Read the project structure:

    • java cocode. my-project/src/main/java
    • resources my-project/src/main/resources
    • Test codes my-project/src/test/javaetc.

    If maven-plugin It's worth it, Maven Projects and add the project by pointing the way.




Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2