Skip to content
Browse files

samples: upgrade scala version, java version, maven-scala-plugin, ...

  • Loading branch information...
1 parent cdfb2ed commit 0f4a3b8f5bef2b74e699e75eec9e7fdbe451e626 @davidB davidB committed Jul 26, 2011
View
12 samples/prj-custom-layout/pom.xml
@@ -3,18 +3,18 @@
<groupId>samples</groupId>
<artifactId>prj-custom-layout</artifactId>
<version>1.0-SNAPSHOT</version>
- <inceptionYear>2008</inceptionYear>
+ <inceptionYear>2011</inceptionYear>
<properties>
- <maven.compiler.source>1.5</maven.compiler.source>
- <maven.compiler.target>1.5</maven.compiler.target>
+ <maven.compiler.source>1.6</maven.compiler.source>
+ <maven.compiler.target>1.6</maven.compiler.target>
<encoding>UTF-8</encoding>
</properties>
<dependencies>
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
- <version>2.8.0.RC3</version>
+ <version>2.9.0-1</version>
</dependency>
<dependency>
<groupId>junit</groupId>
@@ -31,7 +31,7 @@
<plugin>
<groupId>org.scala-tools</groupId>
<artifactId>maven-scala-plugin</artifactId>
- <version>2.13.1</version>
+ <version>2.15.2</version>
<executions>
<execution>
<id>scala-compile-first</id>
@@ -40,7 +40,7 @@
<goal>add-source</goal>
<goal>compile</goal>
</goals>
- </execution>
+ </execution>
<execution>
<id>scala-test-compile</id>
<phase>process-test-resources</phase>
View
4 samples/prj-java-test-in-scala/pom.xml
@@ -9,7 +9,7 @@
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
- <version>2.8.0.RC3</version>
+ <version>2.9.0-1</version>
</dependency>
<dependency>
<groupId>junit</groupId>
@@ -30,7 +30,7 @@
<plugin>
<groupId>org.scala-tools</groupId>
<artifactId>maven-scala-plugin</artifactId>
- <version>2.13.1</version>
+ <version>2.15.2</version>
<executions>
<execution>
<goals>
View
10 samples/prj-scala-after-java/pom.xml
@@ -3,18 +3,18 @@
<groupId>samples</groupId>
<artifactId>prj-scala-after-java</artifactId>
<version>1.0-SNAPSHOT</version>
- <inceptionYear>2008</inceptionYear>
+ <inceptionYear>2011</inceptionYear>
<properties>
- <maven.compiler.source>1.5</maven.compiler.source>
- <maven.compiler.target>1.5</maven.compiler.target>
+ <maven.compiler.source>1.6</maven.compiler.source>
+ <maven.compiler.target>1.6</maven.compiler.target>
<encoding>UTF-8</encoding>
</properties>
<dependencies>
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
- <version>2.8.0</version>
+ <version>2.9.0-1</version>
</dependency>
<dependency>
<groupId>junit</groupId>
@@ -29,7 +29,7 @@
<plugin>
<groupId>org.scala-tools</groupId>
<artifactId>maven-scala-plugin</artifactId>
- <version>2.13.1</version>
+ <version>2.15.2</version>
<executions>
<execution>
<goals>
View
12 samples/prj-scala-cycle-java/pom.xml
@@ -3,23 +3,23 @@
<groupId>samples</groupId>
<artifactId>prj-scala-cycle-java</artifactId>
<version>1.0-SNAPSHOT</version>
- <inceptionYear>2008</inceptionYear>
+ <inceptionYear>2011</inceptionYear>
<properties>
- <maven.compiler.source>1.5</maven.compiler.source>
- <maven.compiler.target>1.5</maven.compiler.target>
+ <maven.compiler.source>1.6</maven.compiler.source>
+ <maven.compiler.target>1.6</maven.compiler.target>
<encoding>UTF-8</encoding>
</properties>
<dependencies>
<dependency>
<groupId>org.scala-lang</groupId>
<artifactId>scala-library</artifactId>
- <version>2.8.0.RC3</version>
+ <version>2.9.0-1</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
- <version>4.4</version>
+ <version>4.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
@@ -29,7 +29,7 @@
<plugin>
<groupId>org.scala-tools</groupId>
<artifactId>maven-scala-plugin</artifactId>
- <version>2.13.1</version>
+ <version>2.15.2</version>
<executions>
<execution>
<id>scala-compile-first</id>
View
30 samples/prj-scala-only/pom.xml
@@ -1,16 +1,17 @@
<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/maven-v4_0_0.xsd">
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"
+>
<modelVersion>4.0.0</modelVersion>
<groupId>samples</groupId>
<artifactId>prj-scala-only</artifactId>
<version>1.0-SNAPSHOT</version>
<inceptionYear>2010</inceptionYear>
<properties>
- <maven.compiler.source>1.5</maven.compiler.source>
- <maven.compiler.target>1.5</maven.compiler.target>
+ <maven.compiler.source>1.6</maven.compiler.source>
+ <maven.compiler.target>1.6</maven.compiler.target>
<encoding>UTF-8</encoding>
- <scala.version>2.8.0</scala.version>
+ <scala.version>2.9.0-1</scala.version>
</properties>
<repositories>
@@ -35,20 +36,25 @@
</dependency>
<dependency>
<groupId>org.scalatest</groupId>
- <artifactId>scalatest</artifactId>
- <version>1.2</version>
+ <artifactId>scalatest_2.9.0</artifactId>
+ <version>1.6.1</version>
<scope>test</scope>
</dependency>
<dependency>
- <groupId>org.scala-tools.testing</groupId>
- <artifactId>specs_${scala.version}</artifactId>
- <version>1.6.5</version>
+ <groupId>org.specs2</groupId>
+ <artifactId>specs2_${scala.version}</artifactId>
+ <version>1.5</version>
<scope>test</scope>
</dependency>
<dependency>
+ <groupId>org.specs2</groupId>
+ <artifactId>specs2-scalaz-core_${scala.version}</artifactId>
+ <version>6.0.RC2</version>
+ </dependency>
+ <dependency>
<groupId>org.scala-tools.testing</groupId>
<artifactId>scalacheck_${scala.version}</artifactId>
- <version>1.7</version>
+ <version>1.9</version>
<scope>test</scope>
</dependency>
</dependencies>
@@ -60,7 +66,7 @@
<plugin>
<groupId>org.scala-tools</groupId>
<artifactId>maven-scala-plugin</artifactId>
- <version>2.14.3</version>
+ <version>2.15.2</version>
<executions>
<execution>
<goals>
@@ -97,7 +103,7 @@
</plugin>
</plugins>
</build>
-
+
<profiles>
<profile>
<id>testng</id>
View
34 samples/prj-scala-only/src/test/scala/samples/SpecsSampleTest.scala
@@ -1,40 +1,16 @@
package samples
-import org.specs._
+import org.specs2._
+import org.specs2.runner.JUnitRunner
+import org.junit.runner.RunWith
-//import org.specs.runner.JUnit4
-//class SpecsSampleTest extends JUnit4(SpecsSample)
-//object SpecsSample extends Specification with ScalaCheck {
-
-class SpecsSampleTest extends SpecificationWithJUnit with ScalaCheck {
-
-//import org.junit.runner.RunWith
-//import org.specs.runner.{ JUnitSuiteRunner, JUnit }
-//@RunWith(classOf[JUnitSuiteRunner])
-//class SpecsSampleTest extends Specification with JUnit with ScalaCheck {
+@RunWith(classOf[JUnitRunner])
+class SpecsSampleTest extends mutable.Specification {
"'hello world' has 11 characters" in {
"hello world".size must be equalTo(11)
}
"'hello world' matches 'h.* w.*'" in {
"hello world" must be matching("h.* w.*")
}
-
- "startsWith" verifies { (a: String, b: String) => (a + b).startsWith(a) }
- "endsWith" verifies { (a: String, b: String) => (a + b).endsWith(b) }
-
- "These examples" should {
- skip("those examples don't pass yet")
- "be skipped" in { /*... */}
- "be skipped2" in { /*... */}
- }
-
- "my framework" should {
- "work with Xxxx" in {
- // skip the example if the DB2 connection is not available locally
- false must beTrue.orSkipExample // alias orSkip
- // use DB2Connection
- }
- /*...*/
- }
}

0 comments on commit 0f4a3b8

Please sign in to comment.
Something went wrong with that request. Please try again.