Skip to content

Commit 46081af

Browse files
committed
Revert "remove it tests while trying to publish"
This reverts commit 816dfba.
1 parent 27195a6 commit 46081af

File tree

103 files changed

+1953
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+1953
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
invoker.goals=clean compile site -e

src/it/includesExcludes/pom.xml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
4+
<modelVersion>4.0.0</modelVersion>
5+
6+
<groupId>it.scala-maven-plugin</groupId>
7+
<artifactId>includesExcludes</artifactId>
8+
<version>1.0-SNAPSHOT</version>
9+
<name>Test compilation using excludes/includes</name>
10+
<description>Test compilation pulls version from dependency</description>
11+
<packaging>jar</packaging>
12+
<dependencies>
13+
<dependency>
14+
<groupId>org.scala-lang</groupId>
15+
<artifactId>scala-library</artifactId>
16+
<version>${scala.version.lastrelease}</version>
17+
</dependency>
18+
</dependencies>
19+
20+
<reporting>
21+
<plugins>
22+
<plugin>
23+
<groupId>@project.groupId@</groupId>
24+
<artifactId>@project.artifactId@</artifactId>
25+
<version>@project.version@</version>
26+
<configuration>
27+
<includes>
28+
<include>**/*.scala</include>
29+
<include>**/TestClass.java</include>
30+
</includes>
31+
<excludes>
32+
<exclude>bad.scala</exclude>
33+
</excludes>
34+
</configuration>
35+
</plugin>
36+
</plugins>
37+
</reporting>
38+
39+
<build>
40+
<plugins>
41+
<plugin>
42+
<groupId>@project.groupId@</groupId>
43+
<artifactId>@project.artifactId@</artifactId>
44+
<version>@project.version@</version>
45+
<executions>
46+
<execution>
47+
<goals>
48+
<goal>compile</goal>
49+
<goal>testCompile</goal>
50+
</goals>
51+
</execution>
52+
</executions>
53+
<configuration>
54+
<includes>
55+
<include>**/*.scala</include>
56+
<include>**/TestClass.java</include>
57+
</includes>
58+
<excludes>
59+
<exclude>bad.scala</exclude>
60+
</excludes>
61+
</configuration>
62+
</plugin>
63+
<plugin>
64+
<groupId>org.apache.maven.plugins</groupId>
65+
<artifactId>maven-site-plugin</artifactId>
66+
<version>3.21.0</version>
67+
</plugin>
68+
<plugin>
69+
<groupId>org.apache.maven.plugins</groupId>
70+
<artifactId>maven-compiler-plugin</artifactId>
71+
<version>3.13.0</version>
72+
<configuration>
73+
<source>1.8</source>
74+
<target>1.8</target>
75+
</configuration>
76+
</plugin>
77+
</plugins>
78+
</build>
79+
</project>
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
2+
class TestClass {
3+
4+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
class MyClass {
2+
}
3+
4+
//Companion Class
5+
object MyClass {
6+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import bad.package.name
2+
3+
class bad extends name {}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
try {
2+
3+
assert new File(basedir, 'target/classes/MyClass.class').exists()
4+
5+
assert new File(basedir, 'target/classes/MyClass$.class').exists()
6+
7+
assert new File(basedir, 'target/classes/TestClass.class').exists()
8+
9+
assert new File(basedir, 'target/site/scaladocs/MyClass.html').exists()
10+
11+
return true
12+
13+
} catch(Throwable e) {
14+
e.printStackTrace()
15+
return false
16+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
invoker.goals=clean compile -e
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
3+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
5+
<modelVersion>4.0.0</modelVersion>
6+
7+
<groupId>it.scala-maven-plugin</groupId>
8+
<artifactId>mismatchedScalaVersions</artifactId>
9+
<version>1.0-SNAPSHOT</version>
10+
<packaging>jar</packaging>
11+
<name>Test for Mismatched Scala versions and error message output!</name>
12+
<description>Test for Java + Scala compilation</description>
13+
14+
<dependencies>
15+
<dependency>
16+
<groupId>org.scala-lang</groupId>
17+
<artifactId>scala-library</artifactId>
18+
<version>2.13.13</version>
19+
</dependency>
20+
<dependency>
21+
<groupId>net.liftweb</groupId>
22+
<artifactId>lift-util_2.13</artifactId>
23+
<version>3.5.0</version>
24+
</dependency>
25+
<dependency>
26+
<groupId>org.openid4java</groupId>
27+
<artifactId>openid4java</artifactId>
28+
<version>0.9.3</version>
29+
</dependency>
30+
</dependencies>
31+
32+
<build>
33+
<pluginManagement>
34+
<plugins>
35+
<plugin>
36+
<groupId>@project.groupId@</groupId>
37+
<artifactId>@project.artifactId@</artifactId>
38+
<version>@project.version@</version>
39+
</plugin>
40+
</plugins>
41+
</pluginManagement>
42+
<plugins>
43+
<plugin>
44+
<groupId>@project.groupId@</groupId>
45+
<artifactId>@project.artifactId@</artifactId>
46+
<executions>
47+
<execution>
48+
<id>scala-compile-first</id>
49+
<phase>process-resources</phase>
50+
<goals>
51+
<goal>add-source</goal>
52+
<goal>compile</goal>
53+
</goals>
54+
</execution>
55+
<execution>
56+
<id>scala-test-compile</id>
57+
<phase>process-test-resources</phase>
58+
<goals>
59+
<goal>testCompile</goal>
60+
</goals>
61+
</execution>
62+
</executions>
63+
<configuration>
64+
<fork>false</fork>
65+
<failOnMultipleScalaVersions>false</failOnMultipleScalaVersions>
66+
</configuration>
67+
</plugin>
68+
</plugins>
69+
</build>
70+
71+
</project>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
class ScalaClass {
2+
3+
def abstractJavaMethod() : Unit = {
4+
Console.println("Test")
5+
}
6+
}
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
try {
2+
3+
def echoString = "[WARNING] Multiple versions of scala libraries detected!"
4+
def logFile = new File(basedir, "build.log")
5+
//Look for echo string
6+
def found = false;
7+
logFile.eachLine({ line ->
8+
if(line.contains(echoString)) {
9+
found = true;
10+
}
11+
});
12+
13+
assert found
14+
15+
16+
return true
17+
18+
} catch(Throwable e) {
19+
e.printStackTrace()
20+
return false
21+
}

0 commit comments

Comments
 (0)