当我尝试构建maven项目时,它给我下面的错误
错误:
[ERROR] Failed to execute goal on project unstoppable-confluence: Could not resolve dependencies for project com.addteq.confluence.plugin.unstoppable:unstoppable-confluence:atlassian-plugin:1.3: Failed to collect dependencies at com.atlassian.confluence:confluence:jar:6.0.2 -> com.atlassian.security:atlassian-secure-xml:jar:3.2.4: Failed to read artifact descriptor for com.atlassian.security:atlassian-secure-xml:jar:3.2.4: Could not transfer artifact com.atlassian.pom:closedsource-pom:pom:3.0.2 from/to atlassian-public (https://maven.atlassian.com/repository/public): 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
<modelVersion>4.0.0</modelVersion>
<groupId>com.addteq.confluence.plugin.unstoppable</groupId>
<artifactId>unstoppable-confluence</artifactId>
<version>1.3</version>
<organization>
<name>Addteq</name>
<url>https://www.addteq.com</url>
</organization>
<name>Unstoppable-Confluence</name>
<description>This is Addteq's Unstoppable plugin for Atlassian Confluence.</description>
<packaging>atlassian-plugin</packaging>
<scm>
<developerConnection>
scm:svn:https://svn2.worldnet.ml.com/svnrepos/gmrt_architecture_repo/code-confluence-accessibility/trunk
</developerConnection>
<connection>
scm:svn:https://svn2.worldnet.ml.com/svnrepos/gmrt_architecture_repo/code-confluence-accessibility/trunk
</connection>
<url>
scm:svn:https://svn2.worldnet.ml.com/svnrepos/gmrt_architecture_repo/code-confluence-accessibility/trunk
</url>
</scm>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.10</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.atlassian.confluence</groupId>
<artifactId>confluence</artifactId>
<version>${confluence.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.atlassian.upm</groupId>
<artifactId>licensing-api</artifactId>
<version>${upm.license.compatibility.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.atlassian.upm</groupId>
<artifactId>upm-api</artifactId>
<version>${upm.license.compatibility.version}</version>
<scope>provided</scope>
</dependency>
<!-- WIRED TEST RUNNER DEPENDENCIES -->
<dependency>
<groupId>com.atlassian.plugins</groupId>
<artifactId>atlassian-plugins-osgi-testrunner</artifactId>
<version>${plugin.testrunner.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>jsr311-api</artifactId>
<version>1.1.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.2.2-atlassian-1</version>
</dependency>
<dependency>
<groupId>com.atlassian.activeobjects</groupId>
<artifactId>activeobjects-plugin</artifactId>
<version>1.0.0</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.atlassian.confluence.rest</groupId>
<artifactId>confluence-rest-plugin</artifactId>
<version>4.0</version>
<scope>provided</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>com.atlassian.maven.plugins</groupId>
<artifactId>maven-confluence-plugin</artifactId>
<version>${amps.version}</version>
<extensions>true</extensions>
<configuration>
<productVersion>${confluence.version}</productVersion>
<productDataVersion>${confluence.data.version}</productDataVersion>
<!--<productDataPath>${basedir}/src/test/resources/generated-test-resources.zip</productDataPath>-->
<enableFastdev>false</enableFastdev>
<enableQuickReload>true</enableQuickReload>
<instructions>
<DynamicImport-Package>com.atlassian.upm.api.license.entity;version="2.0.1", com.atlassian.upm.api.license;version="2.0.1", com.atlassian.upm.api.util;version="2.0.1", com.atlassian.upm.license.storage.plugin;version="${upm.license.compatibility.version}"</DynamicImport-Package>
</instructions>
</configuration>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
</plugins>
</build>
<properties>
<confluence.version>6.0.2</confluence.version>
<confluence.data.version>6.0.2</confluence.data.version>
<amps.version>6.2.6</amps.version>
<plugin.testrunner.version>1.2.0</plugin.testrunner.version>
<upm.license.compatibility.version>2.20.4</upm.license.compatibility.version>
<upm.license.storage.compatibility.version>2.15.3</upm.license.storage.compatibility.version>
<sonar.sources>src/main</sonar.sources>
</properties>
<repositories>
<repository>
<id>atlassian</id>
<name>Atlassian Repository</name>
<url>https://maven.atlassian.com/content/groups/public/</url>
<snapshots>
<enabled>true</enabled>
</snapshots>
<releases>
<enabled>true</enabled>
</releases>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>atlassian-public</id>
<url>https://m2proxy.atlassian.com/repository/public/</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
有人可以建议我如何摆脱这个错误。
还有我直接从构建路径添加的外部罐子&gt;配置构建路径&gt;
addteq-jira-unstoppable-1.2.jar&amp; 势不可挡汇合-1.3.2.jar
答案 0 :(得分:1)
正如khmarbaise所提到的,你得到的错误是: sun.security.validator.ValidatorException:PKIX路径构建失败:sun.security.provider.certpath.SunCertPathBuilderException:无法找到所请求目标的有效证书路径< / em>的
您的本地密钥库(信任库)不包含所需的证书。添加所需的证书后,它将开始工作。您可以按照以下步骤执行此操作:
Atlassian的以下文章描述了一个类似的问题并提供了解决问题的方法:https://confluence.atlassian.com/kb/unable-to-connect-to-ssl-services-due-to-pkix-path-building-failed-779355358.html
要直接添加JAR,可以在以下位置找到正确的步骤: