繁体   English   中英

Spring和Maven插件安装问题; MVN; 弹簧

[英]Spring and Maven plugin installation issue; mvn; spring

我有一个基于maven的项目,我正在尝试将其导入Spring源工具套件。 我收到以下错误。

Description Resource    Path    Location    Type
Could not calculate build plan: Missing:
----------
1) org.apache.maven.plugins:maven-resources-plugin:maven-plugin:2.4.2

  Try downloading the file manually from the project website.

  Then, install it using the command: 
      mvn install:install-file -DgroupId=org.apache.maven.plugins -DartifactId=maven-resources-plugin -Dversion=2.4.2 -Dpackaging=maven-plugin -Dfile=/path/to/file

  Alternatively, if you host your own repository you can deploy the file there: 
      mvn deploy:deploy-file -DgroupId=org.apache.maven.plugins -DartifactId=maven-resources-plugin -Dversion=2.4.2 -Dpackaging=maven-plugin -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]

----------
1 required artifact is missing.

for artifact: 
  org.apache.maven.plugins:maven-resources-plugin:maven-plugin:2.4.2

from the specified remote repositories:
  central (http://repo1.maven.org/maven2, releases=true, snapshots=false)
    Gamex       Unknown Maven Problem

看起来它要求我安装maven resourource插件2.4.2,但我不确定要下载的文件是什么。 我尝试下载maven-plugin-plugin-2.4.2-source.jar并将其提供给命令; 但它不起作用。 然后我访问了http://svn.apache.org/viewvc/maven/plugins/tags/maven-resources-plugin-2.4.2/中的maven存储库并下载了pof.xml; 这也行不通。 如果您在使用之前已经看过这个问题,请帮助我了解缺少的内容/或错误消息是什么。

谢谢,

你可能在防火墙后面。 您可以尝试设置HTTP代理以绕过防火墙。

在Windows中,此文件位于: C:\\Documents and Settings\\<windows Login>\\.m2\\settings.xml

您需要根据组织中网络的设置方式为<proxy>提供有效参数。

<settings 
...
     <proxies>

    <proxy>
      <active>true</active>
      <protocol>http</protocol>
      <host>put-ur-proxy-servername</host>
      <port>80</port>
    </proxy>
...
</settings>

http://mirrors.ibiblio.org/pub/mirrors/maven2/org/apache/maven/plugins/maven-resources-下载maven resourource插件2.4.2 [maven-resources-plugin-2.4.2.jar] 插件/ 2.4.2 /并做一个

      mvn install:install-file -DgroupId=org.apache.maven.plugins -DartifactId=maven-resources-plugin -Dversion=2.4.2 -Dpackaging=maven-plugin -Dfile=/path/to/file

然后是清理eclipse:eclipse,在Eclipse中清理项目并刷新并尝试。 它应该工作。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM