-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
220 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
src/it/test_ScalaMavenPlugin_Scala32Plus_ScalaTest/invoker.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
invoker.goals=clean verify site -e -ntp |
46 changes: 46 additions & 0 deletions
46
src/it/test_ScalaMavenPlugin_Scala32Plus_ScalaTest/pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<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"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>it.scoverage-maven-plugin</groupId> | ||
<artifactId>integration_tests_parent</artifactId> | ||
<version>1.0-SNAPSHOT</version> | ||
<relativePath>../integration_tests_parent/pom.xml</relativePath> | ||
</parent> | ||
|
||
<artifactId>test_ScalaMavenPlugin_Scala32Plus_ScalaTest</artifactId> | ||
<version>1.0-SNAPSHOT</version> | ||
<packaging>jar</packaging> | ||
<name>Test Scoverage Report using scala-maven-plugin, Scala 3.2+ and ScalaTest</name> | ||
<description>Test Scoverage Report using scala-maven-plugin, Scala 3.2+ and ScalaTest</description> | ||
|
||
<properties> | ||
<scala.compat.version>3</scala.compat.version> | ||
<scala.version>3.3.1</scala.version> | ||
<scala.library.artifact.id>scala3-library_3</scala.library.artifact.id> | ||
</properties> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
</plugin> | ||
<plugin> | ||
<groupId>net.alchim31.maven</groupId> | ||
<artifactId>scala-maven-plugin</artifactId> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.scalatest</groupId> | ||
<artifactId>scalatest-maven-plugin</artifactId> | ||
</plugin> | ||
<plugin> | ||
<groupId>@project.groupId@</groupId> | ||
<artifactId>@project.artifactId@</artifactId> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
6 changes: 6 additions & 0 deletions
6
src/it/test_ScalaMavenPlugin_Scala32Plus_ScalaTest/src/main/scala/HelloServiceScala.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package service | ||
|
||
object HelloServiceScala { | ||
def hello = { "Hello" } | ||
|
||
} |
12 changes: 12 additions & 0 deletions
12
...it/test_ScalaMavenPlugin_Scala32Plus_ScalaTest/src/test/scala/HelloServiceScalaTest.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package service | ||
|
||
import org.scalatest.wordspec.AnyWordSpec | ||
|
||
class HelloServiceScalaTest extends AnyWordSpec { | ||
|
||
"HelloService" should { | ||
"say hello" in { | ||
assert(HelloServiceScala.hello == "Hello") | ||
} | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
src/it/test_ScalaMavenPlugin_Scala32Plus_ScalaTest/validate.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
try { | ||
|
||
def logFile = new File(basedir, "build.log") | ||
def lines = logFile.readLines() | ||
assert lines.contains("[INFO] Statement coverage.: 100.00%") | ||
assert lines.contains("[INFO] Branch coverage....: 100.00%") | ||
|
||
def scoverageFile = new File(basedir, "target/scoverage.xml") | ||
assert scoverageFile.exists() | ||
|
||
def reportFile = new File(basedir, "target/site/scoverage/index.html") | ||
assert reportFile.exists() | ||
|
||
return true | ||
|
||
} catch (Throwable e) { | ||
e.printStackTrace() | ||
return false | ||
} |
1 change: 1 addition & 0 deletions
1
src/it/test_ScalaMavenPlugin_Scala32Plus_ScalaTest_ScalaVersion_Not_Set/invoker.properties
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
invoker.goals=clean verify site -e -ntp |
54 changes: 54 additions & 0 deletions
54
src/it/test_ScalaMavenPlugin_Scala32Plus_ScalaTest_ScalaVersion_Not_Set/pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
|
||
<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"> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>it.scoverage-maven-plugin</groupId> | ||
<artifactId>integration_tests_parent</artifactId> | ||
<version>1.0-SNAPSHOT</version> | ||
<relativePath>../integration_tests_parent/pom.xml</relativePath> | ||
</parent> | ||
|
||
<artifactId>test_ScalaMavenPlugin_Scala32Plus_ScalaTest_ScalaVersion_Not_Set</artifactId> | ||
<version>1.0-SNAPSHOT</version> | ||
<packaging>jar</packaging> | ||
<name>Test Scoverage Report using scala-maven-plugin, Scala 3.2+ and ScalaTest when scala.version is not set</name> | ||
<description>Test Scoverage Report using scala-maven-plugin, Scala 3.2+ and ScalaTest when scala.version is not set</description> | ||
|
||
<properties> | ||
<scala.compat.version>3</scala.compat.version> | ||
<scala.version/> | ||
<scala.library.artifact.id>scala3-library_3</scala.library.artifact.id> | ||
</properties> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.scala-lang</groupId> | ||
<artifactId>${scala.library.artifact.id}</artifactId> | ||
<version>3.3.1</version> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
</plugin> | ||
<plugin> | ||
<groupId>net.alchim31.maven</groupId> | ||
<artifactId>scala-maven-plugin</artifactId> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.scalatest</groupId> | ||
<artifactId>scalatest-maven-plugin</artifactId> | ||
</plugin> | ||
<plugin> | ||
<groupId>@project.groupId@</groupId> | ||
<artifactId>@project.artifactId@</artifactId> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
6 changes: 6 additions & 0 deletions
6
...nPlugin_Scala32Plus_ScalaTest_ScalaVersion_Not_Set/src/main/scala/HelloServiceScala.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package service | ||
|
||
object HelloServiceScala { | ||
def hello = { "Hello" } | ||
|
||
} |
12 changes: 12 additions & 0 deletions
12
...gin_Scala32Plus_ScalaTest_ScalaVersion_Not_Set/src/test/scala/HelloServiceScalaTest.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package service | ||
|
||
import org.scalatest.wordspec.AnyWordSpec | ||
|
||
class HelloServiceScalaTest extends AnyWordSpec { | ||
|
||
"HelloService" should { | ||
"say hello" in { | ||
assert(HelloServiceScala.hello == "Hello") | ||
} | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
src/it/test_ScalaMavenPlugin_Scala32Plus_ScalaTest_ScalaVersion_Not_Set/validate.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
try { | ||
|
||
def logFile = new File(basedir, "build.log") | ||
def lines = logFile.readLines() | ||
assert lines.contains("[INFO] Statement coverage.: 100.00%") | ||
assert lines.contains("[INFO] Branch coverage....: 100.00%") | ||
|
||
def scoverageFile = new File(basedir, "target/scoverage.xml") | ||
assert scoverageFile.exists() | ||
|
||
def reportFile = new File(basedir, "target/site/scoverage/index.html") | ||
assert reportFile.exists() | ||
|
||
return true | ||
|
||
} catch (Throwable e) { | ||
e.printStackTrace() | ||
return false | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters