Search code examples
javamavenintellij-ideaextentreports

Maven/Java/Intellij/Extentreports - corrupt class in jar


Edit: Solved by updating to IntelliJ IDEA 2023.1.2

Starting a minimal maven project in IntelliJ 2019.2 or 2023.1.2 with the most basic POM like this:

<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>a</groupId>
    <artifactId>a</artifactId>
    <version>1.0-SNAPSHOT</version>
<dependencies>
    <dependency>
        <groupId>com.aventstack</groupId>
        <artifactId>extentreports</artifactId>
        <version>5.0.9</version>
    </dependency>
</dependencies>
</project>

an important class for ExtentReports (ExtentTest) is not downloaded correctly:

enter image description here enter image description here

This means I can't use ExtentTest.class, and therefore can't work with ExtentReports.

Works in Eclipse on the same computer. Works in IntelliJ on another machine. All other maven operations work with IntelliJ. The usual maven dance (deleting .m2, invalidate caches etc.) done repeatedly. Various colleagues looked over my shoulder and haven't noticed anything silly. Encoding shown as UTF-8 for this and other classes. Affects all Versions of ExtentReports, including 2.xx.

Does anyone know what is up with the ExtentTest.class?

Thanks!

Edit: Output of idea.log.

2023-06-12 08:30:46,132 [  67872]   INFO - rationStore.ComponentStoreImpl - Saving Project 'C:\Users\n010215\seleniumtest' seleniumtestRunManager took 13 ms 
2023-06-12 08:32:00,845 [ 142585]   INFO - mponents.impl.stores.StoreUtil - saveProjectsAndApp took 140 ms 
2023-06-12 08:32:04,136 [ 145876]   INFO -      #org.jetbrains.idea.maven - [WARNING] The artifact org.apache.commons:commons-io:jar:1.3.2 has been relocated to commons-io:commons-io:jar:1.3.2 
2023-06-12 08:32:05,532 [ 147272]   INFO - pl.ProjectRootManagerComponent - project roots have changed 
2023-06-12 08:32:05,565 [ 147305]   INFO - .diagnostic.PerformanceWatcher - Pushing properties took 6ms; general responsiveness: ok; EDT responsiveness: ok 
2023-06-12 08:32:05,741 [ 147481]   INFO - .diagnostic.PerformanceWatcher - Indexable file iteration took 176ms; general responsiveness: ok; EDT responsiveness: ok 
2023-06-12 08:32:31,896 [ 173636]   INFO -      #org.jetbrains.idea.maven - [WARNING] The artifact org.apache.commons:commons-io:jar:1.3.2 has been relocated to commons-io:commons-io:jar:1.3.2 
2023-06-12 08:32:33,070 [ 174810]   INFO - pl.ProjectRootManagerComponent - project roots have changed 
2023-06-12 08:32:33,087 [ 174827]   INFO - .diagnostic.PerformanceWatcher - Pushing properties took 3ms; general responsiveness: ok; EDT responsiveness: ok 
2023-06-12 08:32:33,237 [ 174977]   INFO - .diagnostic.PerformanceWatcher - Indexable file iteration took 150ms; general responsiveness: ok; EDT responsiveness: ok 
2023-06-12 08:32:37,152 [ 178892]   WARN - ution.rmi.RemoteProcessSupport - WARNING: An illegal reflective access operation has occurred 
2023-06-12 08:32:37,152 [ 178892]   WARN - ution.rmi.RemoteProcessSupport - WARNING: Illegal reflective access by com.intellij.util.ReflectionUtilRt (file:/C:/Program%20Files%20(x86)/JetBrains/IntelliJ%20IDEA%20Community%20Edition%202019.2.2/lib/util.jar) to field java.lang.ApplicationShutdownHooks.hooks 
2023-06-12 08:32:37,152 [ 178892]   WARN - ution.rmi.RemoteProcessSupport - WARNING: Please consider reporting this to the maintainers of com.intellij.util.ReflectionUtilRt 
2023-06-12 08:32:37,152 [ 178892]   WARN - ution.rmi.RemoteProcessSupport - WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations 
2023-06-12 08:32:37,152 [ 178892]   WARN - ution.rmi.RemoteProcessSupport - WARNING: All illegal access operations will be denied in a future release 
2023-06-12 08:32:37,510 [ 179250]   INFO -      #org.jetbrains.idea.maven - [INFO] Using 'UTF-8' encoding to copy filtered resources. 
2023-06-12 08:32:37,517 [ 179257]   INFO -      #org.jetbrains.idea.maven - [INFO] Copying 0 resource 
2023-06-12 08:33:14,422 [ 216162]   INFO - rationStore.ComponentStoreImpl - Saving Project 'C:\Users\n010215\seleniumtest' seleniumtestRunManager took 13 ms 
2023-06-12 08:33:26,277 [ 228017]   INFO - pl.ProjectRootManagerComponent - project roots have changed 
2023-06-12 08:33:26,290 [ 228030]   INFO - g.FileBasedIndexProjectHandler - Reindexing refreshed files: 35 to update, calculated in 1ms 
2023-06-12 08:33:26,354 [ 228094]   INFO - .diagnostic.PerformanceWatcher - Reindexing refreshed files took 64ms; general responsiveness: ok; EDT responsiveness: ok 
2023-06-12 08:33:26,369 [ 228109]   INFO - .diagnostic.PerformanceWatcher - Pushing properties took 3ms; general responsiveness: ok; EDT responsiveness: ok 
2023-06-12 08:33:26,406 [ 228146]   INFO - .diagnostic.PerformanceWatcher - Indexable file iteration took 36ms; general responsiveness: ok; EDT responsiveness: ok 
2023-06-12 08:33:45,649 [ 247389]   INFO -      #org.jetbrains.idea.maven - [WARNING] The artifact org.apache.commons:commons-io:jar:1.3.2 has been relocated to commons-io:commons-io:jar:1.3.2 
2023-06-12 08:33:46,897 [ 248637]   INFO - pl.ProjectRootManagerComponent - project roots have changed 
2023-06-12 08:33:46,931 [ 248671]   INFO - .diagnostic.PerformanceWatcher - Pushing properties took 10ms; general responsiveness: ok; EDT responsiveness: ok 
2023-06-12 08:33:47,033 [ 248773]   INFO - .diagnostic.PerformanceWatcher - Indexable file iteration took 102ms; general responsiveness: ok; EDT responsiveness: ok 
2023-06-12 08:34:57,810 [ 319550]   INFO - pl.ProjectRootManagerComponent - project roots have changed 
2023-06-12 08:34:57,837 [ 319577]   INFO - .diagnostic.PerformanceWatcher - Pushing properties took 2ms; general responsiveness: ok; EDT responsiveness: ok 
2023-06-12 08:34:57,916 [ 319656]   INFO - .diagnostic.PerformanceWatcher - Indexable file iteration took 79ms; general responsiveness: ok; EDT responsiveness: ok 
2023-06-12 08:35:01,283 [ 323023]   INFO - rationStore.ComponentStoreImpl - Saving Project 'C:\Users\n010215\seleniumtest' seleniumtestRunManager took 11 ms 

Solution

  • Solved by updating to IntelliJ IDEA 2023.1.2

    May this weird issue with the old IntelliJ version RIP unsolved