This is a fork of xolstice/protobuf-maven-plugin based on this commit from August 2020 (the latest release 0.6.1 was in Oct 2018) of the forked repo with the following additions:
- Invoke protoc and plugin binaries (like grpc) via
/bin/sh -c
to get around the issue that parallel multi-module builds on Linux run intojava.io.IOException: Cannot run program "...": error=26, Text file busy
errors. Background is that Linux prevents executing (fork
) another process while its binary file has an open file descriptor for that file. This can happen when the binary file has just been written and also already properly closed. The code itself is fine (copy the file, close the file, execute) though, but practice proves that it doesn't always work.
- Use shared repository for protobuf binaries to prevent a sporadic build failure on Linux when
executing the
protoc
binary. The shared repository is located at the project's top level directory under.mvn/protobuf-binaries
. This is enabled by default, can be disabled by setting the new configuration optionuseProtocBinaryRepository
tofalse
. - xolstice#77
In addition to version 0.6.1:
- Fix file descriptor leak commit
- Support passing option to Java compiler commit
- Respect attach flag for descriptor set goals commit
- Use pb insead of protobin for binary descriptors commit
Plus quite a few dependency updates.
A plugin that integrates protocol buffers compiler (protoc
) into Maven lifecycle.
This is a continuation of maven-protoc-plugin
that was started at Google
and later developed by GitHub community.
Release notes and detailed documentation are available on the web site.
Please also read Contribution Guidelines and Code of Conduct for this project.