I am getting the below exception when I run my mvn install
. I have even deleted the local repository and ran again getting same exception.
<
Maybe unrelated to the original reason in this question, but for those who would face same with gradle and local module dependency
dependencies {
checkstyle project(":module")
}
this error could happen, if module doesn't contain group and version, so in the module/build.gradle
just need to be specified
plugins {
id 'java-library'
}
group = "com.example"
version = "master-SNAPSHOT"
From gsitgithub/find-currupt-jars.txt, the following command lists all the corrupted jar files in the repository:
find /home/me/.m2/repository/ -name "*jar" | xargs -L 1 zip -T | grep error | grep invalid
You can delete the corrupted jar files, and recompile the project.
Example output:
warning [/cygdrive/J/repo/net/java/dev/jna/jna/4.1.0/jna-4.1.0.jar]: 98304 extra bytes at beginning or within zipfile
(attempting to process anyway)
file #1: bad zipfile offset (local header sig): 98304
(attempting to re-compensate)
zip error: Zip file invalid, could not spawn unzip, or wrong unzip (original files unmodified)