AgentSkillsCN

legacy-spring-war-maintainer

维护并稳定那些基于Maven构建、采用较旧Servlet栈(如eGovFrame时代系统)的遗留Spring WAR项目。在需要避免全框架升级,却仍需解决依赖冲突、JDK兼容性问题、打包错误,或进行安全迁移式重构时使用。

SKILL.md
--- frontmatter
name: legacy-spring-war-maintainer
description: Maintain and stabilize legacy Spring WAR projects built with Maven and older servlet stacks such as eGovFrame era systems. Use when dependency conflicts, JDK compatibility, packaging errors, or migration-safe refactors are required without full framework upgrades.

Legacy Spring War Maintainer

Workflow

  1. Capture baseline constraints. Record current JDK, servlet container, Maven version, and deployment target.
  2. Reproduce build and package failures. Run mvn clean package with full errors and identify first failing plugin or dependency.
  3. Resolve dependency drift safely. Pin transitive versions and remove conflicting logging or XML parser combinations.
  4. Protect runtime compatibility. Confirm war packaging, web.xml or dispatcher config, and datasource settings remain compatible.
  5. Plan incremental modernization. Separate urgent fixes from upgrade backlog to avoid risky all-at-once migrations.

Output Contract

Always provide:

  • Compatibility matrix (JDK, Maven, container).
  • Minimal safe fix set.
  • Packaging and startup verification results.
  • Deferred modernization tasks.