-
Notifications
You must be signed in to change notification settings - Fork 125
Open
Description
Sometimes properties are not explicitly set in the pom.xml but are rather set through some other plugins. Most prominent example is https://www.jacoco.org/jacoco/trunk/doc/prepare-agent-mojo.html#propertyName.
As this property can obviously not be resolved when extracting the surefire/failsafe plugins, all unknown placeholder inside ${...} should just be replaced by the empty string.
For example I have this configuration in my pom.xml
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.2</version>
<executions>
<execution>
<id>default-test</id>
<phase>test</phase>
<goals>
<goal>test</goal>
</goals>
<configuration>
<argLine>${test.opts.coverage} -Xmx512m</argLine>
</configuration>
</execution>
</executions>
Usually test.opts.coverage is populated from
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.12</version>
<executions>
<execution>
<id>pre-unit-test</id>
<goals>
<goal>prepare-agent</goal>
</goals>
<configuration>
<propertyName>test.opts.coverage</propertyName>
</configuration>
</execution>
</executions>
This leads to the following error launching the auto-created JUnit configuration Reference to undefined variable test.opts.coverage because the VM arguments contain the unresolved ${test.opts.coverage} .
This is a regression of c8bcaaa.
Metadata
Metadata
Assignees
Labels
No labels