Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Fixed
-
2.11
-
None
-
Maven 3.0.3
Java 6
Description
Currently some JAR containing a RunListener for JUnit must be located in the project's classpath (and pollutes the classpath with most likely unwanted transitive dependencies).
An alternative is to use the 'additionalClasspathElements' configuration element in the maven-surefire-plugin's configuration. Unfortunately this cannot be used to specify another maven artifact directly - only JARs or class folders in the file system.
It would be consistent to enable the usage of plugin dependencies (<dependencies> element in the <plugin> section of the POM) to load such classes:
<plugin> <artifactId>maven-surefire-plugin</artifactId> <configuration> <properties> <property> <name>listener</name> <value>some.RunListener</value> </property> </properties> </configuration> <!-- reference the JAR containing the class some.RunListener as plugin dependency (this is possible from the Maven point of view, but currently does not work) --> <dependencies> <dependency> <groupId>some.group.id</groupId> <artifactId>some-artifact-id</artifactId> <version>${some.version}</version> </dependency> </dependencies> </plugin>