Skip to content

fix: write dependency-reduced-pom.xml to target/ to prevent incremental build issues#860

Open
ahmedmuhsin wants to merge 1 commit intoAzure:devfrom
ahmedmuhsin:feature/blob-service-client-caching
Open

fix: write dependency-reduced-pom.xml to target/ to prevent incremental build issues#860
ahmedmuhsin wants to merge 1 commit intoAzure:devfrom
ahmedmuhsin:feature/blob-service-client-caching

Conversation

@ahmedmuhsin
Copy link
Copy Markdown
Contributor

Summary

The maven-shade-plugin writes dependency-reduced-pom.xml to the project root by default. On subsequent builds without clean, Maven reads this file instead of pom.xml, loses protobuf/gRPC dependencies, and produces a JAR without StreamingMessage and other generated gRPC classes.

What changed

  • pom.xml: Added dependencyReducedPomLocation pointing to target/ so clean deletes it
  • .gitignore: Added dependency-reduced-pom.xml entry

Impact

  • Incremental builds (mvn package without clean) now reliably produce a complete JAR
  • No more missing StreamingMessage.class requiring manual deletion of dependency-reduced-pom.xml
  • CI is unaffected (always does clean builds)

…al build issues

The maven-shade-plugin writes dependency-reduced-pom.xml to the project root
by default. On subsequent builds without clean, Maven reads this file instead
of pom.xml, loses protobuf/gRPC dependencies, and produces a JAR without
StreamingMessage and other generated gRPC classes.

Setting dependencyReducedPomLocation to target/ ensures clean deletes it and
incremental builds always use the real pom.xml.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant