IntelliJ IDEA Build ToolIntelliJ IDEA provides a Build Tools option to automate the creation of executable application from our source code. It provides the facilities of Compiling, Linking and Packaging the Java code into an executable form. IntelliJ IDEA supports various Build Tools for java application such as Maven, Gradle, Ant etc. In this section, we will discuss about the Maven and Gradle Build Tools. Create Maven ProjectTo create a Maven Projects do the following: 1. Go to File -> New -> Project. A new window screen open. 2. Select Maven in the left pane and click on Next button. ![]() 3. New window screen will open. Type the GroupId and ArtifactId. Click Next. ![]() 4. Click Finish. It will open the pom.xml file. 5. In this file, we will Add Properties. Final pom.xml file looks like this. 6. Create Java Class.
7. Compile Java Class using Maven
![]()
![]() Create Gradle ProjectTo create a Gradle Projects do the following: 1. Go to File -> New -> Project. A new window screen open. 2. Select Gradle in the left pane and click on Next button. ![]() 3. New window will open. Enter GroupId and ArtifactId. Click Next. 4. Click Finish. 5. Now Start Project. Open build.gradle File and Enter the below code. ![]() 6. Compile Project using Gradle
![]() Again Go to Run and select Gradle_Project option. Start Building Package. Upon successful Building, we will see the result. ![]()
Next TopicIntelliJ IDEA Profiler
|