restart-backend

Rebuilds and restarts the backend Java process for the current MOM repository checkout.

Updated Jun 16, 2026
One-click install
npx skills add https://github.com/SSS08099/mom-system --skill restart-backend-sss08099
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: restart-backend
Source: https://github.com/SSS08099/mom-system/tree/main/.agents/skills/restart-backend
Command: npx skills add https://github.com/SSS08099/mom-system --skill restart-backend-sss08099

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve? Restarting a local backend after Java, resource, or Maven changes is error-prone: developers often kill the wrong Java process, target a backend from another checkout, or hardcode ports and paths. This Skill provides a safe, validated restart workflow that only touches the backend owned by the current repository checkout. ## Core Features & Use Cases - Safe Process Targeting: Stops only a PID whose metadata and live command line match the normalized JAR path of the current checkout, never killing arbitrary java.exe processes. - Validated Restart Pipeline: Loads ROOT.env.local, validates the instance, packages mes-system with Maven, starts the JAR, and waits for the configured backend port. - Use Case: After editing Java source files in your MOM checkout, run the restart script to rebuild mes-system and bring the backend back up without risking other running Java services on your machine. ## Quick Start Ask the AI to restart the backend for the current MOM checkout using the repository-local restart script after your latest Java changes.

Frequently Asked Questions about restart-backend

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I safely restart a local Java backend after code changes?

Run the repository-local restart-backend.ps1 script via PowerShell with the repository root from git rev-parse --show-toplevel. It rebuilds mes-system with Maven, stops only the matching backend PID, starts the JAR, and waits for the configured port.

How to restart a backend without killing other Java processes?

The script validates PID metadata and the live command line against the normalized JAR path of the current checkout before stopping anything. It never uses taskkill against arbitrary PIDs or all java.exe processes.

Can I skip the Maven build when restarting the backend?

Yes, pass -SkipBuild to the restart script only when the existing JAR is intentionally being reused. Otherwise the script packages mes-system to include your latest Java, resource, or Maven changes.

Why does the backend restart script refuse to stop a process?

The script stops and reports an error when PID metadata is absent, stale, reused, or points at another checkout. It also refuses to act if the configured port is occupied by an unmanaged process, preventing accidental termination of unrelated services.

Does the restart script work across multiple repository checkouts?

Yes, because it never hardcodes the repository path, JAR path, or port. It derives ROOT from git rev-parse --show-toplevel and loads ROOT\.env.local, so each checkout manages only its own backend instance.