There are two approaches that I know.
Command line:
You can pass it on the command line, for example
mvn -DAM_HOME=conf install
Using pom:
If AM_HOM is a variable and the value is conf , enter the entry as shown below.
<plugins> ... <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> ... <configuration> ... <environmentVariables> <AM_HOME>conf</AM_HOME> </environmentVariables> </configuration> </plugin> ... <plugins>
source share