Maven 说缺少插件:如何安装它们?

发布于 2024-11-18 00:18:08 字数 1143 浏览 4 评论 0原文

我在这个即用型项目上使用 Maven 时遇到了一些问题:http://wiki。 javaforum.hu/display/ANDROIDSOAP/Home 基本上,我只需要更改几行,就可以使用生成的文件了。问题是,当我执行 mvn:idea (或 mvn:eclipse) clean 时,我收到以下警告:

Z:\Workspace\AndroidSOAP>mvn idea:clean
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for hu.javaforum.android:AndroidSOAP:pom:0.0.4-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-pmd-plugin is     missing. @ line 117, column 15
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 95, column 15
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-surefire-report-plugin is missing. @ line 167, column 15
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-source-plugin is missing. @ line 156, column 15
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-jar-plugin is missing. @ line 106, column 15

如何安装缺少的插件?我一直在寻找,却空手而归。

I've got some problems using Maven on this ready-to-use project: http://wiki.javaforum.hu/display/ANDROIDSOAP/Home
Basically, I just need to change a couple of rows and I should be ready to use the generated files. The problem is that when I do mvn:idea (or mvn:eclipse) clean, I get these warnings:

Z:\Workspace\AndroidSOAP>mvn idea:clean
[INFO] Scanning for projects...
[WARNING]
[WARNING] Some problems were encountered while building the effective model for hu.javaforum.android:AndroidSOAP:pom:0.0.4-SNAPSHOT
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-pmd-plugin is     missing. @ line 117, column 15
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 95, column 15
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-surefire-report-plugin is missing. @ line 167, column 15
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-source-plugin is missing. @ line 156, column 15
[WARNING] 'build.plugins.plugin.version' for org.apache.maven.plugins:maven-jar-plugin is missing. @ line 106, column 15

How can I install the missing plugins? I've been searching and come out empty-handed.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

合约呢 2024-11-25 00:18:08

你用的是Maven3吗? Maven3 建议在 pom.xml 中为每个插件指定版本,否则会显示警告。我查看了 pom http://svn.javaforum .hu/svn/android/AndroidSOAP/trunk/AndroidSOAP/pom.xml 插件已经存在,但插件的版本号似乎确实丢失了。这些警告不应出现在 Maven2 中,因为它更能容忍草率的 poms。更好的解释在这里: https://cwiki.apache.org/MAVEN/maven-3x-compatibility-notes.html#Maven3.xCompatibilityNotes-AutomaticPluginVersionResolution

可以找到每个版本的最新发布版本的版本号每个公共 Maven 存储库中的插件,例如 http://search.maven.org/

Are you using Maven3? Maven3 recommends to specify a version for every plugin in the pom.xml, otherwise a warning is shown. I had a look at the pom at http://svn.javaforum.hu/svn/android/AndroidSOAP/trunk/AndroidSOAP/pom.xml the plugins are already there, but the version numbers for the plugins seems to be missing indeed. The warnings shouldn't appear with Maven2, as this is more tolerant to sloppy poms. A nicer explanation is here: https://cwiki.apache.org/MAVEN/maven-3x-compatibility-notes.html#Maven3.xCompatibilityNotes-AutomaticPluginVersionResolution

You can find the version numbers of the latest release version for each plugin at every public maven repo e.g. at http://search.maven.org/

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文