2012-01-12 39 views
0

我使用Maven /的Nexus一個新手,所以希望這些都是很簡單的問題,我希望:如何解決相關性錯誤Maven中使用Nexus倉庫

當我運行的項目中,我得到了以下錯誤MVN安裝:

[WARNING] Some problems were encountered while building the effective model for com.myproj.TestProj:jar:0.0.1 
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 294, column 12 
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-surefire-plugin is missing. @ line 304, column 12 
[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] The POM for oracle:ojdbc:jar:10.0.2.0 is missing, no dependency information available 

對於第一個錯誤,我認爲要我的版本信息添加到下面的插件

<plugin> 
       <artifactId>maven-compiler-plugin</artifactId> 
       <configuration> 
        <verbose>true</verbose> 
        <source>1.6</source> 
        <target>1.6</target> 
        <encoding>ISO-8859-1</encoding> 
       </configuration> 
      </plugin> 

的問題是,我怎麼知道指定哪個版本,我在哪裏可以找出哪些版本可供選擇?

關於失蹤oracle:ojdbc:jar:10.0.2.0神器第二個錯誤是一個我不太清楚該怎麼做。我已經搜索了一下,看來也許我可能需要手動下載驅動程序並將其安裝到本地的存儲庫中。它是否正確?

我正在使用Nexus和Maven。我需要如何將ojdbc驅動程序安裝到nexus存儲庫上?

我發現這個網頁谷歌 - http://www.zparacha.com/include-externaljar-file-in-maven/ 它談到如何將jar文件添加到Maven。我不明白的是當我運行該站點上描述的命令來安裝jar文件時會發生什麼?將jar文件安裝在我的本地存儲庫或nexus存儲庫中?

謝謝

回答

2

首先:消息是警告,而不是錯誤。您的項目建立並運行良好,沒有嚴重問題。

的插件及其版本可以在這裏找到:http://maven.apache.org/plugins/index.html

Oracle JDBC驅動程序可以作爲可以看這裏: https://repository.sonatype.org/index.html#nexus-search;quick~ojdbc

如果錯誤使用神器後仍然存在不存在你可以對此做很多事情 - 除了創建自己的存儲庫,但對於那些警告,這是不值得的。