Menu

#260 opencsv 5.11.1 includes junit-vintage-engine as a compile-time dependency

v1.0 (example)
closed-fixed
None
5
4 days ago
2025-06-02
DnD
No

opencsv 5.11.1 includes junit-vintage-engine as a compile-time dependency

Discussion

  • David Thalmann

    David Thalmann - 2025-06-02

    Workaround until fixed:

    <dependency>
       <groupId>com.opencsv</groupId>
       <artifactId>opencsv</artifactId>
       <version>5.11.1</version>
       <exclusions>
          <exclusion>
             <groupId>org.junit.vintage</groupId>
             <artifactId>junit-vintage-engine</artifactId>
          </exclusion>
       </exclusions>
    </dependency>
    
     

    Last edit: David Thalmann 2025-06-02
  • Jeremy Landis

    Jeremy Landis - 2025-06-13

    The fix you added to the repo isn't right. Runtime will still cause the work around to be required. I presume there is no reason any junit is on the source path, it should therefore be 'test' scoped.

     
  • Matteo Franci

    Matteo Franci - 2025-06-15

    I had the same issue after upgrading to opencsv 5.11.1, is there any reason why dependency junit-vintage-engine is in scope runtime instead of test?

     
  • Scott Conway

    Scott Conway - 2025-06-15

    Yes there is a reason - the maven surefire plugin requires the scope to be compile, runtime or system otherwise the reports are not created during compile time.

    mvn clean install site:site
    [INFO] Scanning for projects...
    [ERROR] [ERROR] Some problems were encountered while processing the POMs:
    [ERROR] 'build.plugins.plugin[org.apache.maven.plugins:maven-surefire-plugin].dependencies.dependency.scope' for org.junit.jupiter:junit-jupiter-engine:jar must be one of [compile, runtime, system] but is 'test'. @ line 491, column 32
    [ERROR] 'build.plugins.plugin[org.apache.maven.plugins:maven-surefire-plugin].dependencies.dependency.scope' for org.junit.vintage:junit-vintage-engine:jar must be one of [compile, runtime, system] but is 'test'. @ line 497, column 32
    @
    [ERROR] The build could not read 1 project -> [Help 1]
    [ERROR]
    [ERROR] The project com.opencsv:opencsv:5.11.2-SNAPSHOT (/Users/scott/Documents/workspace/opencsv-source/pom.xml) has 2 errors
    [ERROR] 'build.plugins.plugin[org.apache.maven.plugins:maven-surefire-plugin].dependencies.dependency.scope' for org.junit.jupiter:junit-jupiter-engine:jar must be one of [compile, runtime, system] but is 'test'. @ line 491, column 32
    [ERROR] 'build.plugins.plugin[org.apache.maven.plugins:maven-surefire-plugin].dependencies.dependency.scope' for org.junit.vintage:junit-vintage-engine:jar must be one of [compile, runtime, system] but is 'test'. @ line 497, column 32
    [ERROR]
    [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
    [ERROR] Re-run Maven using the -X switch to enable full debug logging.
    [ERROR]
    [ERROR] For more information about the errors and possible solutions, please read the following articles:
    [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException

    In the 5.11 release when I upgraded the junit versions I made them all default, compile, scope to simplify things and thus the bugs began. I am ASSuming it is because of concerns over final size with unused jar files or maybe some security concerns - I dunno.

    I will go back through and put back the original scopes when I get a chance.

     
  • Scott Conway

    Scott Conway - 4 days ago
    • status: open --> closed-fixed
    • assigned_to: Scott Conway
     
  • Scott Conway

    Scott Conway - 4 days ago

    fixed in 5.11.2 release.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.