Skip to content

Deferred properties in surefire argLine cause problems - bug still exists #1961

Open
@bohni

Description

@bohni

This issue #1824 still exists in jee-2025-03

To reproduce

  1. Install Eclipse JEE 2025-03

  2. Clone JUnit5 sample repo https://github.com/junit-team/junit5-samples/

  3. Add surefire config to junit5-samples/junit5-jupiter-starter-maven/pom.xml, Line 40ff

     <plugin>
         <artifactId>maven-surefire-plugin</artifactId>
         <version>3.5.2</version>
         <configuration>
             <argLine>@{argLine} -Xshare:off -Dfile.encoding=UTF-8</argLine>
         </configuration>
     </plugin>
    

    Using @{argLine} is needed because of late property evaluation

  4. Import folder/project junit5-samples/junit5-jupiter-starter-maven/ in eclipse

  5. Right click test class CalculatorTests and Select Run As > JUnit Test

Additional Info

  • Selecting a package and using Run As > JUnit Test does work
  • Selecting a Test Class with @Nested classes and running only a nested test class does work, too

Edit: This also applies to the maven-failsafe-plugin for integration tests

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions