Knowledge Base > JCover CLI > Advanced Maven options
Advanced Maven options
Getting started with JCover using Maven is covered in: Getting started with JCover. The options described below are for more advanced use:
To force JCover to use Maven:
--maven
To use a Maven settings file (substituting the actual file name):
--settings file-name
To specify which Maven profiles to use (substituting the actual profile name):
-P profile
To specify the Maven project/submodule (substituting the actual project name):
--project name
To create a configuration file:
$ jcover --maven-config
(This creates jcover.config in the run directory, containing Jcover parameters for the module under test. JCover then uses these options when run against a specific class.)
To create tests for a specific Java class:
$ jcover --maven classname
(This creates tests, displayed on the screen, for the given classname.)
Examples:
$ jcover --maven org.springframework.samples.petclinic.vet.Vet
$ jcover classname
(Note: This requires that you have previously run jcover --maven-config
.)