Skip to content

使用2.7.0版本install,在Gradle依赖时解析POM文件失败 #441

@jelipo

Description

@jelipo

Windows10
Gradle 5.2.1
maven wrapper


使用releases版本中的2.7.0版本,执行mvnw install命令,在仓库..\org\apache\dubbo\dubbo-spring-boot-starter\2.7.0中生成4个文件。

dubbo-spring-boot-starter-2.7.0-sources.jar
dubbo-spring-boot-starter-2.7.0.jar
dubbo-spring-boot-starter-2.7.0.pom
_remote.repositories

在Gradle引用compile("org.apache.dubbo:dubbo:2.7.0")发现错误,提示:

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':touch-common:compileKotlin'.
> Could not resolve all files for configuration ':touch-common:compileClasspath'.
   > Could not resolve org.apache.dubbo:dubbo-spring-boot-starter:2.7.0.
     Required by:
         project :my-project
      > Could not resolve org.apache.dubbo:dubbo-spring-boot-starter:2.7.0.
         > Could not parse POM D:\Program Files\Java\repository\org\apache\dubbo\dubbo-spring-boot-starter\2.7.0\dubbo-spring-boot-starter-2.7.0.pom
            > Could not find org.apache.dubbo:dubbo-spring-boot-parent:${revision}.

dubbo-spring-boot-starter-2.7.0.pom :

<?xml version="1.0" encoding="UTF-8"?>
<!--
  Licensed to the Apache Software Foundation (ASF) under one or more
  contributor license agreements.  See the NOTICE file distributed with
  this work for additional information regarding copyright ownership.
  The ASF licenses this file to You under the Apache License, Version 2.0
  (the "License"); you may not use this file except in compliance with
  the License.  You may obtain a copy of the License at

      http://www.apache.org/licenses/LICENSE-2.0

  Unless required by applicable law or agreed to in writing, software
  distributed under the License is distributed on an "AS IS" BASIS,
  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  See the License for the specific language governing permissions and
  limitations under the License.
  -->
<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>
        <groupId>org.apache.dubbo</groupId>
        <artifactId>dubbo-spring-boot-parent</artifactId>
        <version>${revision}</version>
        <relativePath>../dubbo-spring-boot-parent</relativePath>
    </parent>
    <modelVersion>4.0.0</modelVersion>

    <artifactId>dubbo-spring-boot-starter</artifactId>
    <packaging>jar</packaging>
    <name>Apache Dubbo Spring Boot :: Starter</name>
    <description>Apache Dubbo Spring Boot Starter</description>


    <dependencies>
        <!-- Spring Boot dependencies -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter</artifactId>
            <optional>true</optional>
        </dependency>

        <dependency>
            <groupId>org.apache.dubbo</groupId>
            <artifactId>dubbo-spring-boot-autoconfigure</artifactId>
            <version>${revision}</version>
        </dependency>

    </dependencies>
</project>


看到最近的提交好像有把版本号替换为变量${revision}的形式,是这里的问题吗?

add:
我把${revision}全部替换为2.7.0了,现在可以正常依赖了,接下来的版本可否对Gradle做下兼容。

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions