TestingDocs.com
Software Testing website
  • Automation
    • Selenium
    • JBehave Framework
  • Tutorials
    • MySQL Tutorials
    • Testlink
    • Maven
    • Git
  • IDEs
    • IntelliJ IDEA
    • Eclipse
  • Flowcharts
    • Flowgorithm
    • Raptor
  • About

IntelliJ IDEA

Create Maven Project with IntelliJ IDEA

IntelliJ Tutorials

Introduction

IntelliJ IDEA has built-in excellent support for build tools like Ant, Maven and Gradle. We can either create blank projects or maven projects based on maven archetype. Let’s learn the steps involved to Create Maven Project with IntelliJ IDEA IDE.

 

IntelliJ Maven Integration

Enable Maven

Enabling Maven build tool in IntelliJ IDEA.

Enable Maven IDEA IntelliJ

Create a Maven Project

Using Maven you can easily and quickly create a new project based on maven archetype. An archetype is a Maven plugin to create a project as per the template.

maven-archetype-quickstart archetype plugin is used to create a quick and simple java application.

Steps

Launch IntelliJ IDEA.

 

Create new Project

Click on Create New Project.

Select Maven build tool from the left menu.

Check the option Create from the archetype.

Select the quickstart archetype to create a simple java project and click on the Next button.

 

Maven quickstart archetype

 

Enter groupID,artifactID details for your project.

Optionally, you can override the default paths for settings.xml and local repository .m2 folder.

Hit on the Finish button to create the java maven project.

 

Maven Project IntelliJ IDEA

 

To import changes to the maven project automatically, click on Enable Auto-Import feature.

You can see that the project structure is created for you automatically as shown below. The structure has a resembling test artifact for enabling testing of the development artifacts.

 

 

Project Structure

Created POM.xml

 

<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>com.testingdocs.simpleproject</groupId>
<artifactId>SimpleProject</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>

<name>SimpleProject</name>
<url>http://maven.apache.org</url>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>

 

That’s it. We have create a simple Java maven project using a template. We can work by adding the code and test artifacts(classes) to the project. There are several archetypes in Maven to fit for the project purpose. Explore them to create a specific project using the Maven tool.

 

IntelliJ IDEA ( Community Edition)  Tutorials on this website can be found at:

https://www.testingdocs.com/intellij-ide-tutorials

More information on IntelliJ IDEA IDE , please visit the official website:

https://www.jetbrains.com/idea

Related Posts

JetBrains Toolbox Application Download

IntelliJ IDEA /

Install JetBrains Toolbox App on Windows 11

Download IntelliJ IDEA Windows11

IntelliJ IDEA /

Download IntelliJ IDE on Windows 11

Programs and Fetures Win11 IntelliJ

IntelliJ IDEA /

Uninstall IntelliJ IDEA on Windows 11

IntelliJ Update Notification

IntelliJ IDEA /

Update IntelliJ IDEA on Windows

JetBrains Space IntelliJ IDE

IntelliJ IDEA /

IntelliJ IDEA Features

‹ IntelliJ IDEA First Run on Ubuntu Linux› Create a New Project in IntelliJ IDE

Recent Posts

  • MS Access Data Types
  • Install RAPTOR Avalonia on CentOS
  • Download RAPTOR Avalonia Edition on Windows
  • npm doctor command
  • Build & Run CLion Project
  • Create New CLion C Project on Windows
  • Configure CLion Toolchains on Windows
  • Launch CLion IDE on Windows
  • Activate CLion IDE
  • CLion IDE for C/C++ Development

Back to Top

Links

  • Contact
  • Privacy Policy
  • Cookie Policy

www.TestingDocs.com

Go to mobile version