我在哪里可以获得 maven-source-plugin?
我使用 Eclipse Maven 插件从 SourceForge 的 SVN 源代码控制中查看了一个开源项目。检查后,我在 pom.xml 文件中收到此错误:
解决插件版本时出错 存储库中的“org.apache.maven.plugins:maven-source-plugin” [本地(C:\Documents and Settings\thomas.owens\.m2\repository), 中央(http://repo1.maven.org/maven2)]:在任何地方都找不到插件 插件存储库
我对 Maven 相当陌生,但我遵循了 Apache Maven 和 Eclipse 插件的安装说明。当我可以清楚地看到位于 C:\Documents and Settings\thomas.owens\.m2\repository\ 的目录时,在 Maven 的中央插件存储库或我的本地存储库中找不到此插件,这似乎很奇怪org\apache\maven\plugins\maven-source-plugin
包含单个 resolver-status.properties
文件。
关于为什么找不到这个插件以及在哪里可以找到它有什么想法吗?
I checked out an open-source project from SourceForge's SVN source control using the Eclipse Maven plugin. After it checks out, I get this error in the pom.xml file:
Error resolving version for plugin
'org.apache.maven.plugins:maven-source-plugin' from the repositories
[local (C:\Documents and Settings\thomas.owens\.m2\repository),
central (http://repo1.maven.org/maven2)]: Plugin not found in any
plugin repository
I'm fairly new to Maven, but I followed the installation instructions for Apache Maven and the Eclipse plugin. It seems weird that this plugin would not be found in the central plugin repository for Maven or my local repository, when I can clearly see a directory located at C:\Documents and Settings\thomas.owens\.m2\repository\org\apache\maven\plugins\maven-source-plugin
that contains a single resolver-status.properties
file.
Any thoughts as to why this plugin might not be found and where I can find it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
我遇到的问题不是 maven-source-plugin 的问题,而是错误的代理设置阻止了与存储库的连接。 有关使用 Maven 与代理的问题的答案 帮助我找到错误并改正。
The problem that I was encountering was not an issue with the maven-source-plugin, but incorrect proxy settings that was preventing the connection to the repositories. The answers to this question on the use of Maven with a proxy helped me to find the mistake and correct it.
该插件位于
也许您只需要使用 -U 运行即可更新:
或者在 Eclipse 中:右键单击项目,选择 Maven->更新依赖关系,(也许)Maven->更新项目配置
That plugin is in the central repository.
Perhaps you just need to run with -U to update:
Or in Eclipse: right-click on the project, select Maven-> Update Dependencies, (perhaps) Maven-> Update Project Configuration
检查您是否能够在 Eclipse 中看到 Maven,Window >偏好。
如果是这样,请选择 Maven 并转到安装并检查安装 Maven 的文件夹是否设置正确。然后,设置你的setting.xml文件,它应该在/(maven安装文件夹)/conf/中
然后,右键单击你的项目,转到Maven>;更新 Maven 依赖项。
有帮助吗?
Check if you are able to see Maven in Eclipse, Window > Preferences.
If so, select Maven and go to installations and check if the folder, in where maven was installed, is properly set. Then, set your setting.xml file, it should be in /(maven installation folder)/conf/
Then, right click in your project go to Maven > Update Maven Dependencies.
Did it help?
哪个项目?
也许他们的 pom 中有一个错误。
或者他们可能需要一个具有特定环境变量集的“标准化”开发环境,或者 user.home/.m2/settings.xml 中的特定设置
Which project?
Perhaps there is a bug in their pom.
Or perhaps they require a 'standardized' develop environment with specific environment variables set, or a specific setting in user.home/.m2/settings.xml