Closed AliHassan89 closed 2 years ago
Fixed it by enclosing plugins
in <pluginManagement>
I changed my child pom file to move all the generated code to the target folder. I couldn't get it working with pluginManagement tag. I moved pluginManagement to my parent pom and using the defined plugin in parent pom under pluginManagment in my child pom. Here are both the pom files:
Parent pom:
<pluginManagement>
<plugin>
<groupId>org.xolstice.maven.plugins</groupId>
<artifactId>protobuf-maven-plugin</artifactId>
<version>0.6.1</version>
<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>
</pluginManagement>
Child pom:
</plugins>
<plugin>
<groupId>org.xolstice.maven.plugins</groupId>
<artifactId>protobuf-maven-plugin</artifactId>
</plugin>
</plugins>
The error I'm getting is :
Failed to execute goal org.xolstice.maven.plugins:protobuf-maven-plugin:0.6.1:compile-custom (compile) on project: protoc did not exit cleanly. Review output for more information. -> [Help 1]
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.
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.
Hi @AliHassan89, I am facing the same error. I read your solution here. However, this is my first time to see these terminologies like RHEL 7 that supports glibc 2.12
.... Could you give more details about how to implement the solution step by step ?
Hi,
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]
Here is how my maven pom file looks like.
`<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
`
@sergei-ivanov I saw you commented on this issue. Any idea what's causing it? Please let me know if you need more info.