Skip to content

Build Failure for Protobuf-3.25.6 Using Maven #20338

Open
@deepeshpatel3434

Description

I attempted to build protobuf-3.25.6 using Maven but encountered issues during the build process. Below are the steps I followed and the errors encountered.
with Error :
Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:3.0.0:run (generate-sources) on project protobuf-javalite: An Ant BuildException has occured: The following error occurred while executing this line:

Steps Followed:

Cloned the repository:

git clone --branch v3.25.5 https://github.com/protocolbuffers/protobuf.git
cd protobuf/java

Executed the Maven build command:
Tried running the following command in the java/core directory:
mvn clean -f java/core/pom.xml install

/protobuf/protofuflib/protobuf/java ((v3.25.6))
$ mvn clean install -U
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Build Order:
[INFO]
[INFO] Protocol Buffers [BOM] [pom]
[INFO] Protocol Buffers [Parent] [pom]
[INFO] Protocol Buffers [Lite] [bundle]
[INFO] Protocol Buffers [Core] [bundle]
[INFO] Protocol Buffers [Util] [bundle]
[INFO] Protocol Buffers [Kotlin-Core] [jar]
[INFO] Protocol Buffers [Kotlin-Lite] [jar]
[INFO]
[INFO] ------------------< com.google.protobuf:protobuf-bom >------------------
[INFO] Building Protocol Buffers [BOM] 3.25.6 [1/7]
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ protobuf-bom ---
[INFO]
[INFO] --- maven-install-plugin:2.4:install (default-install) @ protobuf-bom ---
[INFO] Installing D:\Release\25.1.200\opensource\protobuf\protofuflib\protobuf\java\bom\pom.xml to C:\Users\Deepesh Patel.m2\repository\com\google\protobuf\protobuf-bom\3.25.6\protobuf-bom-3.25.6.pom
[INFO]
[INFO] ----------------< com.google.protobuf:protobuf-parent >-----------------
[INFO] Building Protocol Buffers [Parent] 3.25.6 [2/7]
[INFO] --------------------------------[ pom ]---------------------------------
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ protobuf-parent ---
[INFO]
[INFO] --- animal-sniffer-maven-plugin:1.20:check (android) @ protobuf-parent ---
[INFO] Checking unresolved references to net.sf.androidscents.signature:android-api-level-14:4.0_r4
[INFO]
[INFO] --- maven-install-plugin:2.4:install (default-install) @ protobuf-parent ---
[INFO] Installing D:\Release\25.1.200\opensource\protobuf\protofuflib\protobuf\java\pom.xml to C:\Users\Deepesh Patel.m2\repository\com\google\protobuf\protobuf-parent\3.25.6\protobuf-parent-3.25.6.pom
[INFO]
[INFO] ---------------< com.google.protobuf:protobuf-javalite >----------------
[INFO] Building Protocol Buffers [Lite] 3.25.6 [3/7]
[INFO] -------------------------------[ bundle ]-------------------------------
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-install-plugin/maven-metadata.xml
Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-install-plugin/maven-metadata.xml (895 B at 2.4 kB/s)
Downloading from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-deploy-plugin/maven-metadata.xml
Downloaded from central: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-deploy-plugin/maven-metadata.xml (984 B at 8.7 kB/s)
[INFO]
[INFO] --- maven-clean-plugin:2.5:clean (default-clean) @ protobuf-javalite ---
[INFO] Deleting D:\Release\25.1.200\opensource\protobuf\protofuflib\protobuf\java\lite\target
[INFO]
[INFO] --- maven-resources-plugin:3.1.0:copy-resources (copy-source-files) @ protobuf-javalite ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 91 resources
[INFO]
[INFO] --- maven-antrun-plugin:3.0.0:run (generate-sources) @ protobuf-javalite ---
[INFO] Executing tasks
[WARNING] [echo] Running protoc ...
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary for Protocol Buffers [Parent] 3.25.6:
[INFO]
[INFO] Protocol Buffers [BOM] ............................. SUCCESS [ 0.124 s]
[INFO] Protocol Buffers [Parent] .......................... SUCCESS [ 0.415 s]
[INFO] Protocol Buffers [Lite] ............................ FAILURE [ 1.899 s]
[INFO] Protocol Buffers [Core] ............................ SKIPPED
[INFO] Protocol Buffers [Util] ............................ SKIPPED
[INFO] Protocol Buffers [Kotlin-Core] ..................... SKIPPED
[INFO] Protocol Buffers [Kotlin-Lite] ..................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 3.601 s
[INFO] Finished at: 2025-02-13T16:03:07+05:30
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:3.0.0:run (generate-sources) on project protobuf-javalite: An Ant BuildException has occured: The following error occurred while executing this line:
[ERROR] D:\Release\25.1.200\opensource\protobuf\protofuflib\protobuf\java\lite\generate-sources-build.xml:4: Execute failed: java.io.IOException: Cannot run program "D:\Release\25.1.200\opensource\protobuf\protofuflib\protobuf\java\lite....\protoc" (in directory "D:\Release\25.1.200\opensource\protobuf\protofuflib\protobuf\java\lite"): CreateProcess error=2, The system cannot find the file specified
[ERROR] around Ant part ...... @ 4:49 in D:\Release\25.1.200\opensource\protobuf\protofuflib\protobuf\java\lite\target\antrun\build-main.xml
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn -rf :protobuf-javalite

protobuf/java ((v3.25.6))

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions