0

我一直在尝试使用新的 ServiceNow 连接器和 Mule 3.7.1 进行一些测试,但是当我尝试构建项目并运行它时,它失败并出现以下错误:

Failed to execute goal on project xxx: Could not resolve dependencies for project xxx:mule:0.0.1-SNAPSHOT: Failed to collect dependencies at org.mule.modules:mule-module-servicenow:jar:5.0.0: Failed to read artifact descriptor for org.mule.modules:mule-module-servicenow:jar:5.0.0: Could not transfer artifact org.mule.modules:mule-module-servicenow:pom:5.0.0 from/to mule-ee-releases (https://repository-master.mulesoft.org/nexus/content/repositories/releases-ee/): Not authorized , ReasonPhrase:Unauthorized. -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException

我相信我已将正确的信息添加到 pom.xml 中的正确部分

                    <inclusion>
                        <groupId>org.mule.modules</groupId>
                        <artifactId>mule-module-servicenow</artifactId>
                    </inclusion>


      <dependency>
        <groupId>org.mule.modules</groupId>
        <artifactId>mule-module-servicenow</artifactId>
        <version>5.0.0</version>
      </dependency>



        <repository>
        <id>mulesoft-releases1</id>
        <name>MuleSoft Repository</name>
        <url>http://repository-master.mulesoft.org/releases/</url>
        <layout>default</layout>
    </repository>
    <repository>
        <id>mulesoft-snapshots1</id>
        <name>MuleSoft Snapshot Repository</name>
        <url>http://repository-master.mulesoft.org/snapshots/</url>
        <layout>default</layout>
    </repository>

我不得不更改两个新存储库的 id,因为我的 pom 已经有这些 id 的存储库。

任何人都可以为我阐明这一点吗?

4

1 回答 1

0

你有 EE Maven 凭据集 settings.xml 吗?我能够使用 mule-module-servicenow 构建一个空应用程序,并使用以下自动生成的(通过将连接器从 Anypoint 托盘拖到画布上)存储库:

<repositories>
      <repository>
        <id>Central</id>
        <name>Central</name>
        <url>http://repo1.maven.org/maven2/</url>
        <layout>default</layout>
    </repository>
    <repository>
        <id>mulesoft-releases</id>
        <name>MuleSoft Releases Repository</name>
        <url>http://repository.mulesoft.org/releases/</url>
        <layout>default</layout>
    </repository>
    <repository>
        <id>mulesoft-snapshots</id>
        <name>MuleSoft Snapshots Repository</name>
        <url>http://repository.mulesoft.org/snapshots/</url>
        <layout>default</layout>
    </repository>
<repository>
        <id>mule-ee-releases</id>
        <name>MuleEE Releases Repository</name>
        <url>https://repository-master.mulesoft.org/nexus/content/repositories/releases-ee/</url>
    </repository>
</repositories>
<pluginRepositories>
    <pluginRepository>
        <id>mulesoft-release</id>
        <name>mulesoft release repository</name>
        <layout>default</layout>
        <url>http://repository.mulesoft.org/releases/</url>
        <snapshots>
            <enabled>false</enabled>
        </snapshots>
    </pluginRepository>
</pluginRepositories>
于 2015-08-20T22:15:27.570 回答