在spring工具套件中构建maven项目时出错

时间:2017-01-09 21:36:12

标签: spring maven spring-tool-suite

当它们确实存在时显示缺失的文物。

描述资源路径位置类型 ArtifactDescriptorException:无法读取org.jvnet.staxex的工件描述符:stax-ex:jar:RELEASE:VersionResolutionException:无法解析org.jvnet.staxex的版本:stax-ex:jar:RELEASE:找不到元数据org.jvnet .staxex:本地的stax-ex / maven-metadata.xml(C:\ Users \ joshuach.m2 \ repository)pom.xml / wap-w9-info-client line 1 Maven依赖问题

POM.xml文件:

<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/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>com.ecs.irs</groupId>
    <artifactId>wap-w9-info-client</artifactId>
    <packaging>war</packaging>
    <version>2.1.0</version>

    <parent>
        <groupId>com.ecs</groupId>
        <artifactId>ecs-parent</artifactId>
        <version>1.0.11</version>
    </parent>

    <properties>
        <bds.version>1.0.0</bds.version>
        <cxf.version>2.4.0</cxf.version>
        <irs.data.common.version>3.0.0</irs.data.common.version>
        <org.springframework.version>3.0.5</org.springframework.version>
    </properties>

    <build>
        <finalName>${project.artifactId}</finalName>
        <plugins>

            <plugin>
                <artifactId>maven-clean-plugin</artifactId>
                <version>2.4.1</version>
                <configuration>
                <filesets>
                    <fileset>
                        <directory>src/main/webapp/WEB-INF/classes</directory>
                        <followSymlinks>false</followSymlinks>
                    </fileset>
                    <fileset>
                        <directory>src/main/webapp/WEB-INF/lib</directory>
                        <followSymlinks>false</followSymlinks>
                    </fileset>
                </filesets>
                </configuration>
            </plugin>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId> 
                <artifactId>maven-compiler-plugin</artifactId> 
                <version>2.0</version><!--$NO-MVN-MAN-VER$--> 
                <configuration>
                    <source>1.6</source> 
                    <target>1.6</target> 
                </configuration>
                </plugin>

            <plugin>
                <artifactId>maven-war-plugin</artifactId> 
                <version>2.0.1</version> 
                <configuration>
                    <webResources>
                        <resource>
                            <directory>
                                ${basedir}/src/main/webapp
                            </directory>
                            <filtering>true</filtering>
                            <excludes>
                                <exclude>**/.MySCMServerInfo</exclude>
                                <exclude>**/*.gif</exclude>
                                <exclude>**/*.png</exclude>
                                <exclude>**/*.jpg</exclude>
                                <exclude>**/*.ftl</exclude>
                            </excludes> 
                        </resource>
                    </webResources>
                </configuration>
            </plugin>
        </plugins>
    </build>

<dependencies>
    <dependency>
        <groupId>com.ccbill.dbd</groupId>
        <artifactId>DBDReplication</artifactId>
        <version>5.1.0</version>
    </dependency>

    <!-- IRS & Data Service  -->
    <dependency>
        <groupId>com.ecs.irs</groupId>
        <artifactId>irs-data-common</artifactId>
        <version>2.1.0</version><!-- Was "${irs.data.common.version}" -->
    </dependency>

    <!--  Bad Data -->
    <dependency>
        <groupId>com.ecs.bds</groupId>
        <artifactId>bds-interfaces</artifactId>
        <version>${bds.version}</version>
    </dependency>

    <!--   Spring  --> 
    <dependency>
        <groupId>org.springframework</groupId> 
        <artifactId>spring-context</artifactId> 
        <version>3.0.6</version><!--$NO-MVN-MAN-VER$, was "${org.springframework.version}"--> 
    </dependency>

    <dependency>
        <groupId>org.springframework</groupId> 
        <artifactId>spring-webmvc</artifactId> 
        <version>3.0.6</version><!--$NO-MVN-MAN-VER$, was "${org.springframework.version}"--> 
    </dependency>

    <dependency>
        <groupId>commons-fileupload</groupId>
        <artifactId>commons-fileupload</artifactId>
        <version>1.2</version>
    </dependency>

    <!-- servlet --> 
    <dependency>
        <groupId>javax.servlet</groupId> 
        <artifactId>servlet-api</artifactId> 
        <version>2.5</version><!--$NO-MVN-MAN-VER$-->
        <scope>provided</scope> 
    </dependency>

    <!-- jackson json mapper -->
    <dependency>
        <groupId>org.codehaus.jackson</groupId>
        <artifactId>jackson-mapper-asl</artifactId>
        <version>1.7.4</version><!--$NO-MVN-MAN-VER$-->
    </dependency>

    <!-- freemarker --> 
    <dependency>
        <groupId>org.freemarker</groupId> 
        <artifactId>freemarker</artifactId> 
        <version>2.3.16</version><!--$NO-MVN-MAN-VER$--> 
    </dependency>

    <!-- for Persister class -->
    <dependency>
        <groupId>org.simpleframework</groupId>
        <artifactId>simple-xml</artifactId>
        <version>1.7.3</version><!--$NO-MVN-MAN-VER$-->
    </dependency>

    <!-- asm -->
    <dependency>
        <groupId>asm</groupId>
        <artifactId>asm</artifactId>
        <version>3.2</version><!--$NO-MVN-MAN-VER$-->
    </dependency>

    <!-- cxf -->
    <dependency>
        <groupId>org.apache.cxf</groupId>
        <artifactId>cxf-rt-frontend-jaxws</artifactId>
        <version>${cxf.version}</version><!--$NO-MVN-MAN-VER$-->
    </dependency>

    <dependency>
        <groupId>org.apache.cxf</groupId>
        <artifactId>cxf-rt-transports-http</artifactId>
        <version>${cxf.version}</version><!--$NO-MVN-MAN-VER$-->
    </dependency>

    <dependency>
        <groupId>org.apache.cxf</groupId>
        <artifactId>cxf-rt-transports-http-jetty</artifactId>
        <version>${cxf.version}</version><!--$NO-MVN-MAN-VER$-->
    </dependency>

    <dependency>
        <groupId>org.jvnet.staxex</groupId>
        <artifactId>stax-ex</artifactId>
        <version>1.2</version><!--$NO-MVN-MAN-VER$-->
    </dependency>

    <dependency>
        <groupId>org.apache.cxf</groupId>
        <artifactId>cxf-common-utilities</artifactId>
        <version>${cxf.version}</version><!--$NO-MVN-MAN-VER$-->
    </dependency>

    <dependency>
        <groupId>org.apache.cxf</groupId>
        <artifactId>cxf-rt-databinding-aegis</artifactId>
        <version>${cxf.version}</version><!--$NO-MVN-MAN-VER$-->
    </dependency>

    <dependency>
        <groupId>com.sun.xml.ws</groupId>
        <artifactId>jaxws-rt</artifactId>
        <version>2.2</version>
    </dependency>

    <dependency>
        <groupId>cglib</groupId>
        <artifactId>cglib</artifactId>
        <version>2.2</version><!--$NO-MVN-MAN-VER$-->
    </dependency>

    <!--  logging  --> 
    <dependency>
        <groupId>log4j</groupId> 
        <artifactId>log4j</artifactId> 
        <scope>compile</scope> 
    </dependency>

    <!-- testing -->
    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <scope>provided</scope>
    </dependency>

    <!-- sys5auth -->
    <dependency>
        <groupId>com.ecs.auth</groupId>
        <artifactId>sys5auth</artifactId>
        <version>1.4.1</version>
        <exclusions>
            <exclusion>
            <groupId>com.ccbill.dbd</groupId>
            <artifactId>DBDReplication</artifactId>
        </exclusion>
        <exclusion>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
        </exclusion>
        <exclusion>
            <groupId>org.springframework</groupId>
            <artifactId>spring</artifactId>
        </exclusion>
        </exclusions>
    </dependency>

    <!-- DBD Replication    
    <dependency>
        <groupId>com.ccbill.dbd</groupId>
        <artifactId>DBDReplication</artifactId>
        <version>5.1.0</version>
    </dependency>-->

</dependencies>

</project>

1 个答案:

答案 0 :(得分:0)

转到此文件夹:

 '../.m2/repository/org/jvnet/staxex'

并且对于所有版本,删除目录中除.jar和.pom文件之外的所有文件。 如果这没有帮助,请尝试删除整个目录。

对我来说,有时这也有助于强制检查绕过本地缓存数据:

mvn -U clean install