1. 程式人生 > >maven-compiler-plugin 外掛版本資訊錯誤提示解決辦法

maven-compiler-plugin 外掛版本資訊錯誤提示解決辦法

1.maven-compiler-plugin外掛版本資訊警告提示

[WARNING] 
[WARNING] Some problems were encountered while building the effective model for com.mimhope.jettycode:JettyCode:war:0.0.1-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 14, column 13
[WARNING] 
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING] 
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING] 

通過'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing.這句話可以瞭解到沒有設定版本資訊;

有問題的設定

<plugin>
	<artifactId>maven-compiler-plugin</artifactId>
	<configuration>
	  <source>1.5</source>
	  <target>1.5</target>
	  <encoding>UTF-8</encoding>
	  <verbose>false</verbose>
	</configuration>
</plugin>

新增一句話-設定maven-compiler-plugin版本

<version>2.3.2</version>

修改以後結果如下

<plugin>
	        <artifactId>maven-compiler-plugin</artifactId>
	        <version>2.3.2</version>
	        <configuration>
	          <source>1.5</source>
	          <target>1.5</target>
	          <encoding>UTF-8</encoding>
	          <verbose>false</verbose>
	        </configuration>
</plugin>

重新執行程式就不會有這個警告了;

對照官網用法:http://maven.apache.org/plugins/maven-compiler-plugin/usage.html

<project>
  ...
  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.apache.maven.plugins</groupId>
          <artifactId>maven-compiler-plugin</artifactId>
          <version>3.7.0</version>
          <configuration>
            <!-- put your configurations here -->
          </configuration>
        </plugin>
      </plugins>
    </pluginManagement>
  </build>
  ...
</project>

相關推薦

maven-compiler-plugin 外掛版本資訊錯誤提示解決辦法

1.maven-compiler-plugin外掛版本資訊警告提示 [WARNING] [WARNING] Some problems were encountered while building the effective model for com.mimhope.

[轉] maven-compiler-plugin 外掛版本資訊錯誤提示解決方法

使用maven-compiler-plugin 時 POM檔案如下:  Xml程式碼   <plugins>       <plugin>           <artifactId>maven-compiler-plugin<

maven-compiler-plugin 外掛版本資訊錯誤提示解決方法

使用maven-compiler-plugin 時,報如下提示,字面意思就是沒有指定版本資訊 [WARNING] [WARNING] Some problems were encountered while building the effective model for

Maven中配置maven-compiler-plugin外掛

根據《Maven編譯專案下的.java檔案時的編碼問題》可知,在Maven專案下,我們需要配置"maven-compiler-plugin"的"encoding"引數 根據《pom.xml中配置plu

maven-compiler-plugin外掛引數配置詳解

maven-compiler-plugin外掛是一個Maven外掛,用來編譯專案程式碼;自從3.0開始預設的編譯器是javax.tools.JavaCompiler,用來編譯Java原始碼;如果你想強制外掛使用javac編譯器,你必須配置外掛的屬性forceJa

pom.xml中maven-compiler-plugin外掛配置的使用

maven是個專案管理工具,如果我們不告訴它我們的程式碼要使用什麼樣的jdk版本編譯的話,它就會用maven-compiler-plugin預設的jdk版本來進行處理,這樣就容易出現版本不匹配的問題,以至於可能導致編譯不通過的問題。例如程式碼中要是使用上了jdk1.7的新特

python2 安裝scrapy出現錯誤提示解決辦法~

man 提示 正常 html中 command fail 重新 解決問題 資料 首先:set STATICBUILD=true && pip install lxml 安裝環境: windows7操作系統,已經正確安裝python,pip. 使用

【Git】常見錯誤提示解決辦法和常用方法

log image 解決 遠程 添加 logs 遠程倉庫 錯誤 ima 1.添加遠程倉庫時提示fatal: remote origin already exists. 先刪除遠程倉庫,再添加遠程倉庫 最後再push 2.修改本地文件(比如README.md)後,更新到g

編譯qt工程時出現qt外掛程序退出錯誤解決辦法

真名:朱金燦 主要經歷:本科畢業於CUG(武漢)的GIS專業,畢業後參加工作,現在在北京從事軟體開發和團隊管理工作。曾獲有色金屬工業科技進步獎二等獎(獲獎證書連結)。 我的聯絡方式: EMAIL:clever101#163.com 研究方向: 數字影象處理、計算機圖形學。 本部落格內

PKG_CONFIG_PATH錯誤提示解決辦法

有篇好文章,推薦大家,關於GTK的相關知識 [url]http://www.gnome-cn.org/documents/developer_doc/gtk_2_faq/2[/url] 引數說明,末尾是該程式的可用引數說明。  ./configure --prefix=/usr 指定安裝目錄,通常從原始碼包編

maven編譯外掛maven-compiler-plugin誤將WARNING當ERROR

【問題描述】 經常碰到這樣的問題,在eclipse中編譯是正常的,但是在maven編譯時不通過,錯誤資訊如下: E:\workspace\*.java:[760,31] 警告:sun.misc.BASE64Encoder 是 Sun 的專用 API,可能會在未來版本中刪除

Maven錯誤:'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing

配置maven compiler的時候加上對應的Servlet版本號即可解決。 <plugin>     <groupId>org.apache.maven.plugins</groupId>     <artifactI

Maven部署到Tomcat出現錯誤:Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1

大家都知道錯誤內容相同時,出現的場景也不一定相同。所以本篇提出的錯誤解決方案可能僅僅適用跟我相同場景下的情況。 1、出現錯誤的場景: 按照我之前一篇文章【Eclipse中Maven的整合和使用介紹】進行配置Maven之後,在再src/main/java資料夾下建立Servl

針對Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1的解決方案

failed led tool data- rdquo xml文件 artifact 裏的 span 背景:本項目使用JDK1.8 編譯maven工程的時候出現如下錯誤: Failed to execute goal org.apache.maven.plugins:m

Maven異常_02_compile faile_Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.2:compile (default-compile) on project

ces install java def 。。 bsp gin cli 問題 異常:Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.2:compile (default-comp

解決maven install報錯信息(Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile )

ide auto javase post splay for except ava class Maven install失敗 Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1

maven-compiler-plugin:3.1:compile (default-compile

異常異常信息: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project : Compilation failure 異常原因: IDE 中

利用maven-resource-plugin外掛進行打包時不同環境下的配置檔案切換

基本概念說明(resources、filter和profile):  1.profiles定義了各個環境的變數id  2.filters中定義了變數配置檔案的地址,其中地址中的環境變數就是上面profile中定義的值  3.resources中是定義哪些目錄下的檔案會被

'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing.

'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 264, column 16 plugin缺少版本號 加入解決 <ver

spark專案藉助maven-shade-plugin外掛打包依賴

maven配置 maven配置 <profiles> <profile> <id>spark-c