Deploying Maven project throws java.util.zip.ZipException: invalid LOC header (bad signature)

You need to check which jar is giving problem. It must be corrupted. Delete that jar and run mvn spring-boot:run command again. May be more that one jar has corrupted so every time you need to run that command to delete that jar. In my case mysql, jackson, aspect jars was corrupted mvn spring-boot:run command … Read more

How to solve “Plugin execution not covered by lifecycle configuration” for Spring Data Maven Builds

What a mess. I don’t remember where I found this but I had to add the following to get M2Eclipse to be happy. Even more sad is that it isn’t exactly easy to understand why this tag is needed. There were a number of other issues with the M2Eclipse plug-in that simply didn’t work with … Read more

Maven error : Could not find or load main class org.codehaus.plexus.classworlds.launcher.Launcher

Please remove M2_HOME as environment variable, it is already set by the mvn script. The only things you need to do is: add apache-maven-3.x.x/bin to your path, set JAVA_HOME as environment variable. So no need to add %JAVA_HOME%/bin to your path Try to run mvn -v from /Library/Maven-3.3.3/bin/ folder first to confirm the installation is … Read more

web.xml is missing and is set to true – web.xml is there and can’t edit deployment assembly

This is an error from maven, it is saying that is expecting a web.xml file because the project is defined as a web project on pom.xml through <packaging>war</packaging>. As in some web application web.xml is optional, instead creating an empty web.xml you can overwrite the default value from the property failOnMissingWebXml on maven-war-plugin adding the following values on your pom.xml If you need a web.xml file on your project, you can … Read more

Spring Maven clean error – The requested profile “pom.xml” could not be activated because it does not exist

The warning message means that you somehow passed -P pom.xml to Maven which means “there is a profile called pom.xml; find it and activate it”. Check your environment and your settings.xml for this flag and also look at all <profile> elements inside the various XML files. Usually, mvn help:effective-pom is also useful to see what the real POM would look like. Now the error … Read more

What exactly is a Maven Snapshot and why do we need it?

A snapshot version in Maven is one that has not been released. The idea is that before a 1.0 release (or any other release) is done, there exists a 1.0-SNAPSHOT. That version is what might become 1.0. It’s basically “1.0 under development”. This might be close to a real 1.0 release, or pretty far (right after the 0.9 release, for example). The difference between a “real” version and a … Read more