企业网站开发信息,电子商务企业 网站前台建设 苏宁,建站外贸企业官网推广,义乌做网站哪个公司好任何在eclipse中使用M2E#xff08;maven-to-eclipse#xff09;插件的人都知道您在哪里运行构建的问题#xff0c;然后在项目上更新maven只是让它重置JRE并抛出一堆项目错误#xff01; 我在使用Open Liberty与Java 9一起运行Java EE 8的帖子中注意到了这个问题 解决方案… 任何在eclipse中使用M2Emaven-to-eclipse插件的人都知道您在哪里运行构建的问题然后在项目上更新maven只是让它重置JRE并抛出一堆项目错误 我在使用Open Liberty与Java 9一起运行Java EE 8的帖子中注意到了这个问题 解决方案是确保编译器正在运行所需的正确版本因此 propertiesmaven.compiler.source1.8/maven.compiler.sourcemaven.compiler.target1.8/maven.compiler.targetfailOnMissingWebXmlfalse/failOnMissingWebXml
/properties 要么 - buildpluginsplugingroupIdorg.apache.maven.plugins/groupIdartifactIdmaven-compiler-plugin/artifactIdversion3.7.0/versionconfigurationsource1.8/sourcetarget1.8/target/configuration/plugin/plugins/build 还有一点值得注意如果您使用的是Java 9或更高版本则版本号格式会有所不同。 因此虽然Java 8的版本为1.8但Java 9的版本为9 Java 9与Java 8版本 这意味着您需要将pom中的版本声明为 propertiesmaven.compiler.source9/maven.compiler.sourcemaven.compiler.target9/maven.compiler.targetfailOnMissingWebXmlfalse/failOnMissingWebXml/properties 或在我的JavaEE8项目https://github.com/farrelmr/javaee8/blob/master/pom.xml中使用完整版本则表示为– project xmlnshttp://maven.apache.org/POM/4.0.0 xmlns:xsihttp://www.w3.org/2001/XMLSchema-instancexsi:schemaLocationhttp://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsdmodelVersion4.0.0/modelVersiongroupIdcom.javabullets.javaee8/groupIdartifactIdjavaee8/artifactIdversion1.0-SNAPSHOT/versionpackagingwar/packagingdependenciesdependencygroupIdjavax/groupIdartifactIdjavaee-api/artifactIdversion8.0/versionscopeprovided/scope/dependency/dependenciesbuildfinalNamejavaee8/finalName/buildpropertiesmaven.compiler.source9/maven.compiler.sourcemaven.compiler.target9/maven.compiler.targetfailOnMissingWebXmlfalse/failOnMissingWebXml/properties
/project 这样可以防止日食问题 这篇文章可能看起来很明显–但值得一提的是Java 9版本号的更改意味着您必须检查自己在maven中使用的版本号是否正确。 翻译自: https://www.javacodegeeks.com/2018/03/maven-eclipse-and-java-9.html