Skip to content

bug: Maven property ${platform.branch} not expanded in buf antrun execution #325

@pflynn-virtru

Description

@pflynn-virtru

Summary

The ${platform.branch} Maven property is being passed as a literal string to the buf command during the antrun generateSources phase, instead of being expanded to its actual value. This causes the build to fail with:

[exec] Failure: could not clone https://github.com/opentdf/platform.git: exit status 128
[exec] fatal: couldn't find remote ref ${platform.branch}

Environment

  • Java SDK version: v0.7.5 (LTS)
  • Observed in: opentdf/tests X-Test workflow
  • Build tool: Maven with antrun plugin

Steps to Reproduce

  1. Build the Java SDK v0.7.5 with default pom.xml settings
  2. Maven antrun executes buf generate which attempts to clone platform repo
  3. The ${platform.branch} property is passed literally instead of resolved

Expected Behavior

The platform.branch property should be resolved to its value (e.g., protocol/go/v0.5.0 or main) before being passed to the buf command.

Actual Behavior

Git receives the literal string ${platform.branch} as the branch name:

fatal: couldn't find remote ref ${platform.branch}

Relevant Logs

From X-Test workflow run:

platform.branch already defined in .../java/src/main/sdk/pom.xml, skipping.
Using default platform branch from pom.xml
[INFO]      [exec] Failure: could not clone https://github.com/opentdf/platform.git: exit status 128
[INFO]      [exec] fatal: couldn't find remote ref ${platform.branch}

Possible Cause

The antrun plugin may not be configured to filter/expand Maven properties in the exec command arguments, or the property reference syntax in the antrun build.xml may be incorrect.

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions