Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/ruby-on-rails-3/4.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
Java 在新的Maven项目上:无法计算构建计划:Plugin org.apache.Maven.plugins:Maven资源Plugin:2.6?_Java_Spring_Eclipse_Maven_Spring Tool Suite - Fatal编程技术网

Java 在新的Maven项目上:无法计算构建计划:Plugin org.apache.Maven.plugins:Maven资源Plugin:2.6?

Java 在新的Maven项目上:无法计算构建计划:Plugin org.apache.Maven.plugins:Maven资源Plugin:2.6?,java,spring,eclipse,maven,spring-tool-suite,Java,Spring,Eclipse,Maven,Spring Tool Suite,我使用的是Spring工具套件,使用了embebbed maven,我在创建一个新的maven项目时遇到了这个问题。 我尝试过类似帖子中给出的每一个答案;清理存储库并重建,settings.xml中的代理,指向正确的xml,使用自己的maven等等,我做错了什么? 问题的完整描述: Could not calculate build plan: Plugin org.apache.maven.plugins:maven- resources-plugin:2.6 or one of its de

我使用的是Spring工具套件,使用了embebbed maven,我在创建一个新的maven项目时遇到了这个问题。 我尝试过类似帖子中给出的每一个答案;清理存储库并重建,settings.xml中的代理,指向正确的xml,使用自己的maven等等,我做错了什么? 问题的完整描述:

Could not calculate build plan: Plugin org.apache.maven.plugins:maven-
resources-plugin:2.6 or one of its dependencies could not be resolved: 
Failed to read artifact descriptor for org.apache.maven.plugins:maven-
resources-plugin:jar:2.6
Plugin org.apache.maven.plugins:maven-resources-plugin:2.6 or one of its 
dependencies could not be resolved: Failed to read artifact descriptor for 
org.apache.maven.plugins:maven-resources-plugin:jar:2.6
settins.xml

<proxies> 
<!-- proxy | Specification for one proxy, to be used in connecting to the 
network. | <proxy> <id>optional</id> <active>true</active> 
<protocol>http</protocol> <username>proxyuser</username> 
<password>proxypass</password> <host>proxy.host.net</host> <port>80</port> 
<nonProxyHosts>local.net|some.host.com</nonProxyHosts> </proxy> -->
<proxy>
    <id>proxy</id>
    <active>true</active>
    <protocol>http</protocol>
    <host>proxy-ccy.houston.hp.com</host>
    <port>8080</port>
</proxy>
<proxy>
    <id>proxy1</id>
    <active>true</active>
    <protocol>http</protocol>
    <host>proxy.austin.hp.com</host>
    <port>8080</port>
</proxy>
</proxies> 

代理
真的
http
proxy-ccy.houston.hp.com
8080
proxy1
真的
http
proxy.austin.hp.com
8080
pom.xml

 <?xml version="1.0"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.marco.arale</groupId>
  <artifactId>maven-arale</artifactId>
  <version>0.0.1-SNAPSHOT</version>
  <name>maven-arale</name>
  <repositories>
    <repository>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <id>central</id>
      <name>Central Repository</name>
      <url>https://repo.maven.apache.org/maven2</url>
    </repository>
  </repositories>
  <pluginRepositories>
    <pluginRepository>
      <releases>
        <updatePolicy>never</updatePolicy>
      </releases>
      <snapshots>
        <enabled>false</enabled>
      </snapshots>
      <id>central</id>
      <name>Central Repository</name>
      <url>https://repo.maven.apache.org/maven2</url>
    </pluginRepository>
  </pluginRepositories>
  <build>
    <sourceDirectory>C:\Users\lopezbae\Documents\stsworkspace\maven-arale\src\main\java</sourceDirectory>
    <scriptSourceDirectory>C:\Users\lopezbae\Documents\stsworkspace\maven-arale\src\main\scripts</scriptSourceDirectory>
    <testSourceDirectory>C:\Users\lopezbae\Documents\stsworkspace\maven-arale\src\test\java</testSourceDirectory>
    <outputDirectory>C:\Users\lopezbae\Documents\stsworkspace\maven-arale\target\classes</outputDirectory>
    <testOutputDirectory>C:\Users\lopezbae\Documents\stsworkspace\maven-arale\target\test-classes</testOutputDirectory>
    <resources>
      <resource>
        <directory>C:\Users\lopezbae\Documents\stsworkspace\maven-arale\src\main\resources</directory>
      </resource>
    </resources>
    <testResources>
      <testResource>
        <directory>C:\Users\lopezbae\Documents\stsworkspace\maven-arale\src\test\resources</directory>
      </testResource>
    </testResources>
    <directory>C:\Users\lopezbae\Documents\stsworkspace\maven-    <finalName>maven-arale-0.0.1-SNAPSHOT</finalName>
    <pluginManagement>arale\target</directory>
      <plugins>
        <plugin>
          <artifactId>maven-antrun-plugin</artifactId>
          <version>1.3</version>
        </plugin>
        <plugin>
          <artifactId>maven-assembly-plugin</artifactId>
          <version>2.2-beta-5</version>
        </plugin>
        <plugin>
          <artifactId>maven-dependency-plugin</artifactId>
          <version>2.8</version>
        </plugin>
        <plugin>
          <artifactId>maven-release-plugin</artifactId>
          <version>2.3.2</version>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <artifactId>maven-clean-plugin</artifactId>
        <version>2.5</version>
        <executions>
          <execution>
            <id>default-clean</id>
            <phase>clean</phase>
            <goals>
              <goal>clean</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-resources-plugin</artifactId>
        <version>2.6</version>
        <executions>
          <execution>
            <id>default-testResources</id>
            <phase>process-test-resources</phase>
            <goals>
              <goal>testResources</goal>
            </goals>
          </execution>
          <execution>
            <id>default-resources</id>
            <phase>process-resources</phase>
            <goals>
              <goal>resources</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <version>2.4</version>
        <executions>
          <execution>
            <id>default-jar</id>
            <phase>package</phase>
            <goals>
              <goal>jar</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-compiler-plugin</artifactId>
        <version>3.1</version>
        <executions>
          <execution>
            <id>default-compile</id>
            <phase>compile</phase>
            <goals>
              <goal>compile</goal>
            </goals>
          </execution>
          <execution>
            <id>default-testCompile</id>
            <phase>test-compile</phase>
            <goals>
              <goal>testCompile</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-surefire-plugin</artifactId>
        <version>2.12.4</version>
        <executions>
          <execution>
            <id>default-test</id>
            <phase>test</phase>
            <goals>
              <goal>test</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-install-plugin</artifactId>
        <version>2.4</version>
        <executions>
          <execution>
            <id>default-install</id>
            <phase>install</phase>
            <goals>
              <goal>install</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-deploy-plugin</artifactId>
        <version>2.7</version>
        <executions>
          <execution>
            <id>default-deploy</id>
            <phase>deploy</phase>
            <goals>
              <goal>deploy</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-site-plugin</artifactId>
        <version>3.3</version>
        <executions>
          <execution>
            <id>default-site</id>
            <phase>site</phase>
            <goals>
              <goal>site</goal>
            </goals>
            <configuration>
              <outputDirectory>C:\Users\lopezbae\Documents\stsworkspace\maven-arale\target\site</outputDirectory>
              <reportPlugins>
                <reportPlugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-project-info-reports-plugin</artifactId>
                </reportPlugin>
              </reportPlugins>
            </configuration>
          </execution>
          <execution>
            <id>default-deploy</id>
            <phase>site-deploy</phase>
            <goals>
              <goal>deploy</goal>
            </goals>
            <configuration>
              <outputDirectory>C:\Users\lopezbae\Documents\stsworkspace\maven-arale\target\site</outputDirectory>
              <reportPlugins>
                <reportPlugin>
                  <groupId>org.apache.maven.plugins</groupId>
                  <artifactId>maven-project-info-reports-plugin</artifactId>
                </reportPlugin>
              </reportPlugins>
            </configuration>
          </execution>
        </executions>
        <configuration>
          <outputDirectory>C:\Users\lopezbae\Documents\stsworkspace\maven-arale\target\site</outputDirectory>
          <reportPlugins>
            <reportPlugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-project-info-reports-plugin</artifactId>
            </reportPlugin>
          </reportPlugins>
        </configuration>
      </plugin>
    </plugins>
  </build>
  <reporting>
    <outputDirectory>C:\Users\lopezbae\Documents\stsworkspace\maven-arale\target\site</outputDirectory>
  </reporting>
</project>

4.0.0
com.marco.arale
马文·阿拉尔
0.0.1-快照
马文·阿拉尔
假的
中心的
中央知识库
https://repo.maven.apache.org/maven2
从未
假的
中心的
中央知识库
https://repo.maven.apache.org/maven2
C:\Users\lopezbae\Documents\stsworkspace\maven arale\src\main\java
C:\Users\lopezbae\Documents\stsworkspace\maven arale\src\main\scripts
C:\Users\lopezbae\Documents\stsworkspace\maven arale\src\test\java
C:\Users\lopezbae\Documents\stsworkspace\maven arale\target\classes
C:\Users\lopezbae\Documents\stsworkspace\maven arale\target\test classes
C:\Users\lopezbae\Documents\stsworkspace\maven arale\src\main\resources
C:\Users\lopezbae\Documents\stsworkspace\maven arale\src\test\resources
C:\Users\lopezbae\Documents\stsworkspace\maven-maven-arale-0.0.1-SNAPSHOT
阿拉尔\目标
maven antrun插件
1.3
maven汇编插件
2.2-β-5
maven依赖插件
2.8
maven发布插件
2.3.2
maven清洁插件
2.5
默认清除
清洁的
清洁的
maven资源插件
2.6
默认测试资源
过程测试资源
测试资源
默认资源
过程资源
资源
maven jar插件
2.4
默认jar
包裹
罐子
maven编译器插件
3.1
默认编译
编译
编译
默认测试编译
测试编译
测试编译
maven surefire插件
2.12.4
默认测试
测试
测试
maven安装插件
2.4
默认安装
安装
安装
maven部署插件
2.7
默认部署
部署
部署
maven站点插件
3.3
默认站点
网站
网站
C:\Users\lopezbae\Documents\stsworkspace\maven arale\target\site
org.apache.maven.plugins
maven项目信息报告插件
默认部署
站点部署
部署
C:\Users\lopezbae\Documents\stsworkspace\maven arale\target\site
org.apache.maven.plugins
maven项目信息报告插件
C:\Users\lopezbae\Documents\stsworkspace\maven arale\target\site
org.apache.maven.plugins
maven项目信息报告插件
C:\Users\lopezbae\Documents\stsworkspace\maven arale\target\site

您需要添加
maven resources插件
插件,您可以对以下代码进行优化:

<build>
        <pluginManagement>
          <plugins>
            <plugin>
              <artifactId>maven-resources-plugin</artifactId>
              <version>2.7</version>
            </plugin>           
          </plugins>
        </pluginManagement>   
    </build>

在此之后,将
settings.xml
添加到项目中:转到首选项>Maven>用户设置>选择您的settings.xml并单击应用并确定。

您需要添加
Maven资源插件
插件,您可以修改以下代码:

<build>
        <pluginManagement>
          <plugins>
            <plugin>
              <artifactId>maven-resources-plugin</artifactId>
              <version>2.7</version>
            </plugin>           
          </plugins>
        </pluginManagement>   
    </build>

在此之后,将
settings.xml
添加到项目中:转到首选项>Maven>用户设置>选择您的settings.xml,然后单击应用并确定。

我删除了存储库文件夹[found here~/.m2/repository],之后它对我有效。

我删除了存储库文件夹[found here~/.m2/repository]在那之后,它对我起了作用。

对不起,在pom.xml中贴错了部分。pom已经有了该代码,设置与我的相同,只是没有用户名和密码标签,已经选择了正确的设置,仍然存在问题:(然后尝试将settings.xml添加到project:goto Preferences>Maven>User settings>select your settings.xml并单击apply和ok。尝试删除
.m2
文件夹,然后将
Maven resources插件升级到
2.7
版本,并更新项目并运行它。同样的结果,我看不出它失败的原因,这是一个简单的新Maven P。)抱歉,post了pom.xml的错误部分