IntelliJ new-project notes

Russell Bateman
February 2019
last update:

The point of these notes is to demonstrate creating a new, Maven project in IntelliJ IDEA completely from scratch and devoid of any framework notions, but basing its build on Maven and traditional, Java project layout. This was done using IntelliJ IDEA 2018.3.4 Ultimate.

  1. If not already done, launch IntelliJ IDEA.
  2. If IDEA comes up on an existing project, dismiss that project by choosing File → Close Project.
  3. In the Welcome to IntelliJ IDEA dialog that appears, click Create New Project.
  4. Down the left-hand side, select Maven. Also choose the Project SDK:, check Create from archetype and, from the list below, select org.apache.maven.archetypes:maven-archetype-quickstart. (See also Maven Quickstart Archetype.)
  5. Click Next.
  6. Fill in the following (see Guide to naming conventions on groupId, artifactId, and version):
    1. GroupId: —uniquely identifies your project across all other projects and follows Java package-name rules using a reversed domain name that you control, e.g.: com.windofkeltia.examples.jdbc.postgresql
    2. ArtifactId: —the name of the JAR you will produce without version number. This can be any legal filesystem name, e.g.: jdbc-example.
    3. Version: —any practical version number, typically a mixture of digits and dots. Also tolerated are pertinent notations like SNAPSHOT, indicating nightly builds, e.g.: 1.0-SNAPSHOT
  7. Click Next.
  8. Inspect the description of what you're about to create, click Next.
  9. Specify (correct) the Project name and Project location or accept them as presented. Click OK.
  10. click OK.
  11. Wait until the IDE stops churning.
  12. In the little pop-up, Maven projects need to be imported, click Import Changes.
  13. Dismiss/hide the Messages pane. You are left with a new pom.xml suitable to begin development, however, it does tend to be full of crap that you do not need. Compare it with the pom.xml of another simple project and discard most of the Maven-specific dependencies.
  14. Open the src subdirectory and all lower subdirectories and packages in the Project pane to see your new project template. Rename App.java and AppTest.java according to what you prefer to call them for your new project.
  15. At this point, you're in business.