Skip to content

Add opt-in main and NeoForge artifact profiles - #1785

Draft
BenCodez wants to merge 1 commit into
masterfrom
build/opt-in-platform-artifacts
Draft

BenCodez wants to merge 1 commit into
masterfrom
build/opt-in-platform-artifacts

Conversation

@BenCodez

@BenCodez BenCodez commented Dec 2, 2026 •

Copy link
Copy Markdown
Owner

Add opt-in platform-main and platform-neoforge Maven profiles that attach separate platform artifacts without replacing the existing universal VotingPlugin.jar, its unclassified Maven coordinates or numbered CI/Jenkins filename contract.

  • platform-main attaches VotingPlugin-main.jar (classifier main) for Bukkit/Spigot/Paper/Folia, BungeeCord and Velocity, excluding only the NeoForge adapter package and descriptor.
  • platform-neoforge attaches VotingPlugin-neoforge.jar (classifier neoforge) with only NeoForge discovery metadata. Shared implementation/dependency classes remain; this is not a neutral/minimized JAR claim.
  • Use one compatible artifact per server, not multiple copies together. Profile extraction preserves every retained class/resource byte, service descriptor, license, manifest and SQLite entry from its input. It introduces no library upgrade or runtime download.
  • Preserve profile metadata when explicit activation disables Maven's default profile, force fresh input JAR creation for repeat builds, and check the final derived artifacts during package.

Validation on the exact reviewed tree a8e13bf563e75cea7031435e792060b3d87b93cb against master 4f593d39f03956660ccc990aa74dcc15eb9a2a7d:

  • Combined-profile clean package: 3,430 ordinary tests, one optional skip, zero failures/errors; all 10 package-artifact checks passed.
  • Unchanged-input Jar/Shade/Ant repeat pipeline: checks passed and all retained payloads matched the first outputs.
  • Default and deploy-snapshot numbered 98765 clean packages were built with ordinary tests skipped, then their explicit package-artifact checks passed (eight passed, two profile-only checks skipped). No install/deploy was run. Default and profile-produced universal payload inventories matched.
  • Independent source-only review approved the exact three-file change. No native server or MCHT run was performed.

Measured with frozen resolved dependency inputs: universal 11,132,695 bytes; main 11,010,030 bytes (122,665 bytes / 1.10% smaller); NeoForge 11,144,646 bytes (11,951 bytes larger due to ZIP layout while shared code remains). This does not establish a substantial dependency reduction or meet a mandatory 10 MiB threshold.

Limits and followups:

  • The current master SQLite policy embeds only Linux x86_64. Profiles inherit it without further removal. Full supported native/offline/override acceptance remains a separate dependency gate associated with Update SQLite and supported NeoForge dependencies #1776; that frozen candidate is untouched. These ZIP checks do not prove Windows/native/runtime behavior.
  • Fabric already has a standalone Gradle/Loom bootstrap in Add standalone Fabric 1.21.1 bootstrap #1771, not on this baseline and not full vote-processing support. No duplicate module or fake Maven Fabric JAR is added. A bridge needs the real module/wrapper/remap contract first.
  • Latest identified Spigot release is 7.1.1, upload 646179, but the actual upload returned HTTP 403. No exact Spigot artifact byte/hash comparison is claimed. The separate Nexus 7.1.1 JAR identifies as a development snapshot build and is not treated as the same upload.
  • Existing CI artifact paths were source-checked and public Jenkins archives/Nexus coordinates inspected; live Jenkins job configuration was inaccessible. No CI/Jenkins/Nexus/download-service settings are changed. Switching the default download to a classifier needs a separate migration decision.
  • Recompress downloadable JAR while preserving entry payloads #1769 recompression and Derive safe NeoForge defaults from shared Bukkit configuration #1768/Add standalone Fabric 1.21.1 bootstrap #1771 artifact-test changes overlap this build area and need ordinary composition review if combined. No existing PR branch was modified. Exact-candidate native acceptance must go through the existing test owner.

Summary by CodeRabbit

  • New Features
    • Added optional platform-specific main and neoforge JAR artifacts for Maven package builds. The existing universal artifact and its coordinates remain unchanged.
  • Documentation
    • Added guidance on the available packaging profiles, artifact contents, supported combinations, and platform-specific constraints.

@coderabbitai

coderabbitai Bot commented Dec 2, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The build adds optional main and neoforge classifier JARs without replacing the universal artifact. Opt-in tests compare classifier contents with the universal artifact, and new documentation describes profile behavior and packaging constraints.

Changes: Platform classifier packaging

Layer / File(s) Summary
Configure and describe classifier artifacts
VotingPlugin/pom.xml, docs/platform-packaging.md
Maven profiles attach main and neoforge classifier JARs with platform-specific exclusions. The documentation describes profile invocation, artifact contents, and packaging constraints.
Validate packaged classifier contents
VotingPlugin/src/test/java/com/bencodez/votingplugin/tests/packaging/PackagedArtifactTest.java
Opt-in checks compare each classifier with the universal artifact after exclusions. They verify entry uniqueness, retained bytes, version metadata, and manifests. The main-profile check also checks for references to the removed NeoForge adapter.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Feature

Possibly related PRs

Merge Risk: Minimal · up to e7c9c

This change adds optional platform-specific JARs without changing the default universal artifact or its coordinates. No concrete merge-blocking risk was found.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "Add opt-in main and NeoForge artifact profiles" matches the main change. The PR adds two opt-in Maven profiles (platform-main and platform-neoforge) that attach classifier JARs during packa…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "Add opt-in main and NeoForge artifact profiles" matches the main change. The PR adds two opt-in Maven profiles (platform-main and platform-neoforge) that attach classifier JARs during package. The title is concise, specific, and names the primary change. It does not mention the packaging test or documentation, which is acceptable because those are supporting changes.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Some tools did not complete. Review the errors below.

OSV Scanner (2.7.0)

VotingPlugin/pom.xml

OSV Scanner exited with code 127; dependency analysis is incomplete

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 2d7328ff-9e0b-47d0-bb5d-ad8b910bfa0b
Commits

Reviewing files that changed from the base of the PR and between 4f593d3 and e7c9c1f.

Files selected for processing: 3

  • VotingPlugin/pom.xml
  • VotingPlugin/src/test/java/com/bencodez/votingplugin/tests/packaging/PackagedArtifactTest.java
  • docs/platform-packaging.md

Included review availability: This review used your included allowance. Your plan provides up to 2 included reviews per hour; 1 remain after this review.

Recent review details

Context from checks skipped due to timeout: 3

  • GitHub Check: build
  • GitHub Check: Analyze (actions)
  • GitHub Check: Analyze (java-kotlin)
Additional context used

Code guidelines: 1

AGENTS.md — auto-discovered
Path-based instructions: 1

Source excerpt: All Java project tests and test-only helpers belong under `VotingPlugin/src/test/java/com/bencodez/votingplugin/tests/`, with package `com.bencodez.votingplugin.tests` or a meaningful subpackage.

CodeRabbit inference engine (AGENTS.md)

Files:

  • VotingPlugin/src/test/java/com/bencodez/votingplugin/tests/packaging/PackagedArtifactTest.java
Learnings: 3

Common learnings

Learnt from: CR
Repo: BenCodez/VotingPlugin PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-11-16T03:12:12.291Z
Learning: Source excerpt:
# Maintainer and AI-agent guide

## Build and verification

All Java project tests and test-only helpers belong under `VotingPlugin/src/test/java/com/bencodez/votingplugin/tests/`, with package `com.bencodez.votingplugin.tests` or a meaningful subpackage. Keep paths and package declarations aligned, and update cross-test imports, resources, and build selectors when moving tests. Preserve package-phase artifact checks and test discovery. Do not widen production APIs to make tests accessible; use narrowly scoped test-only reflection for non-public seams. Platform API fixtures that must retain an external runtime class identity (such as `net.minecraft.network.chat.Component`) stay in that platform package and must not contain test cases.
Learnt from: CR
Repo: BenCodez/VotingPlugin PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-11-16T03:12:12.291Z
Learning: Applies to VotingPlugin/src/test/java/com/bencodez/votingplugin/tests/** : Source excerpt:
# Maintainer and AI-agent guide

## Build and verification

All Java project tests and test-only helpers belong under `VotingPlugin/src/test/java/com/bencodez/votingplugin/tests/`, with package `com.bencodez.votingplugin.tests` or a meaningful subpackage. Keep paths and package declarations aligned, and update cross-test imports, resources, and build selectors when moving tests. Preserve package-phase artifact checks and test discovery. Do not widen production APIs to make tests accessible; use narrowly scoped test-only reflection for non-public seams. Platform API fixtures that must retain an external runtime class identity (such as `net.minecraft.network.chat.Component`) stay in that platform package and must not contain test cases.
Learning: 2026-11-16T03:11:41.053Z

Learnt from: CR
Repo: BenCodez/VotingPlugin PR: 0
File: .github/skills/code-review/SKILL.md:0-0
Timestamp: 2026-11-16T03:11:41.053Z
Learning: Source excerpt:
# VotingPlugin code review

## 3. Trace changed behavior and its contracts

### Security, packaging, and test evidence

- For build/dependency changes, inspect Java release, annotation processors,
  dependency scopes, shading/relocation/minimization, reflection/service loading,
  packaged resources, and optional-dependency/classpath compatibility.

Applied to files:

  • VotingPlugin/pom.xml
Learning: 2026-11-22T03:43:51.416Z

Learnt from: CR
Repo: BenCodez/VotingPlugin PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-11-22T03:43:51.416Z
Learning: Source excerpt:
# Maintainer and AI-agent guide

## Drop-in upgrade and compatibility contract

Treat compatibility as a release invariant for every new feature, refactor, fix, storage change, protocol change, and dependency change. Unless the task explicitly says otherwise, a VotingPlugin upgrade must be a **drop-in JAR replacement**: an administrator replaces the existing VotingPlugin JAR, starts/reloads as normally supported, and does not need any other deployment change.

Applied to files:

  • VotingPlugin/pom.xml

This branch has not been deployed

No deployments
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