Java 针对spring框架的netbeans maven web应用程序bom:jar:4.0.1.RELEASE中的依赖项解析异常

Java 针对spring框架的netbeans maven web应用程序bom:jar:4.0.1.RELEASE中的依赖项解析异常,java,spring,maven,netbeans,dependency-resolution,Java,Spring,Maven,Netbeans,Dependency Resolution,我从Netbeans IDE创建了一个maven web应用程序,然后从项目属性添加了spring框架 然后我建立了这个项目。我得到以下错误 Failure to find org.springframework:spring-framework-bom:jar:4.0.1.RELEASE in http://repo.maven.apache.org/maven2 我在构建时得到的输出: cd /home/shanika/NetBeansProjects/UoMRMSWeb; JAVA_HO

我从Netbeans IDE创建了一个maven web应用程序,然后从项目属性添加了spring框架

然后我建立了这个项目。我得到以下错误

Failure to find org.springframework:spring-framework-bom:jar:4.0.1.RELEASE in http://repo.maven.apache.org/maven2
我在构建时得到的输出:

cd /home/shanika/NetBeansProjects/UoMRMSWeb; JAVA_HOME=/opt/jdk /home/shanika/netbeans-8.1/java/maven/bin/mvn clean install
Scanning for projects...

------------------------------------------------------------------------
Building UoMRMSWeb 1.0-SNAPSHOT
------------------------------------------------------------------------
------------------------------------------------------------------------
BUILD FAILURE
------------------------------------------------------------------------
Total time: 0.485s
Finished at: Sat Jun 04 07:57:52 IST 2016
Final Memory: 6M/112M
------------------------------------------------------------------------
Failed to execute goal on project UoMRMSWeb: Could not resolve dependencies for project com.mycompany:UoMRMSWeb:war:1.0-SNAPSHOT: Failure to find org.springframework:spring-framework-bom:jar:4.0.1.RELEASE in http://repo.maven.apache.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 -> [Help 1]

To see the full stack trace of the errors, re-run Maven with the -e switch.
Re-run Maven using the -X switch to enable full debug logging.

For more information about the errors and possible solutions, please read the following articles:
[Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
我的pom.xml文件:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.mycompany</groupId>
    <artifactId>UoMRMSWeb</artifactId>
    <version>1.0-SNAPSHOT</version>
    <packaging>war</packaging>

    <name>UoMRMSWeb</name>

    <properties>
        <endorsed.dir>${project.build.directory}/endorsed</endorsed.dir>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    </properties>

    <dependencies>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-aop</artifactId>
            <version>4.0.1.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-aspects</artifactId>
            <version>4.0.1.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-beans</artifactId>
            <version>4.0.1.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
            <version>4.0.1.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context-support</artifactId>
            <version>4.0.1.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-core</artifactId>
            <version>4.0.1.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-expression</artifactId>
            <version>4.0.1.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-framework-bom</artifactId>
            <version>4.0.1.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-instrument</artifactId>
            <version>4.0.1.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-instrument-tomcat</artifactId>
            <version>4.0.1.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-jdbc</artifactId>
            <version>4.0.1.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-jms</artifactId>
            <version>4.0.1.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-messaging</artifactId>
            <version>4.0.1.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-orm</artifactId>
            <version>4.0.1.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-oxm</artifactId>
            <version>4.0.1.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-test</artifactId>
            <version>4.0.1.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-tx</artifactId>
            <version>4.0.1.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-web</artifactId>
            <version>4.0.1.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-webmvc</artifactId>
            <version>4.0.1.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-webmvc-portlet</artifactId>
            <version>4.0.1.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-websocket</artifactId>
            <version>4.0.1.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>javax.servlet.jsp.jstl</groupId>
            <artifactId>javax.servlet.jsp.jstl-api</artifactId>
            <version>1.2.1</version>
        </dependency>
        <dependency>
            <groupId>org.glassfish.web</groupId>
            <artifactId>javax.servlet.jsp.jstl</artifactId>
            <version>1.2.2</version>
        </dependency>
        <dependency>
            <groupId>javax</groupId>
            <artifactId>javaee-web-api</artifactId>
            <version>7.0</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.1</version>
                <configuration>
                    <source>1.7</source>
                    <target>1.7</target>
                    <compilerArguments>
                        <endorseddirs>${endorsed.dir}</endorseddirs>
                    </compilerArguments>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-war-plugin</artifactId>
                <version>2.3</version>
                <configuration>
                    <failOnMissingWebXml>false</failOnMissingWebXml>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>2.6</version>
                <executions>
                    <execution>
                        <phase>validate</phase>
                        <goals>
                            <goal>copy</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${endorsed.dir}</outputDirectory>
                            <silent>true</silent>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>javax</groupId>
                                    <artifactId>javaee-endorsed-api</artifactId>
                                    <version>7.0</version>
                                    <type>jar</type>
                                </artifactItem>
                            </artifactItems>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

</project>

4.0.0
com.mycompany
UoMRMSWeb
1.0-快照
战争
UoMRMSWeb
${project.build.directory}/project
UTF-8
org.springframework
春季aop
4.0.1.1发布
org.springframework
春季方面
4.0.1.1发布
org.springframework
春豆
4.0.1.1发布
org.springframework
spring上下文
4.0.1.1发布
org.springframework
spring上下文支持
4.0.1.1发布
org.springframework
弹簧芯
4.0.1.1发布
org.springframework
弹簧式
4.0.1.1发布
org.springframework
spring框架bom表
4.0.1.1发布
org.springframework
弹簧乐器
4.0.1.1发布
org.springframework
弹簧仪器tomcat
4.0.1.1发布
org.springframework
SpringJDBC
4.0.1.1发布
org.springframework
SpringJMS
4.0.1.1发布
org.springframework
spring消息
4.0.1.1发布
org.springframework
春季甲虫
4.0.1.1发布
org.springframework
弹簧oxm
4.0.1.1发布
org.springframework
弹簧试验
4.0.1.1发布
org.springframework
德克萨斯州春季
4.0.1.1发布
org.springframework
弹簧网
4.0.1.1发布
org.springframework
SpringWebMVC
4.0.1.1发布
org.springframework
SpringWebMVCPortlet
4.0.1.1发布
org.springframework
弹簧网袋
4.0.1.1发布
javax.servlet.jsp.jstl
javax.servlet.jsp.jstl-api
1.2.1
org.glassfish.web
javax.servlet.jsp.jstl
1.2.2
爪哇
javaeewebapi
7
假如
org.apache.maven.plugins
maven编译器插件
3.1
1.7
1.7
${annowed.dir}
org.apache.maven.plugins
maven战争插件
2.3
假的
org.apache.maven.plugins
maven依赖插件
2.6
验证
复制
${annowed.dir}
真的
爪哇
javaee认可的api
7
罐子
您需要使用

<dependency>
      <groupId>org.springframework</groupId>
      <artifactId>spring-framework-bom</artifactId>
      <version>4.0.1.RELEASE</version>
      <type>pom</type>
      <scope>import</scope>
</dependency>

org.springframework
spring框架bom表
4.0.1.1发布
聚甲醛
进口