Create a Maven Project For JAVA and Scala

Scala

mvn archetype-generate

And type in the number for the highlighted one as shown below. We are looking for the archetype org.scala-tools.archetypes:scala-archetype-simple

The following prompts will ask you for the group-id and artifact-id and may be some other things, but when you are done, maven will create a sample pom.xml file and directory structure with src/main/scala, src/test/scala.

That's it. Now you can start coding in Scala and compile and build your code using Maven.

JAVA

mvn archetype-generate

And type in the number for the highlighted one as shown below. We are looking for the archetype org.apache.maven.archetypes:maven-archetype-quickstart

The following prompts will ask you for the group-id and artifact-id and may be some other things, but when you are done, maven will create a sample pom.xml file and directory structure with src/main/java, src/test/java.

That's it. Now you can start coding in JAVA and compile and build your code using Maven.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.