apache / incubator-seata

:fire: Seata is an easy-to-use, high-performance, open source distributed transaction solution.
https://seata.apache.org/
Apache License 2.0
25.28k stars 8.78k forks source link

1.5.0的seata-all的pom中用了createDependencyReducedPom和flatten,编译后生成的.pom文件的parent的version没替换成1.5.0,项目使用1.5.0后再编译会报错 #4618

Closed sixlei closed 2 years ago

sixlei commented 2 years ago

Ⅰ. Issue Description

1.5.0的seata-all的pom中用了createDependencyReducedPom和flatten,编译后生成的.pom文件的parent的version没替换成1.5.0,项目使用1.5.0后再编译会报错 seata-all: `

io.seata
    <artifactId>seata-build</artifactId>
    <version>${revision}</version>
    <relativePath>../build/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>

<artifactId>seata-all</artifactId>

<name>Seata All-in-one ${project.version}</name>
<description>Seata is an easy-to-use, high-performance, java based, open source distributed transaction solution.</description>

<properties>
    <revision>1.5.0</revision>
</properties>
org.apache.maven.plugins maven-shade-plugin package shade true false false true` 打包后生成的seata-all-1.5.0.pom: ` seata-build io.seata ${revision} ../build/pom.xml ` 其他项目引用seata-all:1.5.0后编译报错信息: `Could not transfer artifact io.seata:seata-build:pom:${revision} from/to aliyun-central-repos (http://maven.aliyun.com/nexus/content/groups/public): TransferFailedException ### Ⅲ. Describe what you expected to happen seata-all的rversion应该改成直接改成1.5.0吧 - JDK version : 1.8 - Seata version: 1.5.0 - OS : - Others:
funky-eyes commented 2 years ago

在根路径下打包 maven clean install -DskipTest 会有问题?

sixlei commented 2 years ago

在根路径下打包 maven clean install -DskipTest 会有问题?

不是seata本身编译问题,是别的项目引用了seata再编译会报错,github太慢了,粘截图会报错,可以直接install一下之前你的内个demo项目试试

pengten commented 2 years ago

seata是你自己重新编译的包还是公共仓库的包?

sixlei commented 2 years ago

seata是你自己重新编译的包还是公共仓库的包?

用的公共仓库的,我试了把seata-all的rversion的直接换成1.5.0就可以了,我可以提pr吗

wangliang181230 commented 2 years ago

1.5.1已经使用临时方案修复。

目前,#4626 这个PR使用了我开发的插件 easyj-maven-pluginsimplify-pom,代替了 flatten-maven-pluginflatten。可以正式解决该问题。同时简化了seata的所有pom.xml。