Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/salesforce/proto-backwards-compat-maven-plugin
A Maven plugin for protecting against backwards incompatible changes to your gRPC .proto files.
https://github.com/salesforce/proto-backwards-compat-maven-plugin
grpc-java maven-plugin protobuf
Last synced: 2 months ago
JSON representation
A Maven plugin for protecting against backwards incompatible changes to your gRPC .proto files.
- Host: GitHub
- URL: https://github.com/salesforce/proto-backwards-compat-maven-plugin
- Owner: salesforce
- License: bsd-3-clause
- Created: 2018-08-14T06:09:36.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2024-05-06T12:56:24.000Z (9 months ago)
- Last Synced: 2024-11-08T13:21:19.559Z (2 months ago)
- Topics: grpc-java, maven-plugin, protobuf
- Language: Java
- Homepage:
- Size: 23.9 MB
- Stars: 13
- Watchers: 10
- Forks: 11
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
- Codeowners: CODEOWNERS
Awesome Lists containing this project
README
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.salesforce.servicelibs/proto-backwards-compatibility/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.salesforce.servicelibs/proto-backwards-compatibility)
Protolock Version: [20210218T172155Z](https://github.com/nilslice/protolock/releases/tag/v0.15.2)
# Protobuf Backwards Compatibility Check Maven Plugin
The `proto-backwards-compatibility` plugin is a Maven plugin to
run a backwards compatibility check on a set of protobuf IDL files. The plugin
can be integrated into various phases of a maven build to check that any changes to
a set of .proto files are backwards compatible. This ensures that these changes do
not impact existing users that haven't had a chance to update to these latest changes.
A proto.lock file is created in the proto source directory to keep
track of the state of the .proto files. This file is updated when a non-breaking change
is made, and should be checked in along with any other changes.It is also possible to force any breaking changes and reset the current state
by either* deleting the proto.lock file. It will then reinitialize the next time the
plugin is run.
* or by specifying parameter property `acceptBreakingChanges` (`-DacceptBreakingChanges=true`)#### Maintaining Backwards Compatibility
In order to maintain backwards compatibility for your set of .proto files, a few
rules must be followed when making updates. Please refer here to avoid breaking changes:
https://developers.google.com/protocol-buffers/docs/proto#backwards-compatibility## Usage
The `os-maven-plugin` extension (https://github.com/trustin/os-maven-plugin)
must be added to your project's pom.xml file in order for this plugin to work.```xml
kr.motd.maven
os-maven-plugin
1.4.1.Final
com.salesforce.servicelibs
proto-backwards-compatibility
${proto-backwards-compatibility.version}
src/main/proto
src/main/proto
backwards-compatibility-check
```
## Configuration
* `` (`${basedir}/src/main/proto`) - The directory where proto sources can be found.
* `` (defaults to root of proto files) - The directory where proto.lock will be kept.
* `` (empty) - Additional [command line options](https://github.com/nilslice/protolock#usage) to pass to protolock.```xml
src/main/proto
--ignore=target/
${project.basedir}
```
## Plugins
Protolock has [plugin support](https://github.com/nilslice/protolock/wiki/Plugins), to allow
for new rules to be enforced. Protolock plugins are referenced by adding the following
additional configuration to your pom.xml.```xml
com.salesforce.servicelibs:sample-plugin:0.1.0-SNAPSHOT:${os.detected.classifier}
sample-plugin
```
## Acknowledgements
Thank you to Steve Manuel for his protocol buffer compatiblity tracker which
is a key component of this plugin: https://github.com/nilslice/protolock