# neatlogic-modules-dev **Repository Path**: neat-logic/neatlogic-modules-dev ## Basic Information - **Project Name**: neatlogic-modules-dev - **Description**: 管理子模块开发版本 - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: develop4.0.0 - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-01-26 - **Last Updated**: 2026-02-06 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # neatlogic-modules-dev 本项目是 NeatLogic 多模块体系中的 **开发环境依赖聚合模块(Development BOM / Dependency Management POM)**,用于在开发阶段统一管理各业务模块及扩展模块的版本号与依赖关系。 该工程本身不产出可运行制品(`packaging=pom`),主要作用是: - 集中定义所有 NeatLogic 内部模块的版本属性 - 通过 `dependencyManagement` 向子模块提供统一、可控的依赖版本 - 配合 `build-root` 中的 `develop` Profile 实现开发环境模块装配 --- ## 项目定位 在整体构建体系中的角色: ```text build-root └── (Profile: develop) ↓ neatlogic-modules-dev ← 当前模块(版本 / 依赖管理中心) ↓ neatlogic-parent ↓ 各业务模块 / 扩展模块 / Base 模块 ``` ### 核心职责 - **版本中枢** - 所有 NeatLogic 内部模块版本通过 `` 集中维护 - 避免各模块自行声明 `` 造成漂移和冲突 - **依赖对齐** - 在 `` 中声明完整模块依赖清单 - 子模块只需声明 `groupId + artifactId`,不写版本 - **开发环境专用** - 默认使用 `*-SNAPSHOT` 版本 - 与 CI / 本地开发强绑定 --- ## 版本管理策略 ### 统一版本属性 所有模块版本在 `` 中集中定义,例如: ```xml 0.4.0.0-SNAPSHOT 0.4.0.0-SNAPSHOT 0.4.0.0-SNAPSHOT ``` ### 修改版本的推荐方式 发布新开发版本时: 1. 全局搜索并替换目标版本号(如 `0.4.0.0-SNAPSHOT` → `0.4.1.0-SNAPSHOT`) 2. 执行全量构建验证 3. 推送到 Nexus Snapshot 仓库 --- ## 依赖管理机制 ### dependencyManagement 作用 该模块在 `` 中声明: - 所有 Base 模块 - 所有标准业务模块 - 所有扩展模块 - 框架模块(framework / resources / database 等) 示例: ```xml com.neatlogic neatlogic-cmdb ${neatlogic.cmdb} ``` ### 子模块使用规范 在业务模块中: ```xml com.neatlogic neatlogic-cmdb ``` > 禁止在子模块中显式声明 `` --- ## 构建与使用方式 ### 在 build-root 中启用 ```bash mvn clean install -Pdevelop ``` 该命令会: - 加载 `neatlogic-modules-dev` - 将其作为依赖管理源注入所有子模块构建过程 --- ## 模块覆盖范围 ### 基础模块(Base) - neatlogic-change-base - neatlogic-autoexec-base - neatlogic-itsm-base - neatlogic-deploy-base - neatlogic-cmdb-base - neatlogic-dashboard-base - neatlogic-event-base - neatlogic-inspect-base - neatlogic-knowledge-base - neatlogic-report-base - neatlogic-tagent-base - neatlogic-alert-base - neatlogic-informant-base - neatlogic-ai-base - neatlogic-codehub-base - neatlogic-dr-base ### 标准业务模块 - neatlogic-framework - neatlogic-tenant - neatlogic-dashboard - neatlogic-itsm - neatlogic-rdm - neatlogic-change - neatlogic-report - neatlogic-event - neatlogic-knowledge - neatlogic-autoexec - neatlogic-cmdb - neatlogic-tagent - neatlogic-inspect - neatlogic-deploy - neatlogic-alert - neatlogic-document-online - neatlogic-resources ### 扩展模块 - neatlogic-master - neatlogic-pbc - neatlogic-codehub - neatlogic-rdm-commercial - neatlogic-cmdb-commercial - neatlogic-itsm-commercial - neatlogic-tenant-commercial - neatlogic-autoexec-commercial - neatlogic-deploy-commercial - neatlogic-alert-commercial - neatlogic-database - neatlogic-dr - neatlogic-diagram - neatlogic-document-online-commercial - neatlogic-informant - neatlogic-ai --- ## 常见问题 ### 1. 为什么这里依然配置了扩展模块? 开发环境通常需要: - 联调扩展功能 - 提前验证扩展模块与基础模块的兼容性 因此在 dev BOM 中统一纳入扩展模块版本管理。 --- ### 2. 可以不走这个模块,直接在 parent 里管版本吗? 技术上可以,但会带来: - 开发 / 发布版本难以隔离 - Snapshot 和 Release 仓库规则混乱 - 多环境构建不透明 当前模式的优势是: > **BOM 即环境,Profile 即构建策略** --- ## 维护规范 - 新模块接入: 1. 在 `` 中增加版本属性 2. 在 `` 中声明依赖 3. 验证 `cd neatlogic-build-root && mvn clean install -Pdevelop` 全量构建通过 - 禁止: - 子模块自行管理 NeatLogic 内部模块版本 - 在业务模块中声明 `` ---