我试图在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>
非常感谢, 海伦
答案 0 :(得分:1)
我找到了链接 https://github.com/marklogic/java-client-api/issues/817
基于此链接,我在pom.xml文件中添加了以下内容
<repository>
<id>jcenter</id>
<url>http://jcenter.bintray.com</url>
</repository>
似乎我现在可以构建应用了。