Skip to content

Commit 8dea09c

Browse files
committed
Update the project to build again.
This project hasn't been updated in some time, causing it to be unbuildable for a variety of reasons. In general this commit attempted to perform the minimal amount of changes to make this project build again. There is still more work to be done to fix a few bugs and update versions of dependencies. This will come in another commit so as to attempt to only do _one thing_ per commit as much as is possible. As many build warnings were dealt with as possible while maintaining a balance of changing build semantics and dependency versions. As far as I can tell there is only 1 internal API change in this commit, documented below, and should be compatible with existing builds. However, even though the plugin API hasn't changed in a binary incompatible manner, this commit does drop support for scala 2.10 and maven2. * `.gitignore` * Updated the `.gitignore` to ignore emacs dir local files. * `pom.xml` * Updated the A level version to indicate this update adds new API features, and drops compatibility with scala 2.10 and maven2. * Added the version for the `maven-gpg-plugin`. * Updated the parent version. * Updated the scala version to 2.11.8 * Updated the scalatest version to 2.2.6 * Added property to track the `maven-project-info-reports-plugin` version, and added this plugin to management in the integration tests. * `src/it/it-parent/pom.xml` * Updated the site `maven-site-plugin` version. * Added the `scalatest-maven-plugin` to dependencyManagement taking the version from the root `@project.version@`. * Added the `maven-project-info-reports-plugin` version to dependencyManagement, taking the version from the root project properties. * `src/it/lift/pom.xml` * Updated lift version in integration tests. * Updated many other versions as required, deferring generally to properties in the root project. * `src/it/lift/src/test/scala/LiftConsole.scala` * Removed `exit(0)` call from integration tests, as it is no longer part of the API. * Removed the `scalatestexamples` integration test entirely. * The last time this worked, scalatest was being hosted with subversion on googlecode. Neither of these are true today. I was unable to find a clean way to download the current examples from core repo using `git`, without resorting to using either the ant or exec plugins which bring build portability and repeatability into question. It may be wise to petition the core repo to separate out the examples into an isolated project, at which point we could probably just unpack the sources jar. * All Mojos. (`AbstractScalaTestMojo`, `ReporterMojo`, `TestMojo`) * Updated usage of `expression=${..}` syntax in Javadoc plugin annotations to the non-deprecated `property=".."` * `src/main/java/org/scalatest/tools/maven/TestMojo.java` * API CHANGE - the scalatest-reports location was formerly set to `expression="${project.build.directory}/scalatest-reports`. This has been changed so that the default value sets it to that location, but the property is called, `scalatest.reportsDirectory`. Formerly this property had no name and the user could not set it as a user property, but now he can. This should be a superset of the former configuration settings and should not break an builds. This was updated based on the inferred intent of the prior, deprecated, syntax. * `src/it/lift/src/test/scala/RunWebApp.scala` * Updated usage of trait `Application` to `App` for new Scala version.
1 parent 9703250 commit 8dea09c

File tree

10 files changed

+86
-218
lines changed

10 files changed

+86
-218
lines changed

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
11
target/
2+
3+
# Editor files
4+
.dir-locals.el

pom.xml

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,28 @@
55
<parent>
66
<groupId>org.sonatype.oss</groupId>
77
<artifactId>oss-parent</artifactId>
8-
<version>7</version>
8+
<version>9</version>
99
</parent>
1010

1111
<groupId>org.scalatest</groupId>
1212
<artifactId>scalatest-maven-plugin</artifactId>
1313
<packaging>maven-plugin</packaging>
14-
<version>1.0</version>
14+
<version>2.0.0-SNAPSHOT</version>
1515
<name>ScalaTest Maven Plugin</name>
1616
<description>Integrates ScalaTest into Maven</description>
1717

1818
<properties>
19-
<scala.version>2.10.0</scala.version>
20-
<deploy.scala.version>2.10</deploy.scala.version>
21-
<scalatest.version>2.0</scalatest.version>
19+
<scala.major.version>2.11</scala.major.version>
20+
<scala.minor.version>8</scala.minor.version>
21+
<scala.version>${scala.major.version}.${scala.minor.version}</scala.version>
22+
<scalatest.version>2.2.6</scalatest.version>
2223
<maven.scala.plugin.version>2.14.1</maven.scala.plugin.version>
2324
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
2425
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
2526
<build.timestamp>${maven.build.timestamp}</build.timestamp>
2627
<maven.build.timestamp.format>yyyy-MM-dd</maven.build.timestamp.format>
28+
<maven.gpg.plugin.version>1.6</maven.gpg.plugin.version>
29+
<maven.project.info.reports.plugin.version>2.9</maven.project.info.reports.plugin.version>
2730
</properties>
2831

2932
<licenses>
@@ -92,14 +95,14 @@
9295
</dependency>
9396
<dependency>
9497
<groupId>org.scalatest</groupId>
95-
<artifactId>scalatest_${deploy.scala.version}</artifactId>
98+
<artifactId>scalatest_${scala.major.version}</artifactId>
9699
<version>${scalatest.version}</version>
97100
<scope>test</scope>
98101
</dependency>
99102
<dependency>
100103
<groupId>org.scala-lang</groupId>
101104
<artifactId>scala-library</artifactId>
102-
<version>${scala.version}</version>
105+
<version>${scala.major.version}.${scala.minor.version}</version>
103106
<scope>test</scope>
104107
</dependency>
105108
<dependency>
@@ -118,7 +121,7 @@
118121
<plugins>
119122
<plugin>
120123
<artifactId>maven-site-plugin</artifactId>
121-
<version>2.3</version>
124+
<version>3.5.1</version>
122125
</plugin>
123126
</plugins>
124127
</pluginManagement>
@@ -135,6 +138,9 @@
135138
</goals>
136139
</execution>
137140
</executions>
141+
<configuration>
142+
<scalaVersion>${scala.version}</scalaVersion>
143+
</configuration>
138144
</plugin>
139145
<plugin>
140146
<artifactId>maven-compiler-plugin</artifactId>
@@ -172,7 +178,6 @@
172178
<cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
173179
<pomIncludes>
174180
<pomInclude>lift/pom.xml</pomInclude>
175-
<pomInclude>scalatestexamples/pom.xml</pomInclude>
176181
</pomIncludes>
177182
<localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
178183
<streamLogs>true</streamLogs>
@@ -193,6 +198,7 @@
193198
<plugin>
194199
<groupId>org.apache.maven.plugins</groupId>
195200
<artifactId>maven-gpg-plugin</artifactId>
201+
<version>${maven.gpg.plugin.version}</version>
196202
<executions>
197203
<execution>
198204
<id>sign-artifacts</id>
@@ -276,7 +282,7 @@
276282
<plugin>
277283
<groupId>org.apache.maven.plugins</groupId>
278284
<artifactId>maven-site-plugin</artifactId>
279-
<version>3.0</version>
285+
<version>3.5.1</version>
280286
</plugin>
281287
</plugins>
282288
</pluginManagement>

src/it/it-parent/pom.xml

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,29 @@
2222
<plugin>
2323
<groupId>org.apache.maven.plugins</groupId>
2424
<artifactId>maven-site-plugin</artifactId>
25-
<version>3.0</version>
25+
<version>3.5.1</version>
2626
</plugin>
2727
</plugins>
2828
</pluginManagement>
2929
</build>
3030
</profile>
3131
</profiles>
32-
</project>
32+
33+
<build>
34+
<pluginManagement>
35+
<plugins>
36+
<plugin>
37+
<groupId>org.scalatest</groupId>
38+
<artifactId>scalatest-maven-plugin</artifactId>
39+
<version>@project.version@</version>
40+
</plugin>
41+
<plugin>
42+
<groupId>org.apache.maven.plugins</groupId>
43+
<artifactId>maven-project-info-reports-plugin</artifactId>
44+
<version>@maven.project.info.reports.plugin.version@</version>
45+
</plugin>
46+
</plugins>
47+
</pluginManagement>
48+
</build>
49+
50+
</project>

src/it/lift/pom.xml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@
77
<packaging>war</packaging>
88
<name>lift-it</name>
99
<description>Runs the plugin against a basic Lift application.</description>
10-
10+
1111
<properties>
12-
<lift.version>2.4</lift.version>
12+
<lift.version>2.6.3</lift.version>
1313
</properties>
1414

1515
<parent>
@@ -23,21 +23,21 @@
2323
<dependency>
2424
<groupId>org.scala-lang</groupId>
2525
<artifactId>scala-library</artifactId>
26-
<version>${scala.version}</version>
26+
<version>@scala.version@</version>
2727
</dependency>
2828
<dependency>
2929
<groupId>net.liftweb</groupId>
30-
<artifactId>lift-util_${scala.version}</artifactId>
30+
<artifactId>lift-util_@scala.major.version@</artifactId>
3131
<version>${lift.version}</version>
3232
</dependency>
3333
<dependency>
3434
<groupId>net.liftweb</groupId>
35-
<artifactId>lift-webkit_${scala.version}</artifactId>
35+
<artifactId>lift-webkit_@scala.major.version@</artifactId>
3636
<version>${lift.version}</version>
3737
</dependency>
3838
<dependency>
3939
<groupId>net.liftweb</groupId>
40-
<artifactId>lift-mapper_${scala.version}</artifactId>
40+
<artifactId>lift-mapper_@scala.major.version@</artifactId>
4141
<version>${lift.version}</version>
4242
</dependency>
4343
<dependency>
@@ -48,8 +48,8 @@
4848
</dependency>
4949
<dependency>
5050
<groupId>org.scalatest</groupId>
51-
<artifactId>scalatest_${scala.version}</artifactId>
52-
<version>${scalatest.version}</version>
51+
<artifactId>scalatest_@scala.major.version@</artifactId>
52+
<version>@scalatest.version@</version>
5353
<scope>test</scope>
5454
</dependency>
5555
<dependency>
@@ -62,7 +62,7 @@
6262
<dependency>
6363
<groupId>org.scala-lang</groupId>
6464
<artifactId>scala-compiler</artifactId>
65-
<version>${scala.version}</version>
65+
<version>@scala.version@</version>
6666
<scope>test</scope>
6767
</dependency>
6868
</dependencies>
@@ -74,7 +74,7 @@
7474
<plugin>
7575
<groupId>org.scala-tools</groupId>
7676
<artifactId>maven-scala-plugin</artifactId>
77-
<version>${maven.scala.plugin.version}</version>
77+
<version>@maven.scala.plugin.version@</version>
7878
<executions>
7979
<execution>
8080
<goals>
@@ -84,7 +84,7 @@
8484
</execution>
8585
</executions>
8686
<configuration>
87-
<scalaVersion>${scala.version}</scalaVersion>
87+
<scalaVersion>@scala.version@</scalaVersion>
8888
</configuration>
8989
</plugin>
9090
<plugin>

src/it/lift/src/test/scala/LiftConsole.scala

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,5 @@ object LiftConsole {
1010
// Now run the MainGenericRunner to get your repl
1111
MainGenericRunner.main(args)
1212
// After the repl exits, then exit the scala script
13-
exit(0)
1413
}
1514
}

src/it/lift/src/test/scala/RunWebApp.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import _root_.org.mortbay.jetty.Connector
22
import _root_.org.mortbay.jetty.Server
33
import _root_.org.mortbay.jetty.webapp.WebAppContext
44

5-
object RunWebApp extends Application {
5+
object RunWebApp extends App {
66
val server = new Server(8080)
77
val context = new WebAppContext()
88
context.setServer(server)

src/it/scalatestexamples/pom.xml

Lines changed: 0 additions & 157 deletions
This file was deleted.

0 commit comments

Comments
 (0)