You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-**[pre-compile](http://scoverage.github.io/scoverage-maven-plugin/2.0.1/pre-compile-mojo.html)** and **[post-compile](http://scoverage.github.io/scoverage-maven-plugin/2.0.1/post-compile-mojo.html)** are internal goals, they configure Maven build in forked `scoverage` life cycle; don't use them.
Plugin is compatible with two Maven Scala compiler plugins:
50
+
-Plugin is compatible with two Maven Scala compiler plugins:
51
51
52
-
-[SBT Compiler Maven Plugin](https://github.com/sbt-compiler-maven-plugin/sbt-compiler-maven-plugin/) - version **1.0.0-beta5** or later required,
52
+
-[Scala Maven Plugin](http://davidb.github.io/scala-maven-plugin/) - version `3.0.0` or later required, [addScalacArgs](http://davidb.github.io/scala-maven-plugin/compile-mojo.html#addScalacArgs) and [analysisCacheFile](http://davidb.github.io/scala-maven-plugin/compile-mojo.html#analysisCacheFile) configuration parameters cannot be set directly, use project properties `addScalacArgs` and `analysisCacheFile` instead.
53
+
54
+
-[SBT Compiler Maven Plugin](https://github.com/sbt-compiler-maven-plugin/sbt-compiler-maven-plugin/) - version `1.0.0-beta5` or later required, works with plugin off version `1.4.11`.
53
55
54
-
-[Scala Maven Plugin](http://davidb.github.io/scala-maven-plugin/) - version **3.0.0** or later required, [addScalacArgs](http://davidb.github.io/scala-maven-plugin/compile-mojo.html#addScalacArgs) and [analysisCacheFile](http://davidb.github.io/scala-maven-plugin/compile-mojo.html#analysisCacheFile) configuration parameters cannot be set directly, use project properties 'addScalacArgs' and 'analysisCacheFile' instead.
56
+
- Plugin is not thread-safe, so it should not be used in multi-threaded builds.
57
+
- Starting with version `2.0.0` plugin supports Scala `2.12.8+`, `2.13.0+` and `3.2.0+`. For Scala `2.10` and `2.11` support please use plugin of version `1.4.11`.
55
58
56
59
57
-
#####Scoverage Maven plugin version
60
+
### Scoverage Maven plugin version
58
61
59
62
This can be set as project property.
60
63
@@ -67,9 +70,12 @@ This can be set as project property.
67
70
```
68
71
69
72
70
-
#####Scala version configuration
73
+
### Scala version configuration
71
74
72
-
Plugin supports Scala 2.12.8+, 2.13.0+ and 3.2.0+ versions by automatically loading and configuring matching `scalac-scoverage-plugin` Scalac SCoverage Plugin artifact. For this to work Scala version has to be set. It can be done by defining `scalaVersion` plugin configuration parameter or `scala.version` project property. Without this setting, coverage will not be calculated.
75
+
Plugin automatically loads and configures matching `scalac-scoverage-plugin` artifact when needed.
76
+
For this to work Scala version has to be set. It can be done by defining `scalaVersion` plugin configuration parameter or `scala.version` project property.
77
+
Without this setting, plugin will try to resolve Scala version from `scala-library` dependency of the project.
78
+
If all the attempts to resolve Scala version fail, then coverage will not be calculated.
73
79
74
80
```xml
75
81
<project>
@@ -99,7 +105,7 @@ or
99
105
</project>
100
106
```
101
107
102
-
The first method is better because once the property is defined it's value can be used in other places of the build file. For example in `scala-library` dependency version every Scala build should declare.
108
+
The first method is better because once the property is defined its value can be used in other places of the build file. For example in `scala-library` dependency version every Scala build should declare.
103
109
104
110
```xml
105
111
<project>
@@ -115,7 +121,7 @@ The first method is better because once the property is defined it's value can b
115
121
116
122
For Scala 2.10 and 2.11 support please use Scoverage Maven plugin `1.4.11`.
117
123
118
-
#####Scalac SCoverage plugin version configuration
124
+
### Scalac SCoverage plugin version configuration
119
125
120
126
Maven SCoverage plugin uses by default the latest version of the [scalac-scoverage-plugin](https://github.com/scoverage/scalac-scoverage-plugin) available on its release day.
121
127
If newer, better version of [scalac-scoverage-plugin](https://github.com/scoverage/scalac-scoverage-plugin) is available, it can be used instead.
@@ -149,11 +155,11 @@ or
149
155
</project>
150
156
```
151
157
152
-
#####Integration tests coverage check and reports
158
+
### Integration tests coverage check and reports
153
159
154
160
`integration-check` and `integration-report` mojos are similar to `check` and `report` mojos, but they execute forked `scoverage` life cycle up to `verify` phase (integration tests are usually executed in `integration-test` phase).
155
161
156
-
#####Aggregated reports for multi-module projects
162
+
### Aggregated reports for multi-module projects
157
163
158
164
There is no separate mojo for aggregated reports, there is `aggregate` parameter.
159
165
To additionally generate aggregated SCoverage report for root module, when generating regular reports,
@@ -261,10 +267,10 @@ or in `reporting/plugins` section when adding report to Maven generated site
261
267
</project>
262
268
```
263
269
264
-
#####Adding SCoverage report to site
270
+
### Adding SCoverage report to site
265
271
266
272
Add plugin to reporting section of your project and configure it to generate one of reporting mojos.
267
-
By default Maven executes all plugin's reporting mojos, but SCoverage plugin has three such mojos
273
+
By default, Maven executes all plugin's reporting mojos, but SCoverage plugin has three such mojos,
268
274
and it does not make sense, to execute them all because every executed report will overwrite the previous one.
269
275
Configure one of them depending on your case.
270
276
@@ -299,7 +305,7 @@ Which reporting mojo should be selected:
299
305
|[integration-report](http://scoverage.github.io/scoverage-maven-plugin/2.0.1/integration-report-mojo.html)| When using integration tests |
300
306
|[report-only](http://scoverage.github.io/scoverage-maven-plugin/2.0.1/report-only-mojo.html)| When coverage data was already generated (usually by [check](http://scoverage.github.io/scoverage-maven-plugin/2.0.1/check-mojo.html) or [integration-check](http://scoverage.github.io/scoverage-maven-plugin/2.0.1/integration-check-mojo.html) mojo) |
301
307
302
-
#####Customizing code instrumentation
308
+
### Customizing code instrumentation
303
309
304
310
If you want to customize plugin's configuration parameters used by compilation supporting part of the plugin, do it in 'plugins' or 'pluginManagement' section:
305
311
```xml
@@ -325,7 +331,7 @@ If you want to customize plugin's configuration parameters used by compilation s
325
331
Read [SBT SCoverage Plugin documentation](https://github.com/scoverage/sbt-scoverage) for more information about [highlighting](https://github.com/scoverage/sbt-scoverage#highlighting) and [excludedPackages](https://github.com/scoverage/sbt-scoverage#exclude-classes-and-packages).
326
332
327
333
328
-
#####Checking minimum test coverage level
334
+
### Checking minimum test coverage level
329
335
330
336
```xml
331
337
<project>
@@ -362,7 +368,7 @@ Run `mvn scoverage:check` to perform the check. See below if you want to use `mv
362
368
Read [SBT SCoverage Plugin documentation](https://github.com/scoverage/sbt-scoverage#minimum-coverage) for more information.
363
369
364
370
365
-
#####Checking minimum test coverage level AND adding report to site
371
+
### Checking minimum test coverage level AND adding report to site
0 commit comments