Execution default of goal org.springframework.boot:spring-boot-maven-plugin:1.0.2.RELEASE:repackage failed: Source must refer to an existing file

Try mvn install before running spring-boot:repackage:

mvn clean install spring-boot:repackage

Ok, I found the error. I needed to change the packaging parameter to jar from pom. Also, the repositories, pluginRepositories, the maven-compiler-plugin and the spring-boot-maven-plugin's version and executions weren't needed.


Just adding my experience :

After none of the suggested solutions worked. I figured out there was some issue with the downloaded spring-boot-maven-plugin in the .m2 folder. Deleting the plugin and allowing the "mvn clean install" to re-download and build worked.

Tags:

Java

Maven

Spring