myeclipse - 創建maven工程的報maven requires java 1.6 or newer錯誤的問題?
問題描述
我的電腦是mac myeclipse是2015 javase-1.7
我有右鍵創建maven project->勾選 create a simple project...點擊nextGroup Id輸入的是com.atguiguArtifact Id輸入的是ssm-crudPackaging:war點擊finish生成的maven project直接就有錯,出錯的地方是pom.xml
報的錯是:Cannot detect Web Project version. Please specify version of Web Project through <version> configuration property of war
E.g.: <plugin> <artifactId>maven-war-plugin</artifactId> <configuration> <version>3.0</version> </configuration> </plugin>
在pom文件中寫入<build>
<plugins><plugin> <artifactId>maven-war-plugin</artifactId> <configuration><version>3.0</version> </configuration></plugin> </plugins>
</build>之后update project之后報maven requires java 1.6 or newer的錯誤
請各位大神指教。
問題解答
回答1:再添加一個插件 maven-compile-plugin 制定 1.6
回答2:<build>
<plugins> <!-- define the project compile level --> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-compiler-plugin</artifactId> <version>2.3.2</version> <configuration> <source>1.7</source> <target>1.7</target> </configuration> </plugin> </plugins>
</build>這個晚上有很多,有問題先百度,找不到答案再問,能鍛煉自己的資料查詢能力
相關文章:
1. javascript - sublime快鍵鍵問題2. javascript - immutable配合react提升性能?3. css - 寫頁面遇到個布局問題,求大佬們幫解答,在線等,急!~4. javascript - nodejs關于進程間發送句柄的一點疑問5. Apache 已經把網站根目錄的改為allow from all了,但是服務器還是不能訪問?6. 實現bing搜索工具urlAPI提交7. 配置Apache時,添加對PHP的支持時語法錯誤8. vue.js - Vue 如何像Angular.js watch 一樣監聽數據變化9. javascript - 移動端上不能實現拖拽布局嗎?10. phpstudy8.1支持win11系統嗎?

網公網安備