Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/maven/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
无法在maven项目下使用jar打包构建maven模块。。。!_Maven - Fatal编程技术网

无法在maven项目下使用jar打包构建maven模块。。。!

无法在maven项目下使用jar打包构建maven模块。。。!,maven,Maven,我无法使用jar打包构建maven maodule。我得到的错误是 Could not calculate build plan: Failure to transfer org.apache.maven.plugins:maven-resources-plugin:pom:2.4.3 from http://repo1.maven.org/maven2 was cached in the local repository, resolution will not be reattempted

我无法使用jar打包构建maven maodule。我得到的错误是

Could not calculate build plan: Failure to transfer org.apache.maven.plugins:maven-resources-plugin:pom:2.4.3 from http://repo1.maven.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced. Original error: Could not transfer artifact org.apache.maven.plugins:maven-resources-plugin:pom:2.4.3 from/to central (http://repo1.maven.org/maven2): ConnectException
我的机器被标记到公司网络,他们有代理问题吗?我尝试使用以下内容创建settings.xml:

<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
                      http://maven.apache.org/xsd/settings-1.0.0.xsd">
  <localRepository>${user.home}/.m2/repository</localRepository>
  <interactiveMode>true</interactiveMode>
  <usePluginRegistry>false</usePluginRegistry>
  <offline>false</offline>
  <pluginGroups/>
  <servers/>
  <mirrors/>
  <proxies>
    <!-- proxy
     | Specification for one proxy, to be used in connecting to the network.
     |-->
    <proxy>
      <id>optional</id>
      <active>true</active>
      <protocol>http</protocol>      
      <host>proxy.tcs.com</host>
      <port>80</port>
      <nonProxyHosts>localhost|google.com</nonProxyHosts>
    </proxy>

  </proxies>
  <profiles/>
  <activeProfiles/>
</settings>
我已经配置了Maven链接
http://m2eclipse.sonatype.org/sites/m2e
使用eclipse版本Juno和Jdk 1.7。
我尝试了网络上所有可能的解决方案,但没有成功。

问题在于代理设置,因为我们在公司使用代理网络,Maven无法正确下载其插件,所以添加了带有代理设置的settings.xml文件,效果很好。

你有权访问吗?没有,当我点击url时,它的意思是:浏览此目录已被禁用。改为在上查看此目录的内容。如果公司阻止了上述链接,则会显示为公司阻止了该网站。对不起,您可以浏览此链接吗:因此,您可以尝试在C:\Users\346496\.m2\repository\org\apache\maven\plugins\maven resources plugin\中清除本地repo,删除内容可能会解决您的问题
2/27/13 1:08:12 PM IST: Unable to update index for central|http://repo1.maven.org/maven2
2/27/13 1:08:12 PM IST: Updating index central|http://repo1.maven.org/maven2
2/27/13 1:11:37 PM IST: Refreshing settings C:\Users\346496\.m2\settings.xml
2/27/13 1:50:58 PM IST: Update started
2/27/13 1:50:59 PM IST: Update completed: 0 sec
2/27/13 1:51:04 PM IST: Update started
2/27/13 1:51:04 PM IST: Generating sources /common/pom.xml
2/27/13 1:51:04 PM IST: Build error for /common/pom.xml; org.apache.maven.plugin.PluginResolutionException: Plugin org.apache.maven.plugins:maven-resources-plugin:2.4.3 or one of its dependencies could not be resolved: Failed to read artifact descriptor for org.apache.maven.plugins:maven-resources-plugin:jar:2.4.3
2/27/13 1:51:04 PM IST: Downloaded http://repo1.maven.org/maven2/org/apache/maven/plugins/maven-compiler-plugin/2.3.2/maven-compiler-plugin-2.3.2.pom
2/27/13 1:51:04 PM IST: Failed to determine compiler source setting, assuming default
2/27/13 1:51:04 PM IST: Failed to determine compiler target setting, assuming default
2/27/13 1:51:04 PM IST: Failed to determine compiler source setting, assuming default
2/27/13 1:51:04 PM IST: Failed to determine compiler target setting, assuming default
2/27/13 1:51:04 PM IST: Failed to determine compiler test inclusions, assuming defaults
2/27/13 1:51:04 PM IST: Failed to determine compiler test exclusions, assuming defaults
2/27/13 1:51:04 PM IST: Failed to determine compiler inclusions, assuming defaults
2/27/13 1:51:04 PM IST: Failed to determine compiler exclusions, assuming defaults
2/27/13 1:51:04 PM IST: Adding source folder /common/src/main/java
2/27/13 1:51:04 PM IST: Adding resource folder /common/src/main/resources
2/27/13 1:51:04 PM IST: Adding source folder /common/src/test/java
2/27/13 1:51:04 PM IST: Adding resource folder /common/src/test/resources
2/27/13 1:51:04 PM IST: Update completed: 0 sec