Close Menu
Java HelpsJava Helps
    What's Hot

    Things To Do After Installing IntelliJ IDEA

    December 20, 2022

    How to Set Proxy for IntelliJ IDEA?

    December 20, 2022

    What is Garbage Collection?

    December 7, 2022
    Facebook X (Twitter) Instagram
    Java HelpsJava Helps
    • Home
    • How To
      1. Install
      2. Run
      3. Configure
      4. View All

      How to Install MySQL with phpMyAdmin on Ubuntu?

      December 4, 2022

      Install The Latest IntelliJ IDEA on Linux

      November 28, 2022

      Install The Latest Apache Maven on Linux

      November 27, 2022

      Install The Latest Oracle JDK on Linux

      November 27, 2022

      Run NiFi Cluster in Docker with SSL Enabled

      December 6, 2022

      How to Run Apache NiFi Docker on Mac M1?

      December 1, 2022

      How to Run Apache NiFi on Docker?

      December 1, 2022

      Create A New Maven Project In IntelliJ IDEA

      November 29, 2022

      Things To Do After Installing IntelliJ IDEA

      December 20, 2022

      How to Set Proxy for IntelliJ IDEA?

      December 20, 2022

      How to Set Proxy for Maven?

      December 6, 2022

      How to Create a Fat JAR Using Maven?

      December 5, 2022

      Things To Do After Installing IntelliJ IDEA

      December 20, 2022

      How to Set Proxy for IntelliJ IDEA?

      December 20, 2022

      Manage GitHub Artifact Storage Quota

      December 6, 2022

      Run NiFi Cluster in Docker with SSL Enabled

      December 6, 2022
    • Hello World
      1. Framework
      2. Library
      3. View All

      JPA Hello World! using Hibernate and MySQL

      December 3, 2022

      Jersey 3.x – Hello World!

      December 2, 2022

      Microservices Framework for Java (MSF4J) – Hello World!

      December 1, 2022

      How to Parse PCAP files in Java?

      November 30, 2022

      JPA Hello World! using Hibernate and MySQL

      December 3, 2022

      Jersey 3.x – Hello World!

      December 2, 2022

      Microservices Framework for Java (MSF4J) – Hello World!

      December 1, 2022

      How to Parse PCAP files in Java?

      November 30, 2022
    • More
      • Privacy Policy
        • Java Helps
        • Android Apps
      • Contact US
      • About
    Facebook X (Twitter) Instagram
    Java HelpsJava Helps
    Home » Create Scala Project with Maven in IntelliJ IDEA
    Scala
    Scala
    Create

    Create Scala Project with Maven in IntelliJ IDEA

    Gobinath LoganathanBy Gobinath LoganathanDecember 4, 2022No Comments3 Mins Read
    Share
    Facebook Twitter LinkedIn Pinterest Email

    Every Scala developer out there knows SBT is the default build tool for Scala but there may be some situations limiting you to sticking with the famous build tool for Java: Apache Maven. Haven’t come across a reason to use Maven for Scala projects yet? Keep using SBT. However, if your team is using Apache Maven because it works well with their CI server or because they have a well-established development environment with Apache Maven, you have no choice and this article is here to help you.


    Requirements

    • Intellij IDEA
    • Apache Maven

    After installing IntelliJ IDEA and Apache Maven, set up Scala in IntelliJ IDEA following this article: How to Setup Scala in IntelliJ IDEA?


    Create Scala Project using Maven Command Line

    Creating a Scala project using Apache Maven in the command line is super easy. Just run the following command, answer the questions in the interactive shell and you are good to go.

    mvn archetype:generate -DarchetypeGroupId=net.alchim31.maven -DarchetypeArtifactId=scala-archetype-simple

    Something works doesn’t necessarily mean that there is nothing else better. Why should we create a project in the terminal and then switch to the IntelliJ IDEA for development? Instead, we can create the Scala project with Macen in IntelliJ IDEA itself.


    Add Scala Maven Archetype

    For those who have to create Scala projects with Apache Maven frequently, it is convenient to add the Scala Maven archetype to IntelliJ IDEA. It is a one-time effort but will payoff you every time you want to create a new project.

    Step 1:
    Open the IntelliJ IDEA’s New Project dialog and select “Maven Archetype” from the left panel.

    Step 2:
    Click on the “Add…” button next to the Archetype text box.

    Add Maven Archetype in IntelliJ IDEA

    Step 3:
    In the opened dialog, enter the following values and click OK:

    GroupIdnet.alchim31.maven
    ArtifactIdscala-archetype-simple
    Version1.7
    Add Maven Archetype in IntelliJ IDEA

    Create Scala Project with Maven in IntelliJ Idea

    Step 1:
    Open the IntelliJ IDEA’s New Project dialog and select “Maven Archetype” from the left panel.

    Step 2:
    Enter a project name. Select the Archetype “net.alchim31.maven:scala-archetype-simple” and the Version “1.7”. Expand the advanced settings and change the group id according to your organization. Finally click on the “Create” button.

    Create Scala Project with Maven in IntelliJ Idea

    Run Scala Project

    If you have already installed the IntelliJ IDEA Scala Plugin as required in the Requirements section, your project is ready to use. In case you didn’t install the plugin earlier, follow the How to Setup Scala in IntelliJ IDEA article and install the Scala plugin.

    Scala project with Apache Maven in IntelliJ IDEA

    Run the App and see if it prints Hello World in the terminal. Now onwards you can create Scala projects with Apache Maven from the IntelliJ IDEA itself.

    Have you found this article useful? Please let me know below in the comments. Knowing someone found my articles useful motivates me to write more. Also, comment below if you face any issues with following this article or getting it working. I will try my best to help you resolve the problem. The Java Helps community is also willing to help each other and grow together.


    intellij maven scala
    Share. Facebook Twitter Pinterest LinkedIn Tumblr Email

    Related Posts

    Things To Do After Installing IntelliJ IDEA

    December 20, 2022

    How to Set Proxy for IntelliJ IDEA?

    December 20, 2022

    How to Set Proxy for Maven?

    December 6, 2022

    How to Create a Fat JAR Using Maven?

    December 5, 2022

    How to Set up Scala in IntelliJ IDEA?

    December 2, 2022

    Create A New Maven Project In IntelliJ IDEA

    November 29, 2022
    Don't Miss
    Configure

    Things To Do After Installing IntelliJ IDEA

    December 20, 2022

    IntelliJ Idea: the famous IDE for JVM languages including Java, Scala, and Kotlin. If you…

    How to Set Proxy for IntelliJ IDEA?

    December 20, 2022

    What is Garbage Collection?

    December 7, 2022

    Manage GitHub Artifact Storage Quota

    December 6, 2022
    Our Picks

    Things To Do After Installing IntelliJ IDEA

    December 20, 2022

    How to Set Proxy for IntelliJ IDEA?

    December 20, 2022

    What is Garbage Collection?

    December 7, 2022

    Manage GitHub Artifact Storage Quota

    December 6, 2022
    About Us
    About Us

    Java Helps is the platform to share all about the Java ecosystem. All the sample code available on Java Helps articles are published under Apache 2.0 License. Readers are free to use them according to the Apache 2.0 License.

    "The world is my town; its people my kinsmen."
    -Kaṉiyan Pūngunṟanār

    Email Us: www.javahelps@gmail.com

    Our Picks

    Things To Do After Installing IntelliJ IDEA

    December 20, 2022

    How to Set Proxy for IntelliJ IDEA?

    December 20, 2022

    What is Garbage Collection?

    December 7, 2022
    New Comments

      Type above and press Enter to search. Press Esc to cancel.

      Go to mobile version