Merge pull request #359 from jendap/master

#357 Add Scala 2.10 support
This commit is contained in:
Timo Westkämper 2013-03-12 02:02:03 -07:00
commit 79afee0c79
3 changed files with 77 additions and 29 deletions

View File

@ -413,10 +413,6 @@
<id>morphia_repo</id>
<url>http://morphia.googlecode.com/svn/mavenrepo/</url>
</repository>
<repository>
<id>scala-tools.org</id>
<url>http://scala-tools.org/repo-releases</url>
</repository>
<repository>
<id>CUBRID</id>
<url>http://maven.cubrid.org</url>
@ -446,10 +442,6 @@
<id>datanucleus</id>
<url>http://www.datanucleus.org/downloads/maven2</url>
</pluginRepository>
<pluginRepository>
<id>scala-tools.org</id>
<url>http://scala-tools.org/repo-releases</url>
</pluginRepository>
<pluginRepository>
<id>com.springsource.repository.bundles.release</id>
<url>http://repository.springsource.com/maven/bundles/release</url>

View File

@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd" xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
@ -15,7 +15,10 @@
<packaging>jar</packaging>
<properties>
<scala.version>2.9.1</scala.version>
<character.encoding>UTF-8</character.encoding>
<scala.version>2.10</scala.version>
<scala.full.version>2.10.0</scala.full.version>
<hibernate.version>3.5.1-Final</hibernate.version>
<hibernate.validator.version>4.0.2.GA</hibernate.validator.version>
</properties>
@ -29,13 +32,13 @@
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
<version>${scala.version}</version>
<version>${scala.full.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-compiler</artifactId>
<version>${scala.version}</version>
<version>${scala.full.version}</version>
<scope>test</scope>
</dependency>
@ -131,24 +134,50 @@
<testSourceDirectory>src/test/scala</testSourceDirectory>
<plugins>
<plugin>
<groupId>org.scala-tools</groupId>
<artifactId>maven-scala-plugin</artifactId>
<version>2.15.2</version>
<!--
<groupId>net.alchim31.maven</groupId>
<artifactId>scala-maven-plugin</artifactId>
<version>3.1.3</version>
<configuration>
<charset>${character.encoding}</charset>
<scalaVersion>${scala.full.version}</scalaVersion>
<args>
<arg>-Xprint:typer</arg>
</args>
<arg>-encoding</arg>
<arg>${character.encoding}</arg>
<!-- <arg>-target:jvm-1.6</arg> -->
<arg>-unchecked</arg>
<arg>-deprecation</arg>
<!-- <arg>-feature</arg> -->
<!-- <arg>-explaintypes</arg> -->
<!-- <arg>-verbose</arg> -->
<!-- <arg>-optimise</arg> -->
<!-- <arg>-language:implicitConversions</arg> -->
</args>
<!-- <recompileMode>incremental</recompileMode> -->
<!-- <useZincServer>true</useZincServer> -->
</configuration>
-->
<executions>
<execution>
<id>scala-compile</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
</execution>
<execution>
<id>scala-test-compile</id>
<phase>test-compile</phase>
<goals>
<goal>testCompile</goal>
</goals>
</execution>
</executions>
</executions>
<dependencies>
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-compiler</artifactId>
<version>${scala.full.version}</version>
</dependency>
</dependencies>
</plugin>
<!--
<plugin>
@ -172,7 +201,7 @@
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
<version>${scala.version}</version>
<version>${scala.full.version}</version>
</dependency>
</dependencies>
</plugin>
@ -211,11 +240,38 @@
<sourceInclude>**/*.scala</sourceInclude>
<sourceInclude>**/*.java</sourceInclude>
</sourceIncludes>
</configuration>
</plugin>
</configuration>
</plugin>
</plugins>
<pluginManagement>
<plugins>
<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
<plugin>
<groupId>org.eclipse.m2e</groupId>
<artifactId>lifecycle-mapping</artifactId>
<version>1.0.0</version>
<configuration>
<lifecycleMappingMetadata>
<pluginExecutions>
<pluginExecution>
<pluginExecutionFilter>
<groupId>net.alchim31.maven</groupId>
<artifactId>scala-maven-plugin</artifactId>
<versionRange>[3.0.0,)</versionRange>
<goals>
<goal>compile</goal>
<goal>testCompile</goal>
</goals>
</pluginExecutionFilter>
<action>
<ignore />
</action>
</pluginExecution>
</pluginExecutions>
</lifecycleMappingMetadata>
</configuration>
</plugin>
</plugins>
</pluginManagement>
</build>
</project>
</project>

View File

@ -1,7 +1,7 @@
package com.mysema.query.scala
import scala.tools.nsc._
import scala.tools.nsc.InterpreterResults._
import scala.tools.nsc.interpreter.IR.Success
import scala.io.Source.fromFile
import java.io.File
@ -51,4 +51,4 @@ trait CompileTestUtils {
Array(file)
}
}
}
}