When building my application on Jenkins using maven I am seeing the following error after running:
mvn clean install -q -U -T 1.5C -DskipTests -Dsvn.info.skip=true
Error:
** [ERROR] COMPILATION ERROR : [ERROR] error reading /apps/jenkins/workspace/some_branch/.m2/com.some_company/any_random.jar; zip file is empty
[ERROR] cannot access com.some_company.some_class cannot access cannot access com.some_company.some_class zip END header not found cannot access jar
I tried excluding the dependency that was causing the issue as it was transitive but now it happens for other dependencies.
The dependencies are stored in nexus.
I have looked at the JDK being used to build the JARS and considered Network issues but nothing explains this.
Clearing Jenkins and the .m2 folder works sometime for one or two builds but I would like to find a better solution.
Any ideas?
Just delete the file
.m2/com.some_company/any_random.jar
and rerun your goal again. maybe your network or internet connection is slow or your hard disk need check.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With