dapr / dapr/java-sdk

Building the SDK will use cached protobuf definitions (if present) even in a clean checkout / build

Open
#792 0 comments 0 reactions 0 assignees View on GitHub
kind/bug
Dominant language
Java
Stars
300
Forks
230
Avg merge
5d 1h
Merged PRs (30d)
5

Description

## Expected Behavior

`git clone git@github.com:dapr/java-sdk.git && cd java-sdk && mvn package` should work out of the box, but it doesn't if you
have previously build the Java SDK with a different set of protobuf definitions. They instead get cached in `$HOME/.m2/repository/.cache/...` and the failure is non-obvious until you hunt around for docs on Maven's `wget` plugin.

## Actual Behavior

Build fails (iff the new code depends on protobuf definitions different than those you have in your cache).

## Steps to Reproduce the Problem

Have a set of protobuf files cached from a previous Java SDK build that differ from the ones required, then try building a clean clone -- it will fail.

## Release Note

RELEASE NOTE:

**FIX** Skip caching protobuf definition files to make `mvn clean` behave more as one would expect.

Contributor guide

Open the contributing guide

Research direction

Start with the Maven build configuration used by `mvn package` and `mvn clean`, then trace how protobuf definition files are downloaded into `$HOME/.m2/repository/.cache/...`. Done means a clean clone builds without using previously cached protobuf definitions, and the behavior is verified after rebuilding with differing definitions.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.