xolstice / protobuf-maven-plugin

Maven Plugin that executes the Protocol Buffers (protoc) compiler
https://www.xolstice.org/protobuf-maven-plugin/
Other
232 stars 76 forks source link

Using the attachDescriptorSet option has no effect #58

Closed FrVaBe closed 5 years ago

FrVaBe commented 5 years ago

Description Using the attachDescriptorSet option has no effect. The generated DescriptorSet is not included in the main artifact and also no additional artifact with the descriptorSet included is generated.

Environment

Maven home: C:\Progs\apache-maven-3.6.0\bin\..
Java version: 11.0.2, vendor: AdoptOpenJDK, runtime: C:\Progs\jdk-11.0.2+7
Default locale: de_DE, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"

Standalone or IDE Standalone

Plugin configuration https://github.com/FrVaBe/protobuf/blob/0.0.1/protobuf-showcase/pom.xml

To Reproduce Issue can be reproduced using the protobuf-showcase project (tag 0.0.1) in this repository: https://github.com/FrVaBe/protobuf/tree/0.0.1

Run mvn clean verify to reproduce the behaviour.

Expected behavior The FileDescriptorSet file is generated as expected at target\generated-resources\protobuf\descriptor-sets\protobuf-showcase-0.0.1.protobin. I also expected to have an (extra) artifact with the FileDescriptorSet generated but no extra artifact is build and the FileDescriptorSet is also not included in the main artifact (like the .proto files).

Additional context

FrVaBe commented 5 years ago

I noticed that the artifact is not generated in the target folder but somehow gets deployed to the repository in the deploy phase. Thus the attachDescriptorSet option has the expected effect. Sorry for this issue.

huntc commented 3 years ago

I find that the descriptor set is generated when using:

          <writeDescriptorSet>true</writeDescriptorSet>

This may then be included into the deployed archive given that it is a generated resource.

However, attachDescriptorSet does not appear to be used anywhere.