Files
starRiverProperty/backend/cw-elevator-application/scripts/verify_intelligent_cwoscomponent_nexus.sh
hpd840321 7b2bd307f1 Initial commit: reorganized source tree
- backend/: 13 Maven modules (cw-elevator-application, cloudwalk-cloud, intelligent-cwoscomponent, ninca-crk, etc.)
- frontend/: 4 Vue projects (elevator-front, cwos-portal, alarm-front, front_acs) + decompiled + scripts
- scripts/: build, test-env, tools (Docker Compose, service templates, API parity)
- docs/: AGENTS.md, superpowers specs, architecture docs
- .gitignore: standard Java/Maven exclusions

Moved from legacy maven-*/ root layout to backend/ organized structure.
2026-05-09 09:56:45 +08:00

58 lines
2.6 KiB
Bash
Executable File
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/usr/bin/env bash
# 校验私服上 intelligent-cwoscomponent 2.9.2 线是否「可解析」:父 POM、interface、rest 均存在,
# 且 rest 的 POM 必须声明对 intelligent-cwoscomponent-interface 的依赖(否则仅依赖 rest 时编译缺 client 包)。
#
# 环境变量:
# NEXUS_PUBLIC_BASE 默认 http://192.168.3.12:8081/repository/maven-public/
# ELEVATOR_ICOMP_VER 默认 2.9.2-xinghewan
# CURL_OPTS 追加传给 curl(如内网 Basic-u user:pass
#
# 退出码:0 校验通过;1 缺文件或 rest POM 不完整
set -euo pipefail
NEXUS_PUBLIC_BASE="${NEXUS_PUBLIC_BASE:-http://192.168.3.12:8081/repository/maven-public/}"
ICOMP_VER="${ELEVATOR_ICOMP_VER:-2.9.2-xinghewan}"
BASE="${NEXUS_PUBLIC_BASE%/}/"
die() { echo "ERROR: $*" >&2; exit 1; }
need_curl() { command -v curl >/dev/null 2>&1 || die "需要 curl"; }
fetch() {
local url="$1"
local out
if ! out="$(curl -sfL ${CURL_OPTS:-} "$url" 2>&1)"; then
echo "ERROR: 无法拉取: $url" >&2
echo "$out" >&2
exit 1
fi
printf '%s' "$out"
}
need_curl
G="cn/cloudwalk/intelligent"
PARENT_URL="${BASE}${G}/intelligent-cwoscomponent/${ICOMP_VER}/intelligent-cwoscomponent-${ICOMP_VER}.pom"
IFACE_POM_URL="${BASE}${G}/intelligent-cwoscomponent-interface/${ICOMP_VER}/intelligent-cwoscomponent-interface-${ICOMP_VER}.pom"
IFACE_JAR_URL="${BASE}${G}/intelligent-cwoscomponent-interface/${ICOMP_VER}/intelligent-cwoscomponent-interface-${ICOMP_VER}.jar"
REST_POM_URL="${BASE}${G}/intelligent-cwoscomponent-rest/${ICOMP_VER}/intelligent-cwoscomponent-rest-${ICOMP_VER}.pom"
REST_JAR_URL="${BASE}${G}/intelligent-cwoscomponent-rest/${ICOMP_VER}/intelligent-cwoscomponent-rest-${ICOMP_VER}.jar"
echo "==> NEXUS_PUBLIC_BASE=$NEXUS_PUBLIC_BASE"
echo "==> 检查父 POM: $PARENT_URL"
fetch "$PARENT_URL" >/dev/null
echo "==> 检查 interface POM + JAR"
fetch "$IFACE_POM_URL" >/dev/null
curl -sfL ${CURL_OPTS:-} -o /dev/null -I "$IFACE_JAR_URL" || die "interface JAR 不可访问: $IFACE_JAR_URL"
echo "==> 检查 rest POM + JAR"
rest_pom="$(fetch "$REST_POM_URL")"
curl -sfL ${CURL_OPTS:-} -o /dev/null -I "$REST_JAR_URL" || die "rest JAR 不可访问: $REST_JAR_URL"
if ! printf '%s' "$rest_pom" | grep -qE '<artifactId>intelligent-cwoscomponent-interface</artifactId>'; then
die "rest 的 POM 未声明 intelligent-cwoscomponent-interface(常见原因:deploy-file 未带 -DpomFileNexus 生成了空模型 POM)。请在 Nexus 删除该版本 rest 构件后,用 deploy_intelligent_cwoscomponent_to_nexus.sh 按 cw_lib 内 .pom 重新上传。"
fi
echo "OK: 私服 intelligent-cwoscomponent${ICOMP_VER})父 POM + interface + rest 齐全,且 rest POM 声明 interface。"