2

I've been struggling with the following error.

[ERROR] Failed to execute goal org.xolstice.maven.plugins:protobuf-maven-plugin:0.6.1:compile-custom (compile) on project grpc: protoc did not exit cleanly. Review output for more information. -> [Help 1]

I have a parent pom where I have defined plugin under pluginManagement tag. In child pom I am using the plugin defined in parent pom. Here is how my pom file looks like.

Parent pom:

<pluginManagement>
             <plugin>
                <groupId>org.xolstice.maven.plugins</groupId>
                <artifactId>protobuf-maven-plugin</artifactId>
                <version>0.6.1</version>
             </plugin>
</pluginManagement>

Child pom:

    </plugins>
         <plugin>
            <groupId>org.xolstice.maven.plugins</groupId>
            <artifactId>protobuf-maven-plugin</artifactId>
            <configuration>
                    <protocArtifact>
                        com.google.protobuf:protoc:3.14.0:exe:${os.detected.classifier}
                    </protocArtifact>
                    <pluginId>grpc-java</pluginId>
                    <pluginArtifact>io.grpc:protoc-gen-grpc-java:${protoc.version}:exe:${os.detected.classifier}
                    </pluginArtifact>
                    <protocPlugins>
                        <protocPlugin>
                            <id>vertx-grpc-protoc-plugin</id>
                            <groupId>io.vertx</groupId>
                            <artifactId>vertx-grpc-protoc-plugin</artifactId>
                            <version>4.2.3</version>
                            <mainClass>io.vertx.grpc.protoc.plugin.VertxGrpcGenerator</mainClass>
                        </protocPlugin>
                    </protocPlugins>
                </configuration>
                <executions>
                    <execution>
                        <id>compile</id>
                        <configuration>
                            <outputDirectory>${protobuf.output.directory}</outputDirectory>
                            <clearOutputDirectory>false</clearOutputDirectory>
                        </configuration>
                        <goals>
                            <goal>compile</goal>
                            <goal>compile-custom</goal>
                        </goals>
                    </execution>
                    <execution>
                        <id>test-compile</id>
                        <goals>
                            <goal>test-compile</goal>
                            <goal>test-compile-custom</goal>
                        </goals>
                    </execution>
                </executions>
        </plugin>
    </plugins>
BountyHunter
  • 89
  • 2
  • 10
  • more info: https://github.com/xolstice/protobuf-maven-plugin/issues/98 – BountyHunter Feb 16 '22 at 11:30
  • Resolved this issue. The problem was that CI pipeline running RHEL 7 that supports glibc 2.12. Whereas protoc after version 1.34 is not compatible with glibc 2.12. The fix is to use supported protoc and protobuf versions. The versions which worked for me are protoc 3.12.0 and protobuf 1.34.0. – BountyHunter Feb 17 '22 at 16:04

0 Answers0