【发布时间】:2012-01-12 18:01:43
【问题描述】:
我是 Maven/Nexus 的新手,所以希望这些是我希望的简单问题:
当我在我的项目上运行 mvn install 时,我收到以下错误:
[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 仓库?
谢谢
【问题讨论】:
标签: java maven jdbc build nexus