3

I'm running into following error frequently

[BuilderThread 4] [WARNING] error reading /opt/jenkins/maven-repositories/0/com/fasterxml/jackson/core/jackson-annotations/2.8.0/jackson-annotations-2.8.0.jar; zip file is empty

The missing/corrupt jar file varies from failure to failure.

The quick fix would be to clean up the repository and rerun the build. However, that's not manageable when you have tons of builds on several jenkins boxes.

I'd like to know why is that happening and if there's a fix? I'm using Maven 3.3.9.

----------Update

I might have found the root cause: the 'multi-threaded' build. The build is run with -T1C. I'm seeing following log statements related to the corrupt jar.

[Builder Thread 0] Downloading ... jackson-annotations-2.8.0.jar
[Builder Thread 7] Downloading ... jackson-annotations-2.8.0.jar
[Builder Thread 3] Downloading ... jackson-annotations-2.8.0.jar
...
[Builder Thread 1] [WARNING] error reading ......jackson-annotations-2.8.0.jar; zip file is empty

Downloading the dependencies is an integral component in Maven. I'd expect it to be multi-thread safe. The build doesn't seem to fail if -T is not passed.

I'd like any inputs on how to fix this. Is there a way to tell Maven to get dependencies first and then start the 'multi-threaded' build on Jenkins?

phanin
  • 5,327
  • 5
  • 32
  • 50

0 Answers0