Skip to content

Consolidate artifact publication into maven-publish#834

Draft
gallardo wants to merge 1 commit intoalkacon:masterfrom
gallardo:chore/modernize-artifact-publication-PR4
Draft

Consolidate artifact publication into maven-publish#834
gallardo wants to merge 1 commit intoalkacon:masterfrom
gallardo:chore/modernize-artifact-publication-PR4

Conversation

@gallardo
Copy link
Contributor

This PR modernizes the artifact publication process by removing the legacy artifacts block and consolidating all publication logic into the modern publishing (maven-publish) block.

Changes:

  • Removed artifacts block: Eliminated the legacy method of registering artifacts for the archives configuration.
  • Unified publishing block: Consolidated all JAR and WAR publications into the maven-publish plugin.
  • Refactored Publication Logic: Ensured that all secondary artifacts (setup, modules, gwt, tests) are correctly handled via the publishing API.
  • Legacy Task Aliases: Maintained install and uploadArchives as aliases to publishToMavenLocal and publish to preserve backward compatibility with existing workflows.

Justification:

  • Standardization: Adheres to the current Gradle standard for publication, making the build more predictable and easier to maintain.
  • Clarity: Removes redundant and confusing artifact registrations across multiple blocks.
  • Maintainability: Simplifies the addition of new artifacts or changes to the publication process.

Verification:

  • Verified that all expected artifacts are still generated and published.
  • Confirmed that ./gradlew publishToMavenLocal correctly populates the local repository.
  • Verified that the install task still works as expected.

@gallardo
Copy link
Contributor Author

The build script still mixes legacy and modern publishing concepts. For instance, uploadArchives historically belonged to the deprecated maven plugin, but currently, it is only an alias creating a conceptual mismatch: it looks like it supports both old and new publishing models, but only one is active.

The script still uses terminology and grouping patterns that originate from the pre-publication-task era (e.g. “install”, “upload”, “archives”), but Gradle's current model is publication-centric, not task-centric.

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

Comments