simplecaptcha-1.2.1.jar cannot be read or is not a valid ZIP file

Viewed 2032

POM.xml

<!-- https://mvnrepository.com/artifact/nl.captcha/simplecaptcha -->
<dependency>
    <groupId>nl.captcha</groupId>
    <artifactId>simplecaptcha</artifactId>
    <version>1.2.1</version>
</dependency>

Java build path Problems

Description: Resource Path Location Type Archive for required library: 'C:/Users/RAJAT/.m2/repository/nl/captcha/simplecaptcha/1.2.1/simplecaptcha-1.2.1.jar' in project 'wheelmonk' cannot be read or is not a valid ZIP file wheelmonk Build path Build Path Problem

2 Answers

The referenced jar is a valid jar on maven central repo, so this can be excluded as a reason. Please first check your jar file if it has actually been download correctly and can be opened by e.g. 7zip.

If anything is broken on this jar file delete it and re-resolve it.

If u already download or having the captcha.jar in the project folder or anywhere in your local storage,

 mvn install:install-file -DgroupId=nl.captcha -DartifactId=simplecaptcha -Dversion=1.2.1 -Dpackaging=jar -Dfile=**your-path-to-jar***

Add to this command and run the IDE terminal or project path CMD to initializing the .jar file and came up with build success, Then u can build the project successfully.

Related