igx
igx

Reputation: 4231

how to execute scoverage report with optional parameters using maven command

how can I add this optional parameters (e.g minimumCoverage ) with scoverage-maven-plugin . when calling

mvn scoverage:check

Upvotes: 1

Views: 1710

Answers (1)

Grzegorz Slowikowski
Grzegorz Slowikowski

Reputation: 246

Add to pom.xml file, e.g.:

        <plugin>
            <groupId>org.scoverage</groupId>
            <artifactId>scoverage-maven-plugin</artifactId>
            <version>1.3.0</version>
            <configuration>
                <minimumCoverage>50</minimumCoverage>
                <failOnMinimumCoverage>true</failOnMinimumCoverage>
            </configuration>
        </plugin>

or add to command line e.g.:

mvn scoverage:check -Dscoverage.minimumCoverage=50 -Dscoverage.failOnMinimumCoverage=true

or mix both methods. Command line parameters override those defined in pom.xml file.

Upvotes: 1

Related Questions