mvn clean package -Dmaven.test.skip=true
error thrown today when the project was packaged with the maven command :
Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.7.0:compile (default-compile) on project springbootdemo: Fatal error compiling: 无效的标记: -parameters -> [Help 1]
is easier to fix because the JDK version you need for your project is inconsistent with the JDK version you are currently using, because Java version is defined as 1.8 in my project’s pom. XML, but my actual idea for run project is 1.7
<java.version>1.8</java.version>
solution: simply replace the current JDK version with the JDK required for your project
if you click on the package compiler in the maven window of intellij idea, enter the intellij idea JDK version by Ctrl+Alt+s into the Settings screen
select the item, right click the F4 key, and set the item properties to enter
if you’re packing directly in Windows CMD with maven, you’ll need to switch your JDK environment. After the above setup, repackage and compile OK!
other conditions can also cause this error:
1. When you run a project with a command like java-jar ~.jar, you can also package the project with an error.
2. The configured dependency in your pom. XML file is not correct (it may be version, name, etc.), jar package does not come down, please carefully check whether there is an error in pom. XML, for example, if the dependency is not correct in idea, it can be directly seen in the maven project window.
extended reading: advanced customized timing tasks (including an administrative interface) using quartz b>
recommended reading: elastic search search engine actual combat demo:https://github.com/simonsfan/springboot-quartz-demo, branches: feature_es p>
Read More:
- How to Fix Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.7.0:compile
- Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile)
- [Solved] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test
- Failed to execute goal org.apache.maven.plugins:maven-gpg-plugin:1.6:sign
- Failed to execute goal org.apache.maven . plugins:maven-surefire-plugin :2.12.4:test
- Failed to execute goal org.apache.maven.plugins:maven-javadoc-plugin:2.9.1:jar (default) on project
- [ERROR] Failed to execute goal org.apache.maven.plugins:maven-war-plugin:2.2:war (default-war) on pr
- RocketMQ Failed to execute goal org.apache.maven.plugins:maven-checkstyle-plugin:2.17:check…
- Failed to execute goal org.apache.maven . plugins:maven-clean-plugin :2.6.1:cle
- Failed to execute goal org.apache.maven.plugins:maven-clean-plugin:3.0.0:clean (default-clean) on
- Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.1:test (default-test)
- Failed to execute goal org.apache.tomcat.maven:tomcat7-maven-plugin:2.2:run (default-cli) on project
- Failed to execute goal org.apache.tomcat . maven:tomcat7-maven-plugin : 2.2: run solution
- Failed to execute goal in Maven build org.apache.tomcat .maven:
- “[warning] failed to retrieve plugin descriptor for caused by Maven security agent settings org.apache.maven . plugins:… “
- Error resolving version for plugin ‘org.apache.maven.plugins:maven-compiler-plugin’ from the repo…
- mvn install Error: Failed to read artifact descriptor org.apache.maven.plugins:maven-install-plugin:jar:2
- Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.6.0
- Cannot resolve plugin org.apache.maven.plugins:maven-jar-plugin:2.4
- Failed to execute goal org.apache.maven.p1ugins:maven-clean-p1ugin:2.5:clean (default-clean)