【问题标题】:WSO2-APIM - Build from source (v1.9.1)WSO2-APIM - 从源代码构建 (v1.9.1)
【发布时间】:2015-11-03 15:20:31
【问题描述】:

我喜欢自定义 WSO2-APIManager (v 1.9.1) APIM 的登录和管理控制台页面。我还想使用 fat-jar 将 APIM 制作/构建到微服务中,因为我需要从源代码构建。

这是我的问题:

  1. 因为我喜欢从源代码构建 APIM。文档(http://docs.wso2.com/display/AM191/Building+from+Source)说您必须下载“WSO2 Carbon Kernel”,但是如何使用 git 下载正确的内核版本(http://wso2.com/products/carbon/release-matrix/)?内核版本 4.2.0 没有分支也没有标签。
  2. 下载内核的目的是什么?我需要内核来修改登录和管理页面吗?
  3. 在构建 APIM 之前,我是否需要在本地 maven 存储库中编译、构建和安装 carbon 内核?
  4. 克隆 repo (https://github.com/wso2/product-apim) 并尝试构建(不先构建内核)会导致错误:

    [INFO] Finished at: 2015-11-03T18:25:24+01:00
    [INFO] Final Memory: 58M/980M
    [INFO] ------------------------------------------------------------------------
    [ERROR] Failed to execute goal org.wso2.maven:carbon-p2-plugin:1.5.4:p2-repo-gen (2-p2-repo-generation) on project am-p2-profile: Error occured when processing the Feature Artifact: org.wso2.carbon.apimgt:org.wso2.carbon.forum.server.feature:2.0.1-SNAPSHOT: 
    ERROR: Could not find artifact org.wso2.carbon.apimgt:org.wso2.carbon.forum.server.feature:zip:2.0.1-SNAPSHOT in wso2-nexus (http://maven.wso2.org/nexus/content/groups/wso2-public/)
    [ERROR] 
    [ERROR] Try downloading the file manually from the project website.
    [ERROR] 
    [ERROR] Then, install it using the command:
    [ERROR] mvn install:install-file -DgroupId=org.wso2.carbon.apimgt -DartifactId=org.wso2.carbon.forum.server.feature -Dversion=2.0.1-SNAPSHOT -Dpackaging=zip -Dfile=/path/to/file
    [ERROR] 
    [ERROR] Alternatively, if you host your own repository you can deploy the file there:
    [ERROR] mvn deploy:deploy-file -DgroupId=org.wso2.carbon.apimgt -DartifactId=org.wso2.carbon.forum.server.feature -Dversion=2.0.1-SNAPSHOT -Dpackaging=zip -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
    [ERROR] 
    [ERROR] 
    [ERROR] org.wso2.carbon.apimgt:org.wso2.carbon.forum.server.feature:zip:2.0.1-SNAPSHOT
    [ERROR] 
    [ERROR] from the specified remote repositories:
    [ERROR] wso2-nexus (http://maven.wso2.org/nexus/content/groups/wso2-public/, releases=true, snapshots=true),
    [ERROR] wso2.releases (http://maven.wso2.org/nexus/content/repositories/releases/, releases=true, snapshots=true),
    [ERROR] wso2.snapshots (http://maven.wso2.org/nexus/content/repositories/snapshots/, releases=false, snapshots=true),
    [ERROR] central (https://repo.maven.apache.org/maven2, releases=true, snapshots=false)
    [ERROR] -> [Help 1]
    

【问题讨论】:

  • 您可能正在检查主分支。这应该是你有快照的原因。

标签: git maven wso2 wso2carbon wso2-am


【解决方案1】:

您无需下载 carbon-kernel 来构建 API 管理器。 Carbon-Kernel 是所有 WSO2 产品的核心模块/平台。

请按照步骤从源代码构建 API 管理器。

  1. carbon-apimgt repo 包含与 API Manager 相关的所有组件,这些组件被其他 WSO2 产品重用。您必须为 API Manager 1.9.1 签出 carbon-apimgt-v1.9.1 标签

  2. 使用mvn clean install构建这个组件仓库

  3. product-apim 存储库具有 API Manager 产品的必要工件。对于 API Manager 1.9.1,您必须签出 v1.9.1 标签

  4. 使用mvn clean install构建存储库

【讨论】:

  • 在 macosx 上使用 mvn 3.3.3 和 oracle java 1.7.55。结帐 carbon-apimnt (git clone ; git checkout -b carbonapimv191 carbon-apimgt-v1.9.1) 并构建 (mvn clean install) 但在 Apache Synapse - Non-blocking HTTP/s Transport 中获得了 2 个失败的测试.....失败 [01:21 分钟]。结果:测试失败:testCRLPathValidation(org.apache.synapse.transport.certificatevalidation.RevocationVerificationTest) testOCSPPathValidation(org.apache.synapse.transport.certificatevalidation.RevocationVerificationTest) 测试运行:9,失败:2,错误:0,跳过:0
  • 对于 product-apim 我在 [INFO] WSO2 API Manager 处失败 - 基于产品后端测试模块 FAILURE [ 24.358 s] 无法执行目标 org.apache.maven.plugins:maven-surefire -plugin:2.18:test (default-test) on project org.wso2.carbon.am.integration.backend.test: 执行目标 org.apache.maven.plugins:maven-surefire-plugin:2.18:test 的默认测试失败:分叉进程中出现错误...java.lang.RuntimeException:初始化测试环境时出错...原因:java.net.UnknownHostException:store.am.wso2.com
  • @carestra,请使用 maven 版本 3.0.5。 maven 最新版本存在一个已知问题,将在下一版本中修复。
  • 在 macosx 上使用 maven 3.0.5 和 oracle java1.7.55。结帐 carbon-apimgt (git clone ; git checkout release-1.9.1; git checkout -b carbonapimgt191 carbon-apimgt-v1.9.1) 并构建 (mvn clean install) 但是在 Apache Synapse 中获得 2 次失败测试 - 非阻塞 HTTP/s 传输.....失败 [01:21 分钟]。结果:测试失败:testCRLPathValidation(org.apache.synapse.transport.certificatevalidation.Revocat‌​ionVerificationTest) testOCSPPathValidation(org.apache.synapse.transport.certificatevalidation.Revoca‌​tionVerificationTest)
  • 在 macosx 上使用 maven 3.0.5 和 oracle java1.7.55。结帐 carbon-apimgt (git clone ; git checkout release-1.9.1; git checkout -b carbonapimgt191 carbon-apimgt-v1.9.1) 并使用跳过测试构建 (mvn clean install -Dmaven. test.skip=true) carbon-apimgt 已构建。不觉得神跳过测试!!
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2013-06-01
  • 2012-12-11
  • 2015-08-20
  • 2011-09-05
相关资源
最近更新 更多