无法使用带有maven pom.xml的DMSDK(数据移动SDK)构建应用程序

问题描述 投票:1回答:1

我正在尝试在java中使用Marklogic DMSDK(数据移动SDK),因为我想用动态参数加载内容。我正在使用Marklogic 9.0-8。我跟着提供的样本

https://developer.marklogic.com/learn/data-movement-sdk

我使用maven在Windows 10上用java 1.8构建java应用程序。但是当我尝试构建时,我遇到了以下错误。示例代码上也发生了此错误。

[INFO] Building loaddata 0.0.1-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO] Downloading from : https://developer.marklogic.com/maven2/com/burgstaller/okhttp-digest/1.16/okhttp-digest-1.16.pom
[INFO] Downloading from : https://repo.maven.apache.org/maven2/com/burgstaller/okhttp-digest/1.16/okhttp-digest-1.16.pom
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.346 s
[INFO] Finished at: 2019-02-22T13:50:23-05:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project loaddata: Could not resolve dependencies for project org.asme.publish:loaddata:jar:0.0.1-SNAPSHOT: Failed to collect dependencies at com.marklogic:marklogic-client-api:jar:4.1.2 -> com.burgstaller:okhttp-digest:jar:1.16: Failed to read artifact descriptor for com.burgstaller:okhttp-digest:jar:1.16: Could not transfer artifact com.burgstaller:okhttp-digest:pom:1.16 from/to MarkLogic-releases (https://developer.marklogic.com/maven2): sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target -> [Help 1]

以下是我的pom.xml中的一些内容

<repositories>
  <repository>
      <id>MarkLogic-releases</id>
      <name>MarkLogic Releases</name>
      <url>https://developer.marklogic.com/maven2</url>
  </repository>
</repositories>

<dependencies>
    <dependency>
        <groupId>com.marklogic</groupId>
        <artifactId>marklogic-client-api</artifactId>
        <version>4.1.2</version>
    </dependency>
    <dependency>
        <groupId>com.sun.jersey</groupId>
        <artifactId>jersey-json</artifactId>
        <version>1.17</version>
    </dependency>
    <dependency>
        <groupId>org.slf4j</groupId>
        <artifactId>slf4j-api</artifactId>
        <version>1.7.25</version>
    </dependency>
    <dependency>
        <groupId>junit</groupId>
        <artifactId>junit</artifactId>
        <version>3.8.1</version>
        <scope>test</scope>
    </dependency>
</dependencies>

非常感谢,海伦

maven marklogic marklogic-9
1个回答
1
投票

我找到了链接https://github.com/marklogic/java-client-api/issues/817

基于此链接,我将以下内容添加到我的pom.xml文件中

<repository>
    <id>jcenter</id>
    <url>http://jcenter.bintray.com</url>
</repository>

好像我现在可以构建app了。

© www.soinside.com 2019 - 2024. All rights reserved.