xuxiaowei-com-cn opened a new pull request, #8177:
URL: https://github.com/apache/incubator-seata/pull/8177
- Move protobuf.version and grpc.version from dependencies/pom.xml to
build/pom.xml
- Replace hardcoded version numbers with property references in
protobuf-maven-plugin configs
- Bump protoc from 3.25.4 to 3.25.5
<!--
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.
-->
<!-- Please make sure you have read and understood the contributing
guidelines -->
- [ ] I have read the
[CONTRIBUTING.md](https://github.com/apache/incubator-seata/blob/2.x/CONTRIBUTING.md)
guidelines.
- [ ] I have registered the PR
[changes](https://github.com/apache/incubator-seata/tree/2.x/changes).
### Ⅰ. Describe what this PR did
Moves the `<protobuf.version>` and `<grpc.version>` properties from
`dependencies/pom.xml` up to `build/pom.xml` (`org.apache.seata:seata-build`),
so that all child modules can properly inherit these properties. Also replaces
the hardcoded protobuf version `3.25.4` with `${protobuf.version}` and the
hardcoded gRPC version `1.55.1` with `${grpc.version}` in all sub-modules,
enabling builds on architectures such as LoongArch to specify compatible
versions via the `-Dprotobuf.version=x.y.z` and `-Dgrpc.version=x.y.z`
parameters.
### Ⅱ. Does this pull request fix one issue?
<!-- If that, add "fixes #xxx" below in the next line, for example, fixes
#97. -->
fixes https://github.com/apache/incubator-seata/issues/8176
### Ⅲ. Why don't you add test cases (unit test/integration test)?
This change is a build configuration refactoring and does not involve
business logic changes. It can be verified by running `mvn clean package
-Dgrpc.version=1.54.2` on the LoongArch architecture.
### Ⅳ. Describe how to verify it
1. On a LoongArch machine, run:
```shell
mvn clean package -Dgrpc.version=1.54.2
```
2. Confirm that the `seata-grpc` module builds successfully
3. On an x86_64 machine, run the standard build to confirm no regressions:
```shell
mvn clean package
```
### Ⅴ. Special notes for reviews
This change involves six files:
| File | Change |
|------|--------|
| `build/pom.xml` | Added `<protobuf.version>3.25.5</protobuf.version>` and
`<grpc.version>1.55.1</grpc.version>` property definitions |
| `dependencies/pom.xml` | Removed
`<protobuf.version>3.25.5</protobuf.version>` and
`<grpc.version>1.55.1</grpc.version>` (moved up to `build/pom.xml`) |
| `core/pom.xml` | `3.25.4` → `${protobuf.version}` |
| `extensions/rpc/seata-grpc/pom.xml` | `3.25.4` → `${protobuf.version}`,
`1.55.1` → `${grpc.version}` |
| `serializer/seata-serializer-protobuf/pom.xml` | `3.25.4` →
`${protobuf.version}` |
| `test-suite/test-new-version/pom.xml` | `3.25.4` → `${protobuf.version}`,
`1.55.1` → `${grpc.version}` |
`dependencies/pom.xml` and `seata-grpc/pom.xml` (as well as other
sub-modules like `core/pom.xml` and
`serializer/seata-serializer-protobuf/pom.xml`) do not have a direct
parent-child relationship with `dependencies/pom.xml` (their common parent is
`org.apache.seata:seata-build`), so the `<protobuf.version>` and
`<grpc.version>` properties originally defined in `dependencies/pom.xml` could
not be resolved by these sub-modules. By moving them up to `build/pom.xml`, all
child modules can now properly inherit these properties.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]