crizzis commented on a change in pull request #487: URL: https://github.com/apache/maven-surefire/pull/487#discussion_r824930706
########## File path: surefire-providers/surefire-junit-platform/pom.xml ########## @@ -136,6 +136,47 @@ </includes> </configuration> </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-jar-plugin</artifactId> + <executions> + <execution> + <id>api-jar</id> + <phase>package</phase> + <goals> + <goal>jar</goal> + </goals> + <configuration> + <classifier>api</classifier> Review comment: Also, if I understand correctly, here: > The plugin has configuration of class/methods. If somebody changes this in the SPI, then what you be valid? Configuration or SPI? You're asking what happens if someone overwrites the service to something else than `MethodSelectorFactory`. The answer is here: ``` private Collection<TestSelectorFactory> loadSelectorFactories() { return StreamSupport.stream( ServiceLoader.load( TestSelectorFactory.class ).spliterator(), false ) .collect( Collectors.toSet() ); } ``` Basically, there's no 'changing the SPI'. `MethodSelectorFactory` is always provided as the default implementation, and extending libraries can only add new service implementations. `MethodSelectorFactory` **cannot be resigned from, though**. Thus, for those users who do not extend this SPI in any way, the behavior of Surefire will be consistent with the behavior before this PR. > There are other two SPI modules surefire-extensions-spi (for the forked JVM) and surefire-extensions-api (for the plugin process) Yes, and unfortunately, they do not fit my use case. I *could* implement a custom `SurefireProvider`, but that would basically mean re-implementing the current `JUnitPlatformProvider`, which is 99% suitable but completely closed for extension. This minuscule SPI introduction is really the smallest possible change that solves the problem without affecting other plugin users. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org