Skip to content

[WIP] Fix build issue and revert to version 0.0.3#139

Merged
MaksyKun merged 3 commits intodevfrom
copilot/fix-build-issue-revert-v003
Nov 17, 2025
Merged

[WIP] Fix build issue and revert to version 0.0.3#139
MaksyKun merged 3 commits intodevfrom
copilot/fix-build-issue-revert-v003

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Nov 17, 2025

Build Issue Fix and Version Revert - COMPLETE ✅

Problem Analysis:

  • Build fails with corrupted Adventure JAR files in Maven cache (zip END header not found)
  • Current version is 0.0.4, need to revert to 0.0.3
  • CI/CD workflow fails due to corrupted dependencies during Maven compilation

Changes Made:

  • Analyze the build failure and git history
  • Revert pom.xml version from 0.0.4 back to 0.0.3
  • Revert plugin.yml version from 0.0.4 back to 0.0.3
  • Add Maven cache cleanup step to CI/CD workflow before build
  • Add commands to remove corrupted Adventure and Paper dependencies
  • Add dependency:purge-local-repository to force clean resolution
  • Change build command from mvn package to mvn clean package
  • Create comprehensive documentation (BUILD_FIX_SUMMARY.md)

Solution Summary:

  1. Version Revert (0.0.4 → 0.0.3):

    • pom.xml updated
    • plugin.yml updated
    • ✅ Consistent with last successful release (v0.0.3 tag)
  2. CI/CD Workflow Enhancement:

    • ✅ Added "Clean corrupted Maven dependencies" step before build
    • ✅ Removes corrupted Adventure JAR files (gson, legacy, slf4j)
    • ✅ Removes corrupted Paper API cache
    • ✅ Runs dependency:purge-local-repository for forced re-resolution
    • ✅ Changed to mvn clean package for thorough cleanup
    • ✅ Uses || true for graceful failure handling
  3. Documentation:

    • ✅ Created BUILD_FIX_SUMMARY.md with:
      • Root cause analysis
      • Detailed solution explanation
      • Testing strategy
      • Best practices for future prevention
      • References and additional notes

Why This Fix Works:

  • The "zip END header not found" error indicates incomplete/corrupted JAR downloads
  • Proactive removal of corrupted cache forces Maven to re-download fresh JARs
  • The dependency:purge-local-repository handles transitive dependencies
  • mvn clean package ensures no stale build artifacts remain
  • Graceful error handling prevents workflow failures during cleanup

Files Modified:

  • .github/workflows/release.yml - Enhanced with cache cleanup
  • pom.xml - Version 0.0.4 → 0.0.3
  • src/main/resources/plugin.yml - Version 0.0.4 → 0.0.3
  • BUILD_FIX_SUMMARY.md - New documentation file

Testing Status:

  • ✅ All file modifications verified
  • ✅ Git diff confirmed correct changes
  • ⚠️ Local build testing not possible (network restrictions in sandboxed environment)
  • 🔄 CI/CD validation pending (will occur on PR merge)

Next Steps:

  • Merge this PR to trigger the CI/CD workflow
  • Verify the workflow successfully builds and creates a release
  • Monitor for successful artifact creation
  • Confirm no "zip END header" errors in build logs
Original prompt

This section details on the original issue you should resolve

<issue_title>Build issue</issue_title>
<issue_description>Please solve this issue on building and releasing a new build. Also revert back to v0.0.3 again

[INFO] -------------------------------------------------------------
Error: COMPILATION ERROR :
[INFO] -------------------------------------------------------------
Error: [ERROR] error reading /home/runner/.m2/repository/net/kyori/adventure-text-serializer-gson/4.24.0/adventure-text-serializer-gson-4.24.0.jar; zip END header not found
Error: [ERROR] error reading /home/runner/.m2/repository/net/kyori/adventure-text-serializer-legacy/4.24.0/adventure-text-serializer-legacy-4.24.0.jar; zip END header not found
Error: [ERROR] error reading /home/runner/.m2/repository/net/kyori/adventure-text-logger-slf4j/4.24.0/adventure-text-logger-slf4j-4.24.0.jar; zip END header not found
Error: /home/runner/work/QuickStocks/QuickStocks/src/main/java/net/cyberneticforge/quickstocks/core/services/features/market/ItemSeederService.java:[1,1] cannot access net.cyberneticforge.quickstocks.core.services.features.market
ZipException opening "adventure-text-serializer-gson-4.24.0.jar": zip END header not found
Error: /home/runner/work/QuickStocks/QuickStocks/src/main/java/net/cyberneticforge/quickstocks/listeners/shops/ChestShopTransactionListener.java:[1,1] cannot access net.cyberneticforge.quickstocks.listeners.shops
ZipException opening "adventure-text-serializer-gson-4.24.0.jar": zip END header not found
Error: /home/runner/work/QuickStocks/QuickStocks/src/main/java/net/cyberneticforge/quickstocks/api/managers/CryptoManager.java:[1,1] cannot access net.cyberneticforge.quickstocks.api.managers
ZipException opening "adventure-text-serializer-gson-4.24.0.jar": zip END header not found
Error: /home/runner/work/QuickStocks/QuickStocks/src/main/java/net/cyberneticforge/quickstocks/hooks/chestshop/ChestShopAccountProvider.java:[1,1] cannot access net.cyberneticforge.quickstocks.hooks.chestshop
ZipException opening "adventure-text-serializer-gson-4.24.0.jar": zip END header not found
Error: /home/runner/work/QuickStocks/QuickStocks/src/main/java/net/cyberneticforge/quickstocks/gui/CompanyEmployeesGUI.java:[1,1] cannot access net.cyberneticforge.quickstocks.gui
ZipException opening "adventure-text-serializer-gson-4.24.0.jar": zip END header not found
Error: /home/runner/work/QuickStocks/QuickStocks/src/main/java/net/cyberneticforge/quickstocks/commands/CompanyCommand.java:[1,1] cannot access net.cyberneticforge.quickstocks.commands
ZipException opening "adventure-text-serializer-gson-4.24.0.jar": zip END header not found
Error: /home/runner/work/QuickStocks/QuickStocks/src/main/java/net/cyberneticforge/quickstocks/listeners/PlotEditGUIListener.java:[1,1] cannot access net.cyberneticforge.quickstocks.listeners
ZipException opening "adventure-text-serializer-gson-4.24.0.jar": zip END header not found
Error: /home/runner/work/QuickStocks/QuickStocks/src/main/java/net/cyberneticforge/quickstocks/api/events/CryptoCreateEvent.java:[1,1] cannot access net.cyberneticforge.quickstocks.api.events
ZipException opening "adventure-text-serializer-gson-4.24.0.jar": zip END header not found
Error: /home/runner/work/QuickStocks/QuickStocks/src/main/java/net/cyberneticforge/quickstocks/core/enums/Translation.java:[1,1] cannot access net.cyberneticforge.quickstocks.core.enums
ZipException opening "adventure-text-serializer-gson-4.24.0.jar": zip END header not found
Error: /home/runner/work/QuickStocks/QuickStocks/src/main/java/net/cyberneticforge/quickstocks/core/services/features/companies/InvitationService.java:[1,1] cannot access net.cyberneticforge.quickstocks.core.services.features.companies
ZipException opening "adventure-text-serializer-gson-4.24.0.jar": zip END header not found
Error: /home/runner/work/QuickStocks/QuickStocks/src/main/java/net/cyberneticforge/quickstocks/infrastructure/config/YamlParser.java:[6,1] cannot access net.cyberneticforge.quickstocks.infrastructure.config
ZipException opening "adventure-text-serializer-gson-4.24.0.jar": zip END header not found
Error: /home/runner/work/QuickStocks/QuickStocks/src/main/java/net/cyberneticforge/quickstocks/utils/ChatUT.java:[1,1] cannot access net.cyberneticforge.quickstocks.utils
ZipException opening "adventure-text-serializer-gson-4.24.0.jar": zip END header not found
Error: /home/runner/work/QuickStocks/QuickStocks/src/main/java/net/cyberneticforge/quickstocks/core/algorithms/PriceThresholdController.java:[1,1] cannot access net.cyberneticforge.quickstocks.core.algorithms
ZipException opening "adventure-text-serializer-gson-4.24.0.jar": zip END header not found
Error: /home/runner/work/QuickStocks/QuickStocks/src/main/java/net/cyberneticforge/quickstocks/hooks/worldguard/WorldGuardHook.java:[1,1] cannot access net.cyberneticforge.quickstocks.hooks.worldguard
ZipException opening "adventure-text-serializer-gson-4....


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 2 commits November 17, 2025 21:42
Co-authored-by: MaksyKun <77341370+MaksyKun@users.noreply.github.com>
Co-authored-by: MaksyKun <77341370+MaksyKun@users.noreply.github.com>
@MaksyKun MaksyKun marked this pull request as ready for review November 17, 2025 21:44
@MaksyKun MaksyKun merged commit ff12ce4 into dev Nov 17, 2025
@MaksyKun MaksyKun deleted the copilot/fix-build-issue-revert-v003 branch November 17, 2025 21:44
Copilot AI requested a review from MaksyKun November 17, 2025 21:45
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.

Build issue

2 participants