You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Tibor Digana (Jira)" <ji...@apache.org> on 2019/12/04 12:35:00 UTC

[jira] [Comment Edited] (SUREFIRE-1731) Unable to test Multi Release Jar with surefire or failsafe

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

Tibor Digana edited comment on SUREFIRE-1731 at 12/4/19 12:34 PM:
------------------------------------------------------------------

Pls copy the solution from the Compiler Plugin.
I expected this was fixed because I remember we talked about in some other Jira issue with a user and Robert.
Feel free to open a PR on GH. Thx

btw, I have noticed that you are using {{--add-opens}} for junit5 platform. Why is that? Is there anything we can embed to our CLI from you?
btw, why you have so sad avatar picture on your GitHub? Use some smiling one :-)


was (Author: tibor17):
Pls copy the solution from the Compiler Plugin.
I expected this was fixed because I remember we talked about in some other Jira issue with a user and Robert.
Feel free to open a PR on GH. Thx

btw, I have noticed that you are using {{--add-opens}} for junit5 platform. Why is that? Is there anything we can embed to out CLI from you?
btw, why you have so sad avatar picture on your GitHub? Use some smiling one :-)

> Unable to test Multi Release Jar with surefire or failsafe
> ----------------------------------------------------------
>
>                 Key: SUREFIRE-1731
>                 URL: https://issues.apache.org/jira/browse/SUREFIRE-1731
>             Project: Maven Surefire
>          Issue Type: Bug
>          Components: Maven Failsafe Plugin, Maven Surefire Plugin
>    Affects Versions: 2.22.2, 3.0.0-M4
>            Reporter: John Patrick
>            Priority: Major
>
> I'm creating a Multi Release jar, containing base Java 1.8 and Java 11 classes. But am not able to successful test the Java 11 part.
> In the following repo, I've got 3 tests.
>  * 1 test needs to be executed using Java 1.8 that are under src/test/java.
>  * 2 tests need to be executed using Java 11 that are under src/test/java11.
> If the src/test/java tests are executed using Java 11 I expect it to fail which is expected, because it would be picking up the classes under target/classes/META-INF/versions/11/ and not the Java 1.8 version under target/classes/. Because the tests have been written to prove the correct source file is used for execution so the Java 1.8 BaseClass returns a different string to the Java 11 BaseClass.
> [https://github.com/nhojpatrick/issue-maven-multi-release-jar-testing]
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)