Skip to content

Commit 4b6c2f3

Browse files
wangliang181230liuqiufeng
authored andcommitted
bugfix: replace flatten-maven-plugin with easyj-maven-plugin to fix the conflict between shade and flatten (apache#4626)
1 parent 3ca654b commit 4b6c2f3

File tree

6 files changed

+81
-57
lines changed

6 files changed

+81
-57
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ For more details about principle and design, please go to [Seata wiki page](http
8282

8383
## Maven dependency
8484
```xml
85-
<seata.version>1.5.0</seata.version>
85+
<seata.version>1.5.1</seata.version>
8686

8787
<dependency>
8888
<groupId>io.seata</groupId>

all/pom.xml

Lines changed: 24 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,6 @@
3030
<name>Seata All-in-one ${project.version}</name>
3131
<description>Seata is an easy-to-use, high-performance, java based, open source distributed transaction solution.</description>
3232

33-
<properties>
34-
<!-- seata version -->
35-
<revision>1.5.0</revision>
36-
</properties>
37-
3833
<dependencyManagement>
3934
<dependencies>
4035
<dependency>
@@ -673,6 +668,30 @@
673668
</execution>
674669
</executions>
675670
</plugin>
671+
<!-- Easyj -->
672+
<plugin>
673+
<groupId>icu.easyj.maven.plugins</groupId>
674+
<artifactId>easyj-maven-plugin</artifactId>
675+
<executions>
676+
<!-- Use this goal to recreate the '.flattened-pom.xml' after shade. -->
677+
<execution>
678+
<id>create-pom-file</id>
679+
<phase>package</phase>
680+
<goals>
681+
<goal>create-pom-file</goal>
682+
</goals>
683+
</execution>
684+
</executions>
685+
<!-- the config of the 'simplify-pom' plugin -->
686+
<configuration>
687+
<keepProvidedDependencies>true</keepProvidedDependencies>
688+
<keepOptionalDependencies>true</keepOptionalDependencies>
689+
<excludeDependencies>
690+
<!-- Exclude dependencies that need to be shaded. -->
691+
<dependency>io.seata:*</dependency>
692+
</excludeDependencies>
693+
</configuration>
694+
</plugin>
676695
<!-- Dependency -->
677696
<plugin>
678697
<groupId>org.apache.maven.plugins</groupId>

build/pom.xml

Lines changed: 23 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363

6464
<properties>
6565
<!-- seata version -->
66-
<revision>1.5.0</revision>
66+
<revision>1.5.2-SNAPSHOT</revision>
6767

6868
<!-- Compiler settings properties -->
6969
<java.version>1.8</java.version>
@@ -77,7 +77,7 @@
7777

7878
<!-- Maven plugin versions -->
7979
<!-- Build -->
80-
<flatten-maven-plugin.version>1.1.0</flatten-maven-plugin.version>
80+
<easyj-maven-plugin.version>0.5.6</easyj-maven-plugin.version>
8181
<maven-clean-plugin.version>3.1.0</maven-clean-plugin.version>
8282
<!-- Compiler -->
8383
<maven-compiler-plugin.version>3.8.1</maven-compiler-plugin.version>
@@ -165,6 +165,23 @@
165165
<artifactId>license-maven-plugin</artifactId>
166166
<version>${mojo-license-maven-plugin.version}</version>
167167
</plugin>
168+
<plugin>
169+
<groupId>icu.easyj.maven.plugins</groupId>
170+
<artifactId>easyj-maven-plugin</artifactId>
171+
<version>${easyj-maven-plugin.version}</version>
172+
<!-- This goal can replace flatten-maven-plugin to flatten the pom, and replace '${revision}' to the actual version. -->
173+
<executions>
174+
<execution>
175+
<id>simplify-pom</id>
176+
<goals>
177+
<goal>simplify-pom</goal>
178+
</goals>
179+
</execution>
180+
</executions>
181+
<configuration>
182+
<simplifiedPomFileName>.flattened-pom.xml</simplifiedPomFileName>
183+
</configuration>
184+
</plugin>
168185
</plugins>
169186
</pluginManagement>
170187

@@ -224,7 +241,7 @@
224241
<fileset>
225242
<directory>./</directory>
226243
<includes>
227-
<include>*-pom*.xml</include>
244+
<include>*-pom.xml</include>
228245
<include>**/db_store/**</include>
229246
<include>**/sessionStore/**</include>
230247
<include>**/root.data</include>
@@ -234,31 +251,10 @@
234251
</filesets>
235252
</configuration>
236253
</plugin>
237-
<!-- Flatten -->
254+
<!-- EasyJ -->
238255
<plugin>
239-
<groupId>org.codehaus.mojo</groupId>
240-
<artifactId>flatten-maven-plugin</artifactId>
241-
<version>${flatten-maven-plugin.version}</version>
242-
<configuration>
243-
<updatePomFile>true</updatePomFile>
244-
<flattenMode>resolveCiFriendliesOnly</flattenMode>
245-
</configuration>
246-
<executions>
247-
<execution>
248-
<id>flatten</id>
249-
<phase>process-resources</phase>
250-
<goals>
251-
<goal>flatten</goal>
252-
</goals>
253-
</execution>
254-
<execution>
255-
<id>flatten.clean</id>
256-
<phase>clean</phase>
257-
<goals>
258-
<goal>clean</goal>
259-
</goals>
260-
</execution>
261-
</executions>
256+
<groupId>icu.easyj.maven.plugins</groupId>
257+
<artifactId>easyj-maven-plugin</artifactId>
262258
</plugin>
263259
<!-- Enforcer -->
264260
<plugin>

changes/2.0.0.md

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<details>
77
<summary><mark>Release notes</mark></summary>
88

9-
### Seata 2.0.0
9+
### Seata 2.0.0
1010

1111
Seata 2.0.0 发布。
1212

@@ -15,30 +15,34 @@ Seata 是一款开源的分布式事务解决方案,提供高性能和简单
1515
此版本更新如下:
1616

1717
### feature:
18-
* [[#1234](https://github.com/seata/seata/pull/1234)] 样例,后续请删除
18+
- [[#1234](https://github.com/seata/seata/pull/1234)] 样例,后续请删除
1919

2020
### bugfix:
21-
* [[#1234](https://github.com/seata/seata/pull/1234)] 样例,后续请删除
21+
- [[#1234](https://github.com/seata/seata/pull/1234)] 样例,后续请删除
22+
- [[#4626](https://github.com/seata/seata/pull/4626)] 使用 `easyj-maven-plugin` 插件代替 `flatten-maven-plugin` 插件,以修复 `shade` 插件与 `flatten` 插件不兼容的问题,导致`seata-all.pom` 中的 `${revision}` 并没有被替换,使应用端引用 `seata-all` 后无法打包。
2223

2324
### optimize:
24-
- [[#4567](https://github.com/seata/seata/pull/4567)] 支持where条件带函数find_in_set支持
25+
- [[#4567](https://github.com/seata/seata/pull/4567)] 支持where条件带函数find_in_set支持
2526

2627
### test:
27-
* [[#1234](https://github.com/seata/seata/pull/1234)] 样例,后续请删除
28+
- [[#1234](https://github.com/seata/seata/pull/1234)] 样例,后续请删除
2829

2930

30-
非常感谢以下 contributors 的代码贡献。若有无意遗漏,请报告。
31+
### Contributors:
3132

32-
- [slievrly](https://github.com/slievrly)
33-
- [doubleDimple](https://github.com/doubleDimple)
33+
非常感谢以下 contributors 的代码贡献。若有无意遗漏,请报告。
34+
35+
- [slievrly](https://github.com/slievrly)
36+
- [doubleDimple](https://github.com/doubleDimple)
3437

3538
同时,我们收到了社区反馈的很多有价值的issue和建议,非常感谢大家。
3639

37-
#### Link
3840

39-
- **Seata:** https://github.com/seata/seata
40-
- **Seata-Samples:** https://github.com/seata/seata-samples
41-
- **Release:** https://github.com/seata/seata/releases
42-
- **WebSite:** https://seata.io
41+
#### Link
42+
43+
- **Seata:** https://github.com/seata/seata
44+
- **Seata-Samples:** https://github.com/seata/seata-samples
45+
- **Release:** https://github.com/seata/seata/releases
46+
- **WebSite:** https://seata.io
4347

44-
</details>
48+
</details>

changes/en-us/2.0.0.md

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
### 2.0.0
1+
### 2.0.0
22

33
[source](https://github.com/seata/seata/archive/v2.0.0.zip) |
44
[binary](https://github.com/seata/seata/releases/download/v2.0.0/seata-server-2.0.0.zip)
55

6-
<details>
6+
<details>
77
<summary><mark>Release notes</mark></summary>
8-
### Seata 2.0.0
8+
9+
### Seata 2.0.0
910

1011
Seata 2.0.0 Released.
1112

@@ -14,16 +15,20 @@ Seata is an easy-to-use, high-performance, open source distributed transaction s
1415
The version is updated as follows:
1516

1617
### feature:
17-
* [[#1234](https://github.com/seata/seata/pull/1234)] Please delete the sample later
18+
- [[#1234](https://github.com/seata/seata/pull/1234)] Please delete the sample later
1819

1920
### bugfix:
20-
* [[#1234](https://github.com/seata/seata/pull/1234)] Please delete the sample later
21+
- [[#1234](https://github.com/seata/seata/pull/1234)] Please delete the sample later
22+
- [[#4626](https://github.com/seata/seata/pull/4626)] Replace `flatten-maven-plugin` with `easyj-maven-plugin` to fix the conflict between `shade` and `flatten`
2123

2224
### optimize:
23-
- [[#4567](https://github.com/seata/seata/pull/4567)] support where method condition(find_in_set)
25+
- [[#4567](https://github.com/seata/seata/pull/4567)] Support where method condition(find_in_set)
2426

2527
### test:
26-
* [[#1234](https://github.com/seata/seata/pull/1234)] Please delete the sample later
28+
- [[#1234](https://github.com/seata/seata/pull/1234)] Please delete the sample later
29+
30+
31+
### Contributors:
2732

2833
Thanks to these contributors for their code commits. Please report an unintended omission.
2934

@@ -32,12 +37,12 @@ Thanks to these contributors for their code commits. Please report an unintended
3237

3338
Also, we receive many valuable issues, questions and advices from our community. Thanks for you all.
3439

35-
#### Link
40+
41+
#### Link
3642

3743
- **Seata:** https://github.com/seata/seata
3844
- **Seata-Samples:** https://github.com/seata/seata-samples
3945
- **Release:** https://github.com/seata/seata/releases
4046
- **WebSite:** https://seata.io
4147

42-
4348
</details>

core/src/main/java/io/seata/core/protocol/Version.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public class Version {
3636
/**
3737
* The constant CURRENT.
3838
*/
39-
private static final String CURRENT = "1.5.0";
39+
private static final String CURRENT = "1.5.2-SNAPSHOT";
4040
private static final String VERSION_0_7_1 = "0.7.1";
4141
private static final String VERSION_1_5_0 = "1.5.0";
4242
private static final int MAX_VERSION_DOT = 3;

0 commit comments

Comments
 (0)