Reputation: 1655
I am using Anypoint Studio 6.2 with Mule 3.8.1 runtime and Maven 3.3.9 and when I build my project, the Maven dependencies are written to a project folder called ${env.M2_REPO}
instead of my usual Maven repository c:/users/my.name/.m2
.
How can I change it back to c:/users/my.name/.m2
and stop this folder from being created?
It is causing errors to show in the Mule Problems tab saying "missing libraries" but when I move them from the ${env.M2_REPO}
folder to c:/users/my.name/.m2
the problems go away.
Upvotes: 1
Views: 2639
Reputation: 1655
The issue was that in the settings.xml file in the Maven application folder, the default repository was set to env.M2_REPO instead of the .m2 location. Changed it to .m2 and all working correctly.
Upvotes: 1
Reputation: 1838
right click on project--> Java Build Path-->Add Variable --> configure variables--> Classpath variables--> new
-----------OR---------------
preferences-->Java--> Build path--> classpath variables
name: M2_REPO
path: location of repo
Update1: right click on project, you will see something like this. first time click on
populate maven repository
.. If your problem still didn't fixed then click on
Update project dependencies
.. This is how it fixed my problem few months back.
Upvotes: 0