Skip to content

Repository files navigation

🚀 Mendix Universal Userlib Cleanup Suite

License: MIT Mendix Support PRs Welcome Maintenance

A version-aware automation suite designed to solve "JAR Hell" in Mendix development. It intelligently identifies redundant libraries, manages specialized backups, and ensures project stability across all LTS versions.


💡 Why this Project?

Managing Java dependencies (JARs) in Mendix can be challenging, especially as projects evolve through multiple Studio Pro versions. This suite provides a universal, automated solution that adapts to the unique architecture of each Mendix version.

The project is built upon the mendix-userlib-cleaner engine by CINAQ Technology, extending it with:

  • Automated Version Detection: Zero-config detection of Mendix 7 through 11.
  • Universal Support: Logic-driven engines tailored for v7, v8, v9, v10, and v11.
  • Vendorlib Aware: Intelligently handles Mendix 10/11's managed dependency system.
  • DevOps Ready: Integrated --check mode for automated CI/CD pipeline quality gates.
  • Zero Dependency: Standalone binary (.exe) — no environment setup needed.
  • Enhanced Safety: Automatic timestamped ZIP archiving with instant restoration.
Created by: Erik van Gorsel

🗺️ Quick Links

📥 Download 📖 Use Guide 🐛 Report Bug 🤝 Contribute ⚖️ License

📖 1. How to Use

Important

In case your browser blocks the .exe file, download the 'Source code (zip)' file instead. Unzip the file after downloading and copy the 'mx--cleanuserlib.exe' file from the unzipped folder to the root directory of your Mendix project.

📥 1.1. Quick Start

  • Setup:

    • Download the latest release
    • Place mx--cleanuserlib.exe in your Mendix Project Root (the folder containing the .mpr file).
  • Run:

    • Open your project folder in File Explorer.
    • Type cmd in the address bar and press Enter.
    • Execute the command below in your terminal
mx--cleanuserlib

🔄 1.2. Restoration

If you need to revert changes, run these in your project root:

  • Revert Latest:
   mx--cleanuserlib --revert
  • Revert Specific:
   mx--cleanuserlib [backup_name.zip] --revert

🛠️ 1.3. CI/CD Integration

Fail your build pipeline if JAR issues are detected:

mx--cleanuserlib --check

Returns Exit Code 1 if redundant files are identified.


⚙️ 2. How the project Works

The suite follows a standard audit methodology:

  1. Resolution: Locates the project context via .mpr lookup.
  2. Identification: Extracts the Studio Pro version from project metadata.
  3. Routing: Matches the project to its specialized cleanup engine.
  4. Audit (Mx10+): Syncs userlib against the platform's vendorlib registry.
  5. Deep Scan: Uses signature matching to find duplicates with mismatched names.
  6. Filtering: Applies safety rules to protect required framework JARs.
  7. Archiving: Safely isolates cleaned userlib files into timestamped ZIP archives with rollback option.

🛡️ 3. Security & Trust

As a portable utility, Windows SmartScreen may flag the .exe as "uncommon."

To proceed:

  • Edge: ... > Keep > Show more > Keep anyway.
  • Windows: More info > Run anyway.

Note

This project is 100% open-source. For maximum transparency, you can review the source code in internal/src or build the binary yourself using internal/scripts/local_build.bat.


📂 4. Architecture

Component Responsibility
internal/src/core/manager.py Orchestrator: handles detection, routing, and safety logic.
internal/src/engines/clean_userlib_mx11.py Mx11 Engine: optimized for Java 21 and vendorlib registries.
internal/src/engines/clean_userlib_mx10.py Mx10 Engine: handles managed vs unmanaged dependency audits.
internal/src/engines/clean_userlib_mx9.py Mx9 Engine: advanced name normalization and deep-scan logic.
internal/src/engines/clean_userlib_mx8.py Mx8 Engine: handles .requiredlib metadata and Java 11 transition.
internal/src/engines/clean_userlib_mx7.py Mx7 Engine: baseline logic for legacy module packaging.

🤝 5. Contributing & Support

This is a community-driven project. We welcome contributions of all kinds!


Built with ❤️ for the Mendix Community

About

A version-aware automation suite to clean redundant Java dependencies in Mendix (Mx7-Mx11) projects.

Resources

Code of conduct

Contributing

Security policy

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages