Add SSM deployment and reliable Maven setup

This commit is contained in:
王鹏
2026-10-08 17:58:09 +08:00
parent 2d7b6216ba
commit d1695eba74
13 changed files with 626 additions and 46 deletions

View File

@@ -35,6 +35,10 @@ def main() -> int:
pid_path.parent.mkdir(parents=True, exist_ok=True)
encoding = locale.getpreferredencoding(False) or "utf-8"
environment = os.environ.copy()
executable = Path(command[0])
if executable.name.lower() in {"catalina.bat", "catalina.sh"} and executable.exists():
environment["CATALINA_HOME"] = str(executable.parent.parent)
with log_path.open("a", encoding="utf-8") as log_file:
process = subprocess.Popen(
command,
@@ -46,6 +50,7 @@ def main() -> int:
errors="replace",
bufsize=1,
shell=False,
env=environment,
)
pid_path.write_text(str(process.pid), encoding="ascii")
assert process.stdout is not None