Loading

MuleSoft Maven Build Error "Could not transfer artifact" or "Failed to read artifact descriptor"

Дата публикации: Mar 6, 2026
Описание

You are using Maven to manage your dependencies and build your projects with MuleSoft. You are attempting to build your project but get an error about Maven not being able to find the dependencies in the Mulesoft Enterprise repository, though it's a custom dependency and shouldn't be found in the Mulesoft repository. The error message looks something like this:

[ERROR] Failed to execute goal on project PROJECT_NAME: Could not resolve dependencies for project com.mycompany:project_name:mule:1.0.0: Failed to collect dependencies at your.package:artifact:jar:1.0.0: Failed to read artifact descriptor for your.package:artifact:jar:1.0.0: Could not transfer artifact your.package:artifact:pom:1.0.0 from/to releases-ee (https://repository.mulesoft.org/nexus/content/repositories/releases-ee/): Not authorized , ReasonPhrase:Unauthorized. -> [Help 1]

 

Maven errors are sometimes cryptic and seem to suggest Maven is not looking in the right place, but actually one simply defines all repository locations, and Maven looks in all of them, including your Maven local repo in .m2, to try to find them. 

This error is caused by the fact that, as Maven is not finding the dependency, it's trying to look for it in the Mulesoft Enterprise Nexus repository as the last resource, then fails because of not being able to find it. This actually has nothing to do with the Mule repositories or Mule Maven Plugin.

Решение

When attempting to build your project and geting an error about Maven not being able to find the dependencies in Mulesoft Enterprise repository, the solution is to double check your local Maven settings.xml configuration and assert you have the correct repositories configured where Maven can obtain this particular dependency. Reference article How to use Enterprise Maven Repository credentials with settings.xml and pom.xml example.

If after doing so you are still having this issue, then use Maven to get a dependency tree and effective POM to find out which component is requesting this dependency. These would be the command lines: 

mvn clean package -X -e > mvninstall.txt 
mvn dependency:tree -Dverbose > mvnTree.txt 
mvn help:effective-pom -X > mvnpom.txt

Alternative Solution

If you have the required file, you can resolve the problem by copying artifacts to the right .m2 folder on the build server.

Дополнительные ресурсы

Maven Support In Mule

Номер статьи базы знаний

001118073

 
Загрузка
Salesforce Help | Article