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
If you have the required file, you can resolve the problem by copying artifacts to the right .m2 folder on the build server.
001118073

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.