René Zanner created SUREFIRE-826:
------------------------------------

             Summary: maven-surefire-plugin does not add its own plugin 
dependencies to the classpath
                 Key: SUREFIRE-826
                 URL: https://jira.codehaus.org/browse/SUREFIRE-826
             Project: Maven Surefire
          Issue Type: Improvement
          Components: classloading, Maven Surefire Plugin
    Affects Versions: 2.11
         Environment: Maven 3.0.3
Java 6
            Reporter: René Zanner


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:

{code:xml}
<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>
{code}


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: 
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


Reply via email to