xolstice / protobuf-maven-plugin

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

mvn protobuf:compile exits with an error: No such file or directory #95

Closed hkrishnamurthi closed 2 years ago

hkrishnamurthi commented 2 years ago

Before submitting a bug report

Describe the bug Try running the mvn protobuf:compile on pipeline and it returns the below error:

Failed to execute goal org.xolstice.maven.plugins:protobuf-maven-plugin:0.6.1:compile (default-cli) on project protobuf-client: An error occurred while invoking protoc: Error while executing process.: Cannot run program "target/protoc-plugins/protoc-3.14.0-linux-x86_64.exe": error=2, No such file or directory -> [Help 1]

Environment mvn -version Apache Maven 3.8.3 (ff8e977a158738155dc465c6a97ffaf31982d739) Maven home: /usr/share/java/maven-3 Java version: 17.0.1, vendor: Alpine, runtime: /usr/lib/jvm/java-17-openjdk Default locale: en_US, platform encoding: UTF-8 OS name: "linux", version: "4.14.252-195.483.amzn2.x86_64", arch: "amd64", family: "unix"

...

Standalone or IDE Are you are running Maven inside an IDE, and in that case, which IDE? Local: MAC OSX Gitlab Pipeline image: alpine:latest

Plugin configuration

<plugin>
                <groupId>org.xolstice.maven.plugins</groupId>
                <artifactId>protobuf-maven-plugin</artifactId>
                <version>0.6.1</version>
                <extensions>true</extensions>
                <executions>
                    <execution>
                        <goals>
                            <goal>compile</goal>
                            <goal>test-compile</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <protocArtifact>com.google.protobuf:protoc:${protobuf.version}:exe:${os.detected.classifier}</protocArtifact>
                </configuration>
            </plugin>
...

To Reproduce Steps to reproduce the behavior:

  1. ...
  2. ...

Log output

...

Expected behavior

Additional context

hkrishnamurthi commented 2 years ago

Just saw there is an existing issue with the alpine os image. Now I changed to centos and it is working now.