[MVN部署因发布要交换的应用程序而失败

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

我正在尝试发布资产以使用Maven进行交换。但是当我执行mvn deploy时出现错误,显示为sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

POM.xml

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>86771b6c-3ac1-49a4-9cb6-9930fdfd3e4b</groupId>
<artifactId>hello-world-publish-deploy</artifactId>
<version>1.0.0-SNAPSHOT</version>
<packaging>mule-application</packaging>

<name>hello-world-publish-deploy</name>

<properties>
    <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
    <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

    <app.runtime>4.2.1</app.runtime>
    <mule.maven.plugin.version>3.2.7</mule.maven.plugin.version>
    <type>app</type>
</properties>
<distributionManagement>
    <repository>
        <id>Repository</id>
        <name>Corporate Repository</name>
        <url>https://maven.anypoint.mulesoft.com/api/v1/organizations/${groupId}/maven</url>
        <layout>default</layout>
    </repository>
</distributionManagement>
<build>
    <plugins>
        <plugin>
            <groupId>org.mule.tools.maven</groupId>
            <artifactId>mule-maven-plugin</artifactId>
            <version>${mule.maven.plugin.version}</version>
            <extensions>true</extensions>
            <configuration>
                <cloudHubDeployment>
                    <muleVersion>4.2.1</muleVersion>
                    <username>*****</username>
                    <password>*****</password>
                    <environment>Sandbox</environment>
                    <applicationName>hello-world-publish-deploy</applicationName>
                    <workers>1</workers>
                    <workerType>Micro</workerType>
                </cloudHubDeployment>
            </configuration>
        </plugin>
    </plugins>
</build>

<dependencies>
    <dependency>
        <groupId>org.mule.connectors</groupId>
        <artifactId>mule-http-connector</artifactId>
        <version>1.5.6</version>
        <classifier>mule-plugin</classifier>
    </dependency>
    <dependency>
        <groupId>org.mule.connectors</groupId>
        <artifactId>mule-sockets-connector</artifactId>
        <version>1.1.5</version>
        <classifier>mule-plugin</classifier>
    </dependency>
    <dependency>
        <groupId>org.mule.modules</groupId>
        <artifactId>mule-apikit-module</artifactId>
        <version>1.3.6</version>
        <classifier>mule-plugin</classifier>
    </dependency>
</dependencies>

<repositories>
      <repository>
        <id>anypoint-exchange</id>
        <name>Anypoint Exchange</name>
        <url>https://maven.anypoint.mulesoft.com/api/v1/maven</url>
        <layout>default</layout>
    </repository>
    <repository>
        <id>mulesoft-releases</id>
        <name>MuleSoft Releases Repository</name>
        <url>https://repository.mulesoft.org/releases/</url>
        <layout>default</layout>
    </repository>
    <repository>
      <id>Repository</id>
      <name>Corporate Repository</name>
      <url>https://maven.anypoint.mulesoft.com/api/v2/organizations/${groupId}/maven</url>
      <layout>default</layout>
    </repository>
</repositories>
<pluginRepositories>
    <pluginRepository>
        <id>mulesoft-releases</id>
        <name>mulesoft release repository</name>
        <layout>default</layout>
        <url>https://repository.mulesoft.org/releases/</url>
        <snapshots>
            <enabled>false</enabled>
        </snapshots>
    </pluginRepository>
</pluginRepositories>
</project>

settings.xml

<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 
      http://maven.apache.org/xsd/settings-1.0.0.xsd">
   <servers>
     <server>
       <id>Repository</id>
       <username>lalithponnusamy</username>
       <password>xxxxxx</password>
     </server>
  </servers>
</settings>

我尝试过的命令是:

  1. MVN部署
  2. MVN清洁程序包部署
  3. MVN部署-DaltDeploymentRepository =发布::默认值:: https://maven.anypoint.mulesoft.com/api/v1/organizations/86771b6c-3ac1-49a4-9cb6-9930fdfd3e4b/maven

错误:enter image description here

请帮我摆脱掉。

xml maven anypoint-studio mulesoft
1个回答
0
投票

错误表明Java无法识别主机maven.anypoint.mulesoft.com的公共证书。这通常意味着您的Java安装没有已知证书颁发机构的最新列表,或者公司网络中的某些安全设备正在“透明地”替换证书,从而导致Java中的证书验证失败。

如果可以为Maven启用Java SSL调试日志,则可以看到证书列表已更新,或者正在替换远程证书。不过,我找不到办法。使用Wireshare捕获流量至少将允许查找是否替换了证书。

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