Maven dependencies for Mulesoft not found in ~/.m2/repository
Asked by Jab Lazim:

Successfully download all the \`dependencies\` yet still can't be found in the said directory.

Please see sample logs below;

Downloaded from : <https://repo.maven.apache.org/maven2/org/apache/maven/maven-artifact/3.0/maven-artifact-3.0.jar> (52 kB at 1.3 MB/s)Downloaded from : <https://repo.maven.apache.org/maven2/org/sonatype/sisu/sisu-inject-plexus/1.4.2/sisu-inject-plexus-1.4.2.jar> (202 kB at 5.2 MB/s)Downloading from : <https://repo.maven.apache.org/maven2/org/sonatype/sisu/sisu-inject-bean/1.4.2/sisu-inject-bean-1.4.2.jar>Downloaded from : <https://repo.maven.apache.org/maven2/org/apache/maven/maven-model/3.0/maven-model-3.0.jar> (165 kB at 3.9 MB/s)Downloading from : <https://repo.maven.apache.org/maven2/org/sonatype/sisu/sisu-guice/2.1.7/sisu-guice-2.1.7-noaop.jar>Downloaded from : <https://repo.maven.apache.org/maven2/org/codehaus/plexus/plexus-component-annotations/1.5.5/plexus-component-annotations-1.5.5.jar> (4.2 kB at 103 kB/s)Progress (1): 221/222 kB` `

[ERROR] Failed to execute goal org.mule.tools.maven:mule-maven-plugin:3.5.1:process-sources (default-process-sources) on project mule-training: Execution default-process-sources of goal org.mule.tools.maven:mule-maven-plugin:3.5.1:process-sources failed: An API incompatibility was encountered while executing org.mule.tools.maven:mule-maven-plugin:3.5.1:process-sources: java.lang.IllegalAccessError: class org.mule.maven.client.internal.util.FileUtils (in unnamed module @0x1c5d3a37) cannot access class sun.net.[www.protocol.jar.JarURLConnection](http://www.protocol.jar.JarURLConnection) (in module java.base) because module java.base does not export sun.net.[www.protocol.jar](http://www.protocol.jar) to unnamed module @0x1c5d3a37[ERROR] -----------------------------------------------------[ERROR] realm = extension>org.mule.tools.maven:mule-maven-plugin:3.5.1[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy[ERROR] urls[0] = file:/root/.m2/repository/org/mule/tools/maven/mule-maven-plugin/3.5.1/mule-maven-plugin-3.5.1.jar[ERROR] urls[1] = file:/root/.m2/repository/org/mule/tools/maven/mule-packager/3.5.1/mule-packager-3.5.1.jar[ERROR] urls[2] = file:/root/.m2/repository/org/mule/tools/maven/mule-classloader-model/3.5.1/mule-classloader-model-3.5.1.jar[ERROR] urls[3] = file:/root/.m2/repository/org/mule/runtime/mule-api/1.1.4/mule-api-1.1.4.jar[ERROR] urls[4] = file:/root/.m2/repository/org/mule/runtime/mule-metadata-model-api/1.1.5/mule-metadata-model-api-1.1.5.jar[ERROR] urls[5] = file:/root/.m2/repository/org/mule/runtime/mule-artifact-declaration/1.1.1/mule-artifact-declaration-1.1.1.jar[ERROR] urls[6] = file:/root/.m2/repository/org/mule/runtime/api-annotations/1.0.1/api-annotations-1.0.1.jar[ERROR] urls[7] = file:/root/.m2/repository/org/mule/mule-maven-client-impl/1.5.1/mule-maven-client-impl-1.5.1.jar


Answers:
author: drichards-alcon
body: To get the BitBucket pipelines to work with our MuleSoft process (we run full MUnit and then deploy to Cloudhub via it) I had to write a script that updated the Maven \~/.m2/settings.xml file to include the official MuleSoft repos, as well as our company's custom Exchange endpoints. Once I did that it works like a champ.

See the following for what needs to be added to your settings.xml as well as how to request the user/password for the EE maven repo.

<https://docs.mulesoft.com/mule-runtime/3.9/configuring-maven-to-work-with-mule-esb#referencing-mulesofts-enterprise-repositories>


author: Nic Brough -Adaptavist-
body: This isn't about Bitbucket I'm afraid, it's about a broken build environment.

I can't tell you a lot more than "you'll need to fix the maven dependencies, getting them from somewhere that does host them"

comments: author: jabalnurlazim
body: Yes, just confirmed that this isn't a Bitbucket problem. More on build plugin.

I'm still hoping though that someone could help me with this.

[ERROR] Failed to execute goal org.mule.tools.maven:mule-maven-plugin:3.5.1:process-sources (default-process-sources) on project mini-project: Execution default-process-sources of goal org.mule.tools.maven:mule-maven-plugin:3.5.1:process-sources failed: An API incompatibility was encountered while executing org.mule.tools.maven:mule-maven-plugin:3.5.1:process-sources: java.lang.IllegalAccessError: class org.mule.maven.client.internal.util.FileUtils (in unnamed module @0x6fd77352) cannot access class sun.net.[www.protocol.jar.JarURLConnection](http://www.protocol.jar.JarURLConnection) (in module java.base) because module java.base does not export sun.net.[www.protocol.jar](http://www.protocol.jar) to unnamed module @0x6fd77352


author: Martin Francisco
body: I have the same problem, [@jabalnurlazim](/t5/user/viewprofilepage/user-id/4508464) were you able to fix it?


Tags: bitbucket-pipelines

maven

mulesoft

server