跳到主要内容 跳到补充内容

安装及配置 Nexus 内嵌包

Talend Artifact Repository 基于 Nexus。此步骤描述如何安装并配置 Talend 产品中内嵌的 Nexus 包。

步骤

  1. Artifact-Repository-Nexus-VA.B.C.D-E 存档文件解压缩到专用文件夹中。
  2. <ApplicationFolder>/bin 文件夹中,通过运行以下命令启动 Talend Artifact Repository 实例:
    nexus.exe /run
    Nexus 在控制台中运行。
  3. 要将 Talend Artifact Repository 作为一项服务运行:
    1. 通过运行以下命令将 Nexus 安装为一项服务:
      nexus.exe /install <name-of-service>
      如果您没有提供名称,该服务将命名为 nexus
    2. 通过运行以下命令启动 Nexus:
      nexus.exe /start
  4. 登录 Talend Artifact Repository Web 应用程序 (默认登录信息:admin/Talend123)。确保您有访问发布和快照存储库的相关权限。

在第一次连接之后,强烈建议更改默认管理员帐户的默认用户名和密码。

  1. 更改 admin 用户的默认用户名和密码:
    1. Talend Artifact Repository Web 应用程序的左侧面板中,选择 Security (安全性) > Users (用户)
    2. 右键单击 admin 用户并选择 Set Password (设置密码)
    3. 输入 admin 用户的新密码。
  2. 将存储库 talend-custom-libs-releasetalend-custom-libs-snapshot 的浏览权限授予用户 talend-updates-admin
    1. Talend Artifact Repository Web 应用程序的左侧面板中,选择 Security (安全性) > Roles (角色)
    2. 在右面板顶部点击Create role (创建角色) > Nexus role (Nexus 角色)打开 Create Role (创建角色)视图。
    3. 创建角色 nx-view-custom-libs-browse 并向其分配权限 nx-repository-view-maven2-talend-custom-libs-release-browsenx-repository-view-maven2-talend-custom-libs-snapshot-browse
    4. Talend Artifact Repository Web 应用程序的左侧面板中,选择 Security (安全性) > Users (用户)
    5. 单击用户 talend-updates-admin 打开其详细信息视图。
    6. 将新建角色 nx-view-custom-libs-browse 分配给用户,以便捷该用户。
    7. 在 Curl 或 Postman 中执行以下命令,以验证分配给用户 talend-updates-admin 的权限,其中 <password> 代表用户密码,<nexus_url> 代表 Talend Artifact Repository Web 应用程序的 URL。
      # Search talend-custom-libs-release
      curl -k -u "talend-updates-admin:<password>" "<nexus_url>/service/rest/v1/search?repository=talend-custom-libs-release&group=xml-apis"
      
      # Search talend-custom-libs-snapshot
      curl -k -u "talend-updates-admin:<password>" "<nexus_url>/service/rest/v1/search?repository=talend-custom-libs-snapshot&group=org.talend.libraries"

      结果中应返回相应的项。

本页面有帮助吗?

如果您发现此页面或其内容有任何问题 – 打字错误、遗漏步骤或技术错误 – 请告诉我们如何改进!