Maven无法解决项目的依赖关系-无法收集依赖关系

时间:2019-06-20 03:29:49

标签: java maven grpc

我正在为maven grpc项目编译GitHub存储库。我遇到一些依赖性错误。

[错误]无法在项目echo-client-simple上执行目标:无法解析项目com.example.kubernetes:echo- client-simple:jar:1.0-SNAPSHOT的依赖项:无法在com.example上收集依赖项.kubernetes:echo-server:jar:1.0-SNAPSHOT:无法读取com.example.kubernetes:echo-server:jar:1.0-的工件描述符.SNAPSHOT:找不到工件com.example:grpc-demos:pom:1.0 -快照-> [帮助1]

它是GitHub上的一个项目

   https://github.com/saturnism/grpc-java-by-example/tree/master/kubernetes-lb-example

无法解决项目的依赖关系

父pom:

 <?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">
 <parent>
    <artifactId>grpc-demos</artifactId>
    <groupId>com.example</groupId>
    <version>1.0-SNAPSHOT</version>
    <relativePath>../pom.xml</relativePath>
 </parent>
 <modelVersion>4.0.0</modelVersion>

 <groupId>com.example.kubernetes</groupId>
 <artifactId>kubernetes-lb-example</artifactId>
 <packaging>pom</packaging>

 <properties>
    <docker.image.prefix>saturnism</docker.image.prefix>
 </properties>

   <modules>
    <module>echo-server</module>
    <module>echo-client-simple</module>
    <module>echo-client-lb-dns</module>
    <module>echo-client-lb-api</module>
   </modules>
</project>

pom错误:

 <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>
 <artifactId>echo-client-simple</artifactId>
 <parent>
    <version>1.0-SNAPSHOT</version>
    <groupId>com.example.kubernetes</groupId>
    <artifactId>kubernetes-lb-example</artifactId>
    <relativePath>../pom.xml</relativePath>
 </parent>

  <properties>
 <main.class>com.example.grpc.client.SimpleEchoClient</main.class>
 </properties>

 <dependencies>
    <dependency>
        <groupId>${project.groupId}</groupId>
        <artifactId>echo-server</artifactId>
        <version>${project.version}</version>
    </dependency>
</dependencies>

<build>
    <extensions>
        <extension>
            <groupId>kr.motd.maven</groupId>
            <artifactId>os-maven-plugin</artifactId>
        </extension>
    </extensions>
    <plugins>
        <plugin>
            <artifactId>maven-jar-plugin</artifactId>
        </plugin>
        <plugin>
            <artifactId>maven-dependency-plugin</artifactId>
        </plugin>
        <plugin>
            <groupId>org.xolstice.maven.plugins</groupId>
            <artifactId>protobuf-maven-plugin</artifactId>
        </plugin>
    </plugins>
  </build>
 </project>

Maven详细信息

 Apache Maven 3.6.1 (d66c9c0b3152b2e69ee9bac180bb8fcc8e6af555; 2019-04- 05T02:00:29+07:00)
 Maven home: /Users/Steven/documents/tools/apache-maven-3.6.1
 Java version: 1.8.0_212, vendor: AdoptOpenJDK, runtime:  /Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home/jre
 Default locale: en_VN, platform encoding: UTF-8
 OS name: "mac os x", version: "10.13.6", arch: "x86_64", family: "mac"

0 个答案:

没有答案