简体   繁体   English

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

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

i've a maven based project and i'm trying to import it to Spring source tool suite. 我有一个基于maven的项目,我正在尝试将其导入Spring源工具套件。 I am getting the following error. 我收到以下错误。

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

It looks like it's asking me to install the maven resourource plugin 2.4.2 but I'm not sure what is the file to download. 看起来它要求我安装maven resourource插件2.4.2,但我不确定要下载的文件是什么。 I tried downloading maven-plugin-plugin-2.4.2-source.jar and feeding it to the command; 我尝试下载maven-plugin-plugin-2.4.2-source.jar并将其提供给命令; but it didn't work. 但它不起作用。 I then went to the maven repository in http://svn.apache.org/viewvc/maven/plugins/tags/maven-resources-plugin-2.4.2/ and downloaded the pof.xml; 然后我访问了http://svn.apache.org/viewvc/maven/plugins/tags/maven-resources-plugin-2.4.2/中的maven存储库并下载了pof.xml; this also is not working. 这也行不通。 If you have seen this problem before pls help me understand what is missing / or what the error message is. 如果您在使用之前已经看过这个问题,请帮助我了解缺少的内容/或错误消息是什么。

Thanks, 谢谢,

You may be behind firewall. 你可能在防火墙后面。 You could try to set an HTTP proxy to bypass the firewall. 您可以尝试设置HTTP代理以绕过防火墙。

In Windows, this file is located at: C:\\Documents and Settings\\<windows Login>\\.m2\\settings.xml 在Windows中,此文件位于: C:\\Documents and Settings\\<windows Login>\\.m2\\settings.xml

You need to provide valid parameters to the <proxy> based on how the network is setup in your organization. 您需要根据组织中网络的设置方式为<proxy>提供有效参数。

<settings 
...
     <proxies>

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

Download the maven resourource plugin 2.4.2[maven-resources-plugin-2.4.2.jar] from http://mirrors.ibiblio.org/pub/mirrors/maven2/org/apache/maven/plugins/maven-resources-plugin/2.4.2/ and do an 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

followed by clean eclipse :eclipse , clean the project in Eclipse and refresh and try . 然后是清理eclipse:eclipse,在Eclipse中清理项目并刷新并尝试。 It should work . 它应该工作。

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

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