Skip to content

Instantly share code, notes, and snippets.

@tyrcho
Last active August 29, 2015 14:01
Show Gist options
  • Save tyrcho/d58b413a85b4bd8441a9 to your computer and use it in GitHub Desktop.
Save tyrcho/d58b413a85b4bd8441a9 to your computer and use it in GitHub Desktop.
Hybrid project with java + scala sources
<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>demo</groupId>
<artifactId>maven-scala-java</artifactId>
<version>0.0.1-SNAPSHOT</version>
<description>Hybrid project with java + scala sources</description>
<properties>
<scala.version>2.10.4</scala.version>
</properties>
<dependencies>
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
<version>${scala.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>net.alchim31.maven</groupId>
<artifactId>scala-maven-plugin</artifactId>
<version>3.1.3</version>
<executions>
<execution>
<id>scala-compile-first</id>
<phase>process-resources</phase>
<goals>
<goal>add-source</goal>
<goal>compile</goal>
</goals>
</execution>
<execution>
<id>scala-test-compile</id>
<phase>process-test-resources</phase>
<goals>
<goal>testCompile</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment