Skip to content

Commit f1b5555

Browse files
committed
Revert "Remove integration tests broken after Scala upgrade, again"
This reverts commit 5570b03.
1 parent f98fe4b commit f1b5555

File tree

17 files changed

+471
-0
lines changed

17 files changed

+471
-0
lines changed

pom.xml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,37 @@
156156
<argLine>-enableassertions</argLine>
157157
</configuration>
158158
</plugin>
159+
<plugin>
160+
<artifactId>maven-invoker-plugin</artifactId>
161+
<version>1.3</version>
162+
<executions>
163+
<execution>
164+
<id>integration-test</id>
165+
<phase>integration-test</phase>
166+
<goals>
167+
<goal>install</goal>
168+
<goal>run</goal>
169+
</goals>
170+
</execution>
171+
</executions>
172+
<configuration>
173+
<skipInvocation>false</skipInvocation>
174+
175+
<projectsDirectory>src/it</projectsDirectory>
176+
<cloneProjectsTo>${project.build.directory}/it</cloneProjectsTo>
177+
<pomIncludes>
178+
<pomInclude>lift/pom.xml</pomInclude>
179+
</pomIncludes>
180+
<localRepositoryPath>${project.build.directory}/local-repo</localRepositoryPath>
181+
<streamLogs>true</streamLogs>
182+
<settingsFile>src/it/settings.xml</settingsFile>
183+
<goals>
184+
<goal>clean</goal>
185+
<goal>test</goal>
186+
<goal>site</goal>
187+
</goals>
188+
</configuration>
189+
</plugin>
159190

160191
<plugin>
161192
<groupId>org.apache.maven.plugins</groupId>

src/it/it-parent/pom.xml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
<groupId>maven.scalatest.plugin.its</groupId>
5+
<artifactId>it-parent</artifactId>
6+
<version>1.0-SNAPSHOT</version>
7+
<packaging>pom</packaging>
8+
<name>it-parent</name>
9+
10+
<profiles>
11+
<profile>
12+
<id>maven-3</id>
13+
<activation>
14+
<file>
15+
<!-- This employs that the basedir expression is only recognized by Maven 3.x (see MNG-4760) -->
16+
<exists>${basedir}</exists>
17+
</file>
18+
</activation>
19+
<build>
20+
<pluginManagement>
21+
<plugins>
22+
<plugin>
23+
<groupId>org.apache.maven.plugins</groupId>
24+
<artifactId>maven-site-plugin</artifactId>
25+
<version>3.5.1</version>
26+
</plugin>
27+
</plugins>
28+
</pluginManagement>
29+
</build>
30+
</profile>
31+
</profiles>
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: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
2+
<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">
3+
<modelVersion>4.0.0</modelVersion>
4+
<groupId>maven.scalatest.plugin.its</groupId>
5+
<artifactId>lift-it</artifactId>
6+
<version>1.0-SNAPSHOT</version>
7+
<packaging>war</packaging>
8+
<name>lift-it</name>
9+
<description>Runs the plugin against a basic Lift application.</description>
10+
11+
<properties>
12+
<lift.version>2.6.3</lift.version>
13+
</properties>
14+
15+
<parent>
16+
<groupId>maven.scalatest.plugin.its</groupId>
17+
<artifactId>it-parent</artifactId>
18+
<version>1.0-SNAPSHOT</version>
19+
<relativePath>../it-parent</relativePath>
20+
</parent>
21+
22+
<dependencies>
23+
<dependency>
24+
<groupId>org.scala-lang</groupId>
25+
<artifactId>scala-library</artifactId>
26+
<version>@scala.version@</version>
27+
</dependency>
28+
<dependency>
29+
<groupId>net.liftweb</groupId>
30+
<artifactId>[email protected]@</artifactId>
31+
<version>${lift.version}</version>
32+
</dependency>
33+
<dependency>
34+
<groupId>net.liftweb</groupId>
35+
<artifactId>[email protected]@</artifactId>
36+
<version>${lift.version}</version>
37+
</dependency>
38+
<dependency>
39+
<groupId>net.liftweb</groupId>
40+
<artifactId>[email protected]@</artifactId>
41+
<version>${lift.version}</version>
42+
</dependency>
43+
<dependency>
44+
<groupId>javax.servlet</groupId>
45+
<artifactId>servlet-api</artifactId>
46+
<version>2.5</version>
47+
<scope>provided</scope>
48+
</dependency>
49+
<dependency>
50+
<groupId>org.scalatest</groupId>
51+
<artifactId>[email protected]@</artifactId>
52+
<version>@scalatest.version@</version>
53+
<scope>test</scope>
54+
</dependency>
55+
<dependency>
56+
<groupId>org.mortbay.jetty</groupId>
57+
<artifactId>jetty</artifactId>
58+
<version>[6.1.6,)</version>
59+
<scope>test</scope>
60+
</dependency>
61+
<!-- for LiftConsole -->
62+
<dependency>
63+
<groupId>org.scala-lang</groupId>
64+
<artifactId>scala-compiler</artifactId>
65+
<version>@scala.version@</version>
66+
<scope>test</scope>
67+
</dependency>
68+
</dependencies>
69+
70+
<build>
71+
<sourceDirectory>src/main/scala</sourceDirectory>
72+
<testSourceDirectory>src/test/scala</testSourceDirectory>
73+
<plugins>
74+
<plugin>
75+
<groupId>net.alchim31.maven</groupId>
76+
<artifactId>scala-maven-plugin</artifactId>
77+
<version>@scala.maven.plugin.version@</version>
78+
</plugin>
79+
<plugin>
80+
<groupId>org.mortbay.jetty</groupId>
81+
<artifactId>maven-jetty-plugin</artifactId>
82+
<version>6.1.26</version>
83+
<configuration>
84+
<contextPath>/</contextPath>
85+
<scanIntervalSeconds>5</scanIntervalSeconds>
86+
</configuration>
87+
</plugin>
88+
<plugin>
89+
<groupId>net.sf.alchim</groupId>
90+
<artifactId>yuicompressor-maven-plugin</artifactId>
91+
<version>0.7.1</version>
92+
<executions>
93+
<execution>
94+
<goals>
95+
<goal>compress</goal>
96+
</goals>
97+
</execution>
98+
</executions>
99+
<configuration>
100+
<nosuffix>true</nosuffix>
101+
</configuration>
102+
</plugin>
103+
<!-- disable surefire -->
104+
<plugin>
105+
<groupId>org.apache.maven.plugins</groupId>
106+
<artifactId>maven-surefire-plugin</artifactId>
107+
<version>2.7</version>
108+
<configuration>
109+
<skipTests>true</skipTests>
110+
</configuration>
111+
</plugin>
112+
<!-- enable scalatest -->
113+
<plugin>
114+
<groupId>org.scalatest</groupId>
115+
<artifactId>scalatest-maven-plugin</artifactId>
116+
<executions>
117+
<execution>
118+
<goals>
119+
<goal>test</goal>
120+
</goals>
121+
</execution>
122+
</executions>
123+
</plugin>
124+
</plugins>
125+
</build>
126+
<reporting>
127+
<plugins>
128+
<plugin>
129+
<groupId>org.scalatest</groupId>
130+
<artifactId>scalatest-maven-plugin</artifactId>
131+
</plugin>
132+
</plugins>
133+
</reporting>
134+
</project>
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
package bootstrap.liftweb
2+
3+
import _root_.net.liftweb.util._
4+
import _root_.net.liftweb.http._
5+
import _root_.net.liftweb.sitemap._
6+
import _root_.net.liftweb.sitemap.Loc._
7+
import Helpers._
8+
9+
/**
10+
* A class that's instantiated early and run. It allows the application
11+
* to modify lift's environment
12+
*/
13+
class Boot {
14+
def boot {
15+
// where to search snippet
16+
LiftRules.addToPackages("demo.helloworld")
17+
18+
// Build SiteMap
19+
val entries = Menu(Loc("Home", List("index"), "Home")) :: Nil
20+
LiftRules.setSiteMap(SiteMap(entries:_*))
21+
}
22+
}
23+

src/it/lift/src/main/scala/demo/helloworld/comet/.keep

Whitespace-only changes.

src/it/lift/src/main/scala/demo/helloworld/model/.keep

Whitespace-only changes.

src/it/lift/src/main/scala/demo/helloworld/snippet/.keep

Whitespace-only changes.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
package demo.helloworld.snippet
2+
3+
class HelloWorld {
4+
def howdy = <span>Welcome to helloworld at {new _root_.java.util.Date}</span>
5+
}
6+

src/it/lift/src/main/scala/demo/helloworld/view/.keep

Whitespace-only changes.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<?xml version="1.0" encoding="ISO-8859-1"?>
2+
3+
<!DOCTYPE web-app
4+
PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
5+
"http://java.sun.com/dtd/web-app_2_3.dtd">
6+
7+
<web-app>
8+
<filter>
9+
<filter-name>LiftFilter</filter-name>
10+
<display-name>Lift Filter</display-name>
11+
<description>The Filter that intercepts lift calls</description>
12+
<filter-class>net.liftweb.http.LiftFilter</filter-class>
13+
</filter>
14+
15+
16+
<filter-mapping>
17+
<filter-name>LiftFilter</filter-name>
18+
<url-pattern>/*</url-pattern>
19+
</filter-mapping>
20+
21+
</web-app>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<lift:surround with="default" at="content">
2+
<h2>Welcome to your project!</h2>
3+
<p><lift:helloWorld.howdy /></p>
4+
</lift:surround>
5+
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:lift="http://liftweb.net/">
2+
<head>
3+
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
4+
<meta name="description" content="" />
5+
<meta name="keywords" content="" />
6+
7+
<title>demo.helloworld:helloworld:1.0-SNAPSHOT</title>
8+
<script id="jquery" src="/classpath/jquery.js" type="text/javascript"></script>
9+
</head>
10+
<body>
11+
<lift:bind name="content" />
12+
<lift:Menu.builder />
13+
<lift:msgs/>
14+
</body>
15+
</html>
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import _root_.bootstrap.liftweb.Boot
2+
import _root_.scala.tools.nsc.MainGenericRunner
3+
4+
object LiftConsole {
5+
def main(args : Array[String]) {
6+
// Instantiate your project's Boot file
7+
val b = new Boot()
8+
// Boot your project
9+
b.boot
10+
// Now run the MainGenericRunner to get your repl
11+
MainGenericRunner.main(args)
12+
// After the repl exits, then exit the scala script
13+
}
14+
}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
import _root_.org.mortbay.jetty.Connector
2+
import _root_.org.mortbay.jetty.Server
3+
import _root_.org.mortbay.jetty.webapp.WebAppContext
4+
5+
object RunWebApp extends App {
6+
val server = new Server(8080)
7+
val context = new WebAppContext()
8+
context.setServer(server)
9+
context.setContextPath("/")
10+
context.setWar("src/main/webapp")
11+
12+
server.addHandler(context)
13+
14+
try {
15+
println(">>> STARTING EMBEDDED JETTY SERVER, PRESS ANY KEY TO STOP")
16+
server.start()
17+
while (System.in.available() == 0) {
18+
Thread.sleep(5000)
19+
}
20+
server.stop()
21+
server.join()
22+
} catch {
23+
case exc : Exception => {
24+
exc.printStackTrace()
25+
System.exit(100)
26+
}
27+
}
28+
}

0 commit comments

Comments
 (0)