Skip to content

Publish ftgo-common and ftgo-common-jpa as shared Maven artifacts#189

Open
devin-ai-integration[bot] wants to merge 1 commit intomasterfrom
devin/1776980156-publish-common-maven-artifacts
Open

Publish ftgo-common and ftgo-common-jpa as shared Maven artifacts#189
devin-ai-integration[bot] wants to merge 1 commit intomasterfrom
devin/1776980156-publish-common-maven-artifacts

Conversation

@devin-ai-integration
Copy link
Copy Markdown

Summary

Adds maven-publish plugin configuration so that ftgo-common, ftgo-common-jpa, ftgo-consumer-service-api, and ftgo-restaurant-service-api can be published as standalone Maven artifacts to GitHub Packages. This enables future extracted microservices to depend on these shared modules via standard Maven coordinates (net.chrisrichardson.ftgo:<module>:1.0.0) without needing the monolith source.

Approach: All publishing config is centralized in the root build.gradle using a configure block that targets the four publishable modules by name. No individual module build.gradle files were modified — existing compile project(":ftgo-common") references continue to work unchanged for monolith builds.

Key detail: version = '1.0.0' is set at the project level on publishable modules so that Gradle resolves inter-project dependencies to proper Maven coordinates in generated POMs. Verified locally that ftgo-common-jpa's POM correctly declares net.chrisrichardson.ftgo:ftgo-common:1.0.0 (not unspecified).

Review & Testing Checklist for Human

  • Version duplication: version = '1.0.0' appears both as project.version and inside the MavenPublication block. Confirm this is acceptable or consolidate (e.g., use version = project.version inside the publication).
  • Setting version on publishable subprojects: This changes project.version from unspecified to 1.0.0 for these 4 modules. Verify no other build logic (e.g., jar naming, other plugins) is affected by this.
  • Empty credential fallback: Credentials default to "" if env vars / gradle properties are missing. Consider whether publish should fail fast with a clear error instead.
  • End-to-end publish test: Run GITHUB_ACTOR=<user> GITHUB_TOKEN=<pat> ./gradlew :ftgo-common:publish :ftgo-common-jpa:publish against GitHub Packages to verify the full flow. Only publishToMavenLocal was tested in this PR.
  • Consume from a separate project: Create a test Gradle project that pulls net.chrisrichardson.ftgo:ftgo-common-jpa:1.0.0 from GitHub Packages (or local Maven) and verify transitive deps resolve correctly.

Notes

  • The pre-existing build failure in ftgo-end-to-end-tests-common (missing eventuate-util-test artifact) is unrelated to this change — the eventuate Maven repo was already commented out in the root build.
  • No GitHub Actions workflow is included for automated publishing — this is manual-trigger only (./gradlew publish).
  • A README.md was added documenting artifact coordinates, consumption instructions, and publish commands.

Link to Devin session: https://app.devin.ai/sessions/315132c28df14cf18922fa23aff8e779
Requested by: @bcmake

Publish ftgo-common, ftgo-common-jpa, ftgo-consumer-service-api, and
ftgo-restaurant-service-api as standalone Maven artifacts to GitHub
Packages so extracted microservices can depend on them without needing
the monolith source.

- Add shared maven-publish plugin config in root build.gradle
- Set version 1.0.0 on publishable modules for correct POM resolution
- Project dependency ftgo-common-jpa -> ftgo-common resolves to
  net.chrisrichardson.ftgo:ftgo-common:1.0.0 in generated POM
- Add README.md documenting artifact coordinates and usage

Co-Authored-By: benc <Benc@windsurf.com>
@devin-ai-integration
Copy link
Copy Markdown
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

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.

0 participants