...
Using IntelliJ with your Maven project
IntelliJ IDEA fully integrates with Maven version 2.2 and later versions, allowing you to create or import Maven modules, download artifacts and perform the goals of the build lifecycle and plugins. If you want to use an existing Maven project, you can import it directly by opening its pom.xml file. When a Maven project is imported, IntelliJ IDEA analyzes the pom.xml file and automatically downloads the necessary dependencies.
IntelliJ IDEA provides two ways of running the Maven goals:
- Create run/debug configuration and launch it.
- Use the Run Maven Build command in the Maven Projects tool window. This way doesn’t require any run/debug configuration.
To import lab1 as a maven project simply follow the following steps as shown in the images:
Ensure that you are using the JDK8 distribution in your machine.
Open the maven plugin window to execute the maven build commands from IntelliJ. Of course, you can still right click on the individual files to run them by editing the run configuration to include the javaagent as described in the download and set up article.