[ERROR ]Failed to execute goal org.codehaus.mojo:flatten-maven-plugin:1.1.0:flatten (flatten) on project

时间:2022-03-19 17:34:24

今天在启动项目的时候,莫名的Maven install命令的时候出现错误

错误提示:Failed to execute goal org.codehaus.mojo:flatten-maven-plugin:1.1.0:flatten (flatten) on project
[ERROR] Failed to execute goal org.codehaus.mojo:flatten-maven-plugin:1.1.0:flatten (flatten) on project lis: 4 problems were encountered while building the effective model for com.sinosoft:lis:${revision}${changelist}
[ERROR] [WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @
[ERROR] [WARNING] 'build.plugins.plugin.version' for org.codehaus.mojo:flatten-maven-plugin is missing. @
[ERROR] [FATAL] Non-readable POM D:\document\taishou\twlMaven\repository\com\sinosoft\lis-dependencies${revision}${changelist}\lis-dependencies-${revision}${changelist}.pom: D:\document\taishou\twlMaven\repository\com\sinosoft\lis-dependencies${revision}${changelist}\lis-dependencies-${revision}${changelist}.pom (系统找不到指定的路径。) @ D:\document\taishou\twlMaven\repository\com\sinosoft\lis-dependencies${revision}${changelist}\lis-dependencies-${revision}${changelist}.pom
[ERROR] [ERROR] 'dependencies.dependency.version' for junit:junit:jar is missing. @
[ERROR]
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException


问题原因:

仓库里面没有获取到最新的包。或者引用到的jar包没有正常加载。或者包丢失

解决方法:

clean,install。注意不要开离线模式,获取最新的依赖。(从项目依赖的角度,去审核一遍你的仓库里的jar包)