-
Notifications
You must be signed in to change notification settings - Fork 159
Closed
Labels
Description
Setting systemProperties on the surefire plugin seems to not be available when running a test.
Project to test : github.com/konveyor/tackle-pathfinder
Class to test : AssessmentsResourceTest.java ( any test )
It will fail becayse the system property "keycloak.version" defined in a dependency of this project is not available to the test. This project depends on github.com/konveyor/tackle-commons-rest , and there in the rest-test submodule you can find class KeycloakTestResource that tries to ready that property.
Definition of the property :
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>${surefire-plugin.version}</version>
<configuration>
<systemPropertyVariables>
<keycloak.version>${keycloak.version}</keycloak.version>
</systemPropertyVariables>
</configuration>
</plugin>
<plugin>
<artifactId>maven-failsafe-plugin</artifactId>
<version>${surefire-plugin.version}</version>
<configuration>
<systemPropertyVariables>
<keycloak.version>${keycloak.version}</keycloak.version>
</systemPropertyVariables>
</configuration>
</plugin>
</plugins>
</build>```
It also fails if the property is defined in the project being tested.