maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jakob Oswald (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (SUREFIRE-1343) Failsafe ignores classesDirectory
Date Thu, 16 Mar 2017 08:48:41 GMT

    [ https://issues.apache.org/jira/browse/SUREFIRE-1343?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15927208#comment-15927208
] 

Jakob Oswald edited comment on SUREFIRE-1343 at 3/16/17 8:48 AM:
-----------------------------------------------------------------

I understand the preference of loading classes from the packaged artifact. However I would
like to use instrumented classes to record coverage for integration tests. I would expect
failsafe to respect my choice if I explicitly set the classesDirectory parameter and not just
ignoring it. What else would be the recommended scenario here? Would I have to package an
additional jar with the instrumented classes and move the jars around?

EDIT: Is there any good argument to not implement it like [~pwebb] suggested in SUREFIRE-1198?

This would:
* Allow users to explicitly choose their artifact or classes directory (which in my opinion
exist valid reasons to do so) 
* Keep backwards compatibility to {{2.18.x}}
* Still load the packaged artifact by default


was (Author: jakob_oswald):
I understand the preference of loading classes from the packaged artifact. However I would
like to use instrumented classes to record coverage for integration tests. I would expect
failsafe to respect my choice if I explicitly set the classesDirectory parameter and not just
ignoring it. What else would be the recommended scenario here? Would I have to package an
additional jar with the instrumented classes and move the jars around?

EDIT: Is there any good argument to not implement it like [~pwebb] suggested in SUREFIRE-1198?

This would:
* Allow users to explicitly chooser their artifact or classes directory (which in my opinion
exist valid reasons to do so) 
* Keep backwards compatibility to {{2.18.x}}
* Still load the packaged artifact by default

> Failsafe ignores classesDirectory
> ---------------------------------
>
>                 Key: SUREFIRE-1343
>                 URL: https://issues.apache.org/jira/browse/SUREFIRE-1343
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: classloading
>    Affects Versions: 2.19.1
>            Reporter: Jakob Oswald
>
> The maven failsafe pluging ignores the <classesDirectory> property in versions
2.19.x version 2.18.1 works as expected / documented. 
> Config:
> {code:xml}
> ...
> <configuration>
>     <classesDirectory>${project.build.directory}/classes</classesDirectory>
> </configuration>
> ...
> {code}
> Cmd:
> mvn -X clean verify
> Output:
> 2.18.1
> [DEBUG] boot classpath:
> /home/jakob/.m2/repository/org/apache/maven/surefire/surefire-booter/2.18.1/surefire-booter-2.18.1.jar
> /home/jakob/.m2/repository/org/apache/maven/surefire/surefire-api/2.18.1/surefire-api-2.18.1.jar
> /home/jakob/source/java/qualinsight-mojo-cobertura-test/target/test-classes
> /home/jakob/source/java/qualinsight-mojo-cobertura-test/target/classes
> ...
> 2.19.1
> [DEBUG] boot classpath:
> /home/jakob/.m2/repository/org/apache/maven/surefire/surefire-booter/2.19.1/surefire-booter-2.19.1.jar
> /home/jakob/.m2/repository/org/apache/maven/surefire/surefire-api/2.19.1/surefire-api-2.19.1.jar
> /home/jakob/source/java/qualinsight-mojo-cobertura-test/target/test-classes
> /home/jakob/source/java/qualinsight-mojo-cobertura-test/target/qualinsight-mojo-cobertura-test-0.0.1-SNAPSHOT.jar
> ...



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Mime
View raw message