createTemporaryProtoFileDirectory? I really need to use/read the dependecny proto jar. As the above said, when my project have proto file/directory, but I want to check/read proto definition which depended the current project.
maven-dependency-pluginto unpack the protos into the
targetdirectory in the early phase of the build lifecycle. And then point
protobuf-maven-pluginto that directory as a source.
protobuf-maven-pluginalready scans the dependencies for proto files, unpacks them and uses them as imports for the protos in the current project. Using the dependencies as sources would potentially create a lot of confusion and complicate the plugin configuration.
attachflag for descriptor sets is still broken in the latest code (now it always attaches it). I’m going to fix that.
I work on a project with multiple services and multiple "protobuf datamodel" artifacts (we normally use a separat artifact to describe datastructures with protobuf which than can be used from all modules that need to work with this datastructure). The "overall project datamodel" is the sum of all datamodel artifacts and has to be documented. Thus I somehow will generate the documentation (which icludes the proto and the filedescriptor files) from the information included in the datamodel artifacts - and it just seems more practicall for me if all information is included in the main jar and I do not have to look for another artifact. Much the same argument as why you put the ".proto" files in the main artifact and not in a separate one I guess.
Also, if a component depends on an "datamodel" artifact it has all information in place to handle ProtoBuf messages wether with the generated mapping classes or more generic with the usage of the embedded FileDescriptorSet and the DynamicMessage approach.