<configuration>
<suiteXmlFiles>
<suiteXmlFile>configuration/${suiteXmlFileName}.xml</suiteXmlFile>
</suiteXmlFiles>
<systemPropertyVariables>
<config.location.env>${config.location.env}</config.location.env>
<config.location.aut>${config.location.aut}</config.location.aut>
</systemPropertyVariables>
</configuration>
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.site</groupId>
<artifactId>tests</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>
<profiles>
<profile>
<id>tests_default</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<suiteXmlFileName>tests_default</suiteXmlFileName>
</properties>
</profile>
<profile>
<id>aut_default</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<config.location.aut>configuration/aut_default.xml</config.location.aut>
</properties>
</profile>
<profile>
<id>tests_data</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<config.location.test>configuration/tests_data.xml</config.location.test>
</properties>
</profile>
<profile>
<id>env_docker_selenoid</id>
<activation>
<property>
<name>env.MAVEN_IN_DOCKER</name>
<value>true</value>
</property>
</activation>
<properties>
<config.location.env>configuration/env_docker_selenoid.xml</config.location.env>
</properties>
</profile>
<profile>
<id>env_local</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<config.location.env>configuration/env_local.xml</config.location.env>
</properties>
</profile>
</profiles>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.7.0</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>3.0.0</version>
<executions>
<execution>
<id>validate</id>
<phase>validate</phase>
<configuration>
<encoding>UTF-8</encoding>
<consoleOutput>true</consoleOutput>
<includeTestSourceDirectory>true</includeTestSourceDirectory>
<failsOnError>true</failsOnError>
</configuration>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.20.1</version>
<configuration>
<suiteXmlFiles>
<suiteXmlFile>configuration/${suiteXmlFileName}.xml</suiteXmlFile>
</suiteXmlFiles>
<systemPropertyVariables>
<config.location.env>${config.location.env}</config.location.env>
<config.location.aut>${config.location.aut}</config.location.aut>
<config.location.test>${config.location.test}</config.location.test>
</systemPropertyVariables>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>3.9.1</version>
</dependency>
<dependency>
<groupId>org.testng</groupId>
<artifactId>testng</artifactId>
<version>6.14.2</version>
<scope>test</scope>
</dependency>
</dependencies>
</project>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>${maven-antrun-plugin.version}</version>
<executions>
<execution>
<phase>generate-resources</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<echo>Displaying value of 'something' property</echo>
<echo>[something]: ${something}</echo>
</tasks>
</configuration>
</execution>
</executions>
</plugin>
mvn -Pcustom compile
main:
[echo] Displaying value of 'something' property
[echo] [something]: 100500mvn compile
main:
[echo] Displaying value of 'something' property
[echo] [something]: 42<?xml version="1.0"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>example</groupId>
<artifactId>toy</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>${project.groupId}:${project.artifactId}</name>
<description/>
<properties>
<something></something>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.8</version>
<executions>
<execution>
<phase>generate-resources</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<tasks>
<echo>Displaying value of 'something' property</echo>
<echo>[something]: ${something}</echo>
</tasks>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>default</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<something>42</something>
</properties>
</profile>
<profile>
<id>custom</id>
<activation>
<activeByDefault>false</activeByDefault>
</activation>
<properties>
<something>100500</something>
</properties>
</profile>
</profiles>
</project>