File tree 5 files changed +75
-0
lines changed
src/it/test_skip_configured
5 files changed +75
-0
lines changed Original file line number Diff line number Diff line change
1
+ invoker.goals =clean verify site -e -ntp
Original file line number Diff line number Diff line change
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
+ <parent >
8
+ <groupId >it.scoverage-maven-plugin</groupId >
9
+ <artifactId >integration_tests_parent</artifactId >
10
+ <version >1.0-SNAPSHOT</version >
11
+ <relativePath >../integration_tests_parent/pom.xml</relativePath >
12
+ </parent >
13
+
14
+ <artifactId >test_skip_configured</artifactId >
15
+ <version >1.0-SNAPSHOT</version >
16
+ <packaging >jar</packaging >
17
+ <name >Test Scoverage is Skipped when configured</name >
18
+ <description >Test Scoverage is Skipped when configured</description >
19
+
20
+ <build >
21
+ <plugins >
22
+ <plugin >
23
+ <groupId >org.apache.maven.plugins</groupId >
24
+ <artifactId >maven-compiler-plugin</artifactId >
25
+ </plugin >
26
+ <plugin >
27
+ <groupId >net.alchim31.maven</groupId >
28
+ <artifactId >scala-maven-plugin</artifactId >
29
+ </plugin >
30
+ <plugin >
31
+ <groupId >org.scalatest</groupId >
32
+ <artifactId >scalatest-maven-plugin</artifactId >
33
+ </plugin >
34
+ <plugin >
35
+ <groupId >@project.groupId@</groupId >
36
+ <artifactId >@project.artifactId@</artifactId >
37
+ <configuration >
38
+ <skip >true</skip >
39
+ </configuration >
40
+ </plugin >
41
+ </plugins >
42
+ </build >
43
+ </project >
Original file line number Diff line number Diff line change
1
+ package service
2
+
3
+ object HelloServiceScala {
4
+ def hello = { " Hello" }
5
+
6
+ }
Original file line number Diff line number Diff line change
1
+ package service
2
+
3
+ import org .scalatest .wordspec .AnyWordSpec
4
+
5
+ class HelloServiceScalaTest extends AnyWordSpec {
6
+
7
+ " HelloService" should {
8
+ " say hello" in {
9
+ assert(HelloServiceScala .hello == " Hello" )
10
+ }
11
+ }
12
+ }
Original file line number Diff line number Diff line change
1
+ try {
2
+
3
+ def logFile = new File (basedir, " build.log" )
4
+ def lines = logFile. readLines()
5
+ assert lines. contains(" [INFO] Skipping Scoverage execution" )
6
+ assert ! lines. contains(" Generating \" SCoverage\" report" )
7
+
8
+ return true
9
+
10
+ } catch (Throwable e) {
11
+ e. printStackTrace()
12
+ return false
13
+ }
You can’t perform that action at this time.
0 commit comments