简体   繁体   中英

Maven project "maven install" error

[ERROR] Failed to execute goal on project xserver-api: 
Could not resolve dependencies for project xgroup:xserver-api:war:1.0.1-SNAPSHOT: 
Failed to collect dependencies at xgroup:xserver-lib:jar:1.0.1-SNAPSHOT: 
Failed to read artifact descriptor for xgroup:xserver-lib:jar:1.0.1-SNAPSHOT: 
Could not find artifact xgroup:xserver:pom:1.0.1-SNAPSHOT -> [Help 1]

who can help me to solve this problem? Thank you very much!

blow is pom file : I don't know where has problem:

 <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> <name>Xserver API</name> <packaging>war</packaging> <artifactId>xserver-api</artifactId> <parent> <groupId>xgroup</groupId> <artifactId>xserver</artifactId> <version>1.0.1-SNAPSHOT</version> </parent> <properties> <javax.servlet-api>3.0.1</javax.servlet-api> <javax.servlet-jstl>1.2</javax.servlet-jstl> <maven-war-plugin>2.4</maven-war-plugin> </properties>

Here is pom of xgroup:xserver-lib.jar:1.0.1-SNAPSHOT

<modelVersion>4.0.0</modelVersion>

<name>Xserver Lib</name>
<packaging>jar</packaging>
<artifactId>xserver-lib</artifactId>

<!-- parent -->
<parent>
    <groupId>xgroup</groupId>
    <artifactId>xserver</artifactId>
    <version>1.0.1-SNAPSHOT</version>
</parent>

<!-- properties -->
<properties>
    <!-- dependencies -->
    <javax.servlet-api>3.0.1</javax.servlet-api>
    <org.springframework>3.2.13.RELEASE</org.springframework>
    <org.codehaus.jackson>1.9.7</org.codehaus.jackson>
    <org.mybatis-mybatis>3.1.1</org.mybatis-mybatis>
    <org.mybatis-mybatis-spring>1.1.1</org.mybatis-mybatis-spring>
    <mysql>5.1.20</mysql>
    <c3p0>0.9.1.2</c3p0>
    <commons-httpclient>3.1</commons-httpclient>
    <org.slf4j>1.6.6</org.slf4j>
    <log4j>1.2.17</log4j>
    <cglib>3.1</cglib>
    <commons-net>3.3</commons-net>
    <javax.jms>2.0</javax.jms>
    <com.rabbitmq>3.4.4</com.rabbitmq>
    <activemq>5.9.1</activemq>
    <jedis>2.6.0</jedis>
    <xmemcached>2.0.0</xmemcached>
</properties>

<!-- dependencies -->
<dependencies>
    <dependency>
        <groupId>javax.servlet</groupId>
        <artifactId>javax.servlet-api</artifactId>
        <version>${javax.servlet-api}</version>
        <scope>provided</scope>
    </dependency>

    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-oxm</artifactId>
        <version>${org.springframework}</version>
        <scope>compile</scope>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-context</artifactId>
        <version>${org.springframework}</version>
        <scope>compile</scope>
    </dependency>
    <dependency>
        <groupId>org.springframework</groupId>
        <artifactId>spring-webmvc</artifactId>
        <version>${org.springframework}</version>
        <scope>compile</scope>
    </dependency>

    <dependency>
        <groupId>org.codehaus.jackson</groupId>
        <artifactId>jackson-mapper-asl</artifactId>
        <version>${org.codehaus.jackson}</version>
        <scope>compile</scope>
    </dependency>

    <dependency>
        <groupId>org.mybatis</groupId>
        <artifactId>mybatis</artifactId>
        <version>${org.mybatis-mybatis}</version>
        <scope>compile</scope>
    </dependency>
    <dependency>
        <groupId>org.mybatis</groupId>
        <artifactId>mybatis-spring</artifactId>
        <version>${org.mybatis-mybatis-spring}</version>
        <scope>compile</scope>
    </dependency>
    <dependency>
        <groupId>mysql</groupId>
        <artifactId>mysql-connector-java</artifactId>
        <version>${mysql}</version>
        <scope>compile</scope>
    </dependency>
    <dependency>
        <groupId>c3p0</groupId>
        <artifactId>c3p0</artifactId>
        <version>${c3p0}</version>
        <scope>compile</scope>
    </dependency>

    <dependency>
        <groupId>commons-httpclient</groupId>
        <artifactId>commons-httpclient</artifactId>
        <version>${commons-httpclient}</version>
        <scope>compile</scope>
    </dependency>

    <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>${org.slf4j}</version>
        <scope>compile</scope>
    </dependency>
    <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-log4j12</artifactId>
        <version>${org.slf4j}</version>
        <scope>compile</scope>
    </dependency>
    <dependency>
        <groupId>log4j</groupId>
        <artifactId>log4j</artifactId>
        <version>${log4j} </version>
        <scope>compile</scope>
    </dependency>

    <dependency>
        <groupId>cglib</groupId>
        <artifactId>cglib</artifactId>
        <version>${cglib}</version>
    </dependency>

    <dependency>
        <groupId>commons-net</groupId>
        <artifactId>commons-net</artifactId>
        <version>${commons-net}</version>
        <scope>compile</scope>
    </dependency>

    <dependency>
        <groupId>javax.jms</groupId>
        <artifactId>javax.jms-api</artifactId>
        <version>${javax.jms}</version>
        <scope>compile</scope>
    </dependency>
    <dependency>
        <groupId>org.apache.activemq</groupId>
        <artifactId>activemq-all</artifactId>
        <version>${activemq}</version>
    </dependency>
    <dependency>
        <groupId>com.rabbitmq</groupId>
        <artifactId>amqp-client</artifactId>
        <version>${com.rabbitmq}</version>
    </dependency>

    <dependency>
        <groupId>redis.clients</groupId>
        <artifactId>jedis</artifactId>
        <version>${jedis}</version>
        <scope>compile</scope>
    </dependency>
    <dependency>
        <groupId>com.googlecode.xmemcached</groupId>
        <artifactId>xmemcached</artifactId>
        <version>${xmemcached}</version>
        <scope>compile</scope>
    </dependency>
</dependencies>

Your maven project structure seems broken. If you first clean install your parent project (which is xgroup:xserver:pom:1.0.1-SNAPSHOT ) and then clean install your child project and your problem will be fixed. But, it will be better if you fix your root problem. If you post your project structure, parent.pom etc. I can give you a more detailed answer.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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