Skip to content

Add Java dependency version sync script and sync dependencies - #12286

Merged
Weidong Xu (weidongxu-microsoft) merged 5 commits into
microsoft:mainfrom
weidongxu-microsoft:chore/java-sync-dependency-versions
Oct 16, 2026
Merged

Weidong Xu (weidongxu-microsoft) merged 5 commits into
microsoft:mainfrom
weidongxu-microsoft:chore/java-sync-dependency-versions

Conversation

@weidongxu-microsoft

@weidongxu-microsoft Weidong Xu (weidongxu-microsoft) commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Add a PowerShell script to sync Java dependency versions from Azure SDK for Java, with an allowlist, version pins, and -WhatIf.
  • Apply the sync to generator POMs and Project.Dependency.
  • Update the authentication-test token-cache import for Azure Core 1.60.0.
  • Fix XML pagination reading stream-backed responses twice by parsing cached bytes, matching JSON behavior.

Validation

  • Package build, formatting, lint, and typecheck.
  • Offline script tests, including V2 enum names.
  • Both integration-test modules compile.
  • Rerunning the sync produces no changes.
  • Original pageable Spector tests and sync/async XML pagination regression tests pass.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 6dc9e98a-42fc-4fcf-b49c-b0823d177763
Handle numeric enum names and update the test token cache import for Azure Core 1.60.0.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 6dc9e98a-42fc-4fcf-b49c-b0823d177763
@microsoft-github-policy-service microsoft-github-policy-service Bot added the emitter:client:java Issue for the Java client emitter: @typespec/http-client-java label Oct 16, 2026
@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

All changed packages have been documented.

  • ✅ @typespec/http-client-java
Show changes

@typespec/http-client-java - dependencies ✏️

Sync Java runtime, test, and Maven plugin dependency versions with Azure SDK for Java.

@typespec/http-client-java - fix ✏️

Fix XML pagination with stream-backed responses by caching response bytes before reading items and the next link.

@typespec/http-client-java - internal ✏️

Add a PowerShell script to sync Java dependency versions with Azure SDK for Java.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

The runtime and build-tool upgrades warrant human confirmation of compatibility beyond the reported build and compilation checks.

0 open findings

What changed in this PR

Adds repeatable dependency synchronization for the Java emitter and aligns generator and generated-project dependencies with Azure SDK for Java.

Changes:

  • Adds a PowerShell sync script with an allowlist, version pins, dry-run support, and offline tests.
  • Updates Java dependencies and Maven plugins across generator modules and templates.
  • Adjusts the authentication-test import and documents the synchronization workflow.
File Description
packages/​http-client-java/​generator/​pom.xml Updates shared Maven plugins.
packages/​http-client-java/​generator/​http-client-generator/​pom.xml Updates Jackson and shade-plugin versions.
packages/​http-client-java/​generator/​http-client-generator-test/​src/​test/​java/​authentication/​util/​BearerTokenAuthenticationPolicy.java Uses the public token-cache import.
packages/​http-client-java/​generator/​http-client-generator-test/​pom.xml Updates Azure integration-test dependencies.
packages/​http-client-java/​generator/​http-client-generator-mgmt/​pom.xml Updates management-test dependencies.
packages/​http-client-java/​generator/​http-client-generator-core/​src/​main/​resources/​pom.xml Updates generated-POM defaults.
packages/​http-client-java/​generator/​http-client-generator-core/​src/​main/​java/​com/​microsoft/​typespec/​http/​client/​generator/​core/​model/​projectmodel/​Project.java Updates generated-project dependency versions.
packages/​http-client-java/​generator/​http-client-generator-core/​pom.xml Updates Azure Core for tests.
packages/​http-client-java/​generator/​http-client-generator-clientcore-test/​pom.xml Updates ClientCore test dependencies and compiler plugin.
packages/​http-client-java/​eng/​versioning/​Sync-Versions.Tests.ps1 Adds offline synchronization tests.
packages/​http-client-java/​eng/​versioning/​Sync-Versions.ps1 Implements dependency synchronization.
packages/​http-client-java/​eng/​versioning/​external_dependencies.txt Defines the allowlist and version pins.
packages/​http-client-java/​CONTRIBUTING.md Documents synchronization and testing commands.
.chronus/​changes/​http-client-java-sync-dependency-versions.md Records the internal tooling addition.
.chronus/​changes/​chore-java-sync-dependency-versions-2026-9-16-10-20-30.md Records dependency updates.

🧠 Review effort: Balanced


💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@azure-sdk-automation

azure-sdk-automation Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

You can try these changes here

🛝 Playground 🌐 Website 🛝 VSCode Extension

Reuse cached response bytes when reading XML page items and the next link. Add sync and async pagination regression coverage.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 6dc9e98a-42fc-4fcf-b49c-b0823d177763
Copilot AI balanced review requested due to automatic review settings October 16, 2026 03:35

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Dependency upgrades affecting generated SDKs and Maven tooling warrant final human compatibility review.

0 open findings

🧠 Review effort: Balanced

Keep XML attribute and namespace support while reading cached response bytes. Cover stream-backed continuation tokens and next links.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 6dc9e98a-42fc-4fcf-b49c-b0823d177763
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>

Copilot-Session: 6dc9e98a-42fc-4fcf-b49c-b0823d177763

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

Static review found no blocking issues, and targeted regression coverage supports the changes; tests were not rerun.

0 open findings

🧠 Review effort: Balanced

Merged via the queue into microsoft:main with commit f098e0f Oct 16, 2026
44 checks passed
@weidongxu-microsoft
Weidong Xu (weidongxu-microsoft) deleted the chore/java-sync-dependency-versions branch October 16, 2026 06:51
Weidong Xu (weidongxu-microsoft) added a commit to Azure/typespec-azure that referenced this pull request Oct 16, 2026
…5745)

Update the Java core pin to `f098e0fdd` for the `0.48.2` hotfix. No
package version bump in this PR.

- Include continuation-token paging (microsoft/typespec#12196), enum
Javadoc escaping (microsoft/typespec#12177), and dependency
synchronization (microsoft/typespec#12286), plus upstream dependency
maintenance (microsoft/typespec#12205, microsoft/typespec#12207,
microsoft/typespec#12287).
- Sync upstream integration tests and add a local version-sync script
for shared test dependencies/plugins, using the pinned upstream POMs.
Preserve Azure-specific tooling and generated samples.
- Record all changes as Chronus `fix`, as requested for this release
branch.

Validation: branded emitter/generator build, offline version-sync tests,
enum/ARM generation smoke checks, repository formatting and lint.

Copilot-Session: c93fd771-4af9-4e61-b9af-8f2b15588c47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

emitter:client:java Issue for the Java client emitter: @typespec/http-client-java eng

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants