Maven Java Scala project setup

It’s very easy in Maven to add Scala support all we have to do is add the maven-scala-plugin inside the POM:

 		<plugin>
  			<groupId>org.scala-tools</groupId>
  			<artifactId>maven-scala-plugin</artifactId>
  			<version>2.15.2</version>
  			<executions>
  				<execution>
  					<goals>
  						<goal>compile</goal>
  						<goal>testCompile</goal>
  					</goals>
  				</execution>
  			</executions>
  		</plugin>

and of course the single Scala dependency jar:

 	<dependency>
  		<groupId>org.scala-lang</groupId>
  		<artifactId>scala-library</artifactId>
  		<version>2.9.1</version>
  	</dependency>

I have included the code in this Github repository.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s