Apache Directory Studio 技术文档
directory-studio Apache Directory Studio 项目地址: https://gitcode.com/gh_mirrors/di/directory-studio
安装指南
系统要求
- JDK 11 或更新版本
- Maven 3 或更新版本
- 足够的 Maven 堆空间:
export MAVEN_OPTS="-Xmx512m"
安装步骤
- 下载项目:从 GitHub 仓库下载 Apache Directory Studio 项目源码。
- 构建项目:使用 Maven 构建项目。可以通过以下两种方式之一进行构建:
- 手动构建:
- 首先构建 'Eclipse Target Platform' 并生成 MANIFEST.MF 文件:
mvn -f pom-first.xml clean install
- 使用 Tycho 构建主 Eclipse 工件:
mvn clean install
- 首先构建 'Eclipse Target Platform' 并生成 MANIFEST.MF 文件:
- 使用脚本构建:
- 在 Linux / macOS 上:
./build.sh
- 在 Windows 上:
build.bat
- 在 Linux / macOS 上:
- 手动构建:
测试
- 单元测试包含在每个插件的
src/test/java
中,自动执行并在 'test' 阶段运行。 - 核心集成测试在
tests/test.integration.core
中,自动执行并在 'integration-test' 阶段运行。 - UI 集成测试基于 SWTBot 在
tests/test.integration.ui
中,默认禁用。可以通过-Denable-ui-tests
启用。
构建问题
- Tycho 不处理快照依赖关系。首次使用快照依赖时,它会被缓存。后续更改不会被考虑,除非从缓存中删除。
项目的使用说明
设置 Eclipse 工作区
- 导入 'Eclipse Target Platform' 项目:
- 文件 -> 导入... -> Maven -> 现有 Maven 项目
- 选择 'studio/eclipse-trgt-platform' 作为根目录
- 仅选择此单个项目
- 完成
- 初始化目标平台:
- 使用 'Target Editor' 打开
eclipse-trgt-platform.target
文件 - 等待目标平台初始化,这需要几分钟!
- 使用 'Target Editor' 打开
- 导入主插件:
- 文件 -> 导入... -> Maven -> 现有 Maven 项目
- 选择 'studio' 作为根目录
- 选择所有插件
- 完成
运行
- 从命令行运行:构建生成所有平台的二进制文件。存档版本可以在
product/target/products/
中找到,解压版本可以在product/target/products/org.apache.directory.studio.product
下找到。 - 在 Eclipse 中运行:
- 使用 Product Configuration Editor 打开产品配置 'org.apache.directory.studio.product'
- 点击链接 'Launch an Eclipse application'
项目 API 使用文档
核心 API
- LDAP API:Apache Directory LDAP API 是一个增强的 LDAP API,旨在替代 JNDI 和现有的 LDAP API(如 jLdap 和 Mozilla LDAP API)。它是一个“模式感知”的 API,提供了方便的方式来访问所有类型的 LDAP 服务器,不仅限于 ApacheDS。
插件 API
- Eclipse 插件:项目由多个 Eclipse (OSGi) 插件组成,可以轻松升级并添加新插件。这些插件甚至可以在 Eclipse 本身中运行。
项目安装方式
命令行安装
- 构建项目:使用 Maven 构建项目,生成二进制文件。
- 运行项目:从命令行运行生成的二进制文件。
Eclipse 工作区安装
- 导入项目:将项目导入 Eclipse 工作区。
- 初始化目标平台:初始化 Eclipse 目标平台。
- 运行项目:在 Eclipse 中运行项目。
通过以上步骤,您可以成功安装并使用 Apache Directory Studio 项目。
directory-studio Apache Directory Studio 项目地址: https://gitcode.com/gh_mirrors/di/directory-studio