Maven compile error, whether it is mvn clean or mvn build will appear this error: Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.5:clean, and the code does not have any compile error, just can not packaged.
Later found that the prompt cann-t delete target this folder, I manually in the local directory is no way to delete, forced to delete, mvn clean is OK, but still can not packaged, and then checked to find that my code is a startup a note configuration problems, after the note, everything is normal ~ ~
1, manually delete the target folder in the directory.
2, check your code, there is no runtime error, when playing jar packages, may also load the contents of the annotation.
Similar Posts:
- Can’t create resource output directory
- idea Failed to clean project Failed to delete target
- [Solved] Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:2.5:clean (default-clean)
- Error LifecyclePhaseNotFoundException, Unknown lifecycle phase “mvn”. You must specify a valid lifecycle
- Maven warnning: ‘build.plugins.plugin.version’ is missing [How to Solve]
- Spring cloud multi module packaging errors [How to Solve]
- [Solved] Could not transfer artifact org.apache.maven.plugins:maven-resources-plugin:pom:2.6 from/to central
- Maven Package Error: Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.12.4:test (default-test) on project Mybatis: There are test failures.
- Maven Error: Failure to transfer org.apache.maven.plugins:maven-surefire-plugin:pom:3.0.0-M1 [How to Solve]
- Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile)