I\'m trying to create a maven project by following this tutorial https://docs.mulesoft.com/mule-user-guide/v/3.7/building-a-mule-application-with-maven-in-studio that time t
Step 1: Edit settings.xml to add a new profile with the following repositories and pluginRepositories. (There are two locations where a settings.xml file may live: $M2_HOME/conf/settings.xml or ${user.home}/.m2/settings.xml)
<profiles>
...
<profile>
<id>mule-extra-repos</id>
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<repositories>
<repository>
<id>mule-public</id>
<url> https://repository.mulesoft.org/nexus/content/repositories/public </url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>mule-public</id>
<url> https://repository.mulesoft.org/nexus/content/repositories/public </url>
</pluginRepository>
</pluginRepositories>
</profile>
...
</profiles>
Step 2: Add a new pluginGroup, as shown below.
<pluginGroups>
...
<pluginGroup>org.mule.tools</pluginGroup>
...
</pluginGroups>
For more details, you can visit this page https://docs.mulesoft.com/mule-user-guide/v/3.7/maven-tools-for-mule-esb
in your anypoint studio go to windows >> preferences >> on the left hand menu select java >> installed jre change it to jdk path
I noticed that if your flow involves API Kit and Dataweave, additional dependencies need to be added.
<plugin>
<executions>
<execution>
<configuration>
<resources>
<resource>
<directory>src/main/api/</directory>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
and
<dependency>
<groupId>org.mule.modules</groupId>
<artifactId>mule-module-apikit</artifactId>
<version>${mule.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.mulesoft.weave</groupId>
<artifactId>mule-plugin-weave_2.11</artifactId>
<version>${mule.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.mule.modules</groupId>
<artifactId>mule-module-http</artifactId>
<version>${mule.version}</version>
<scope>provided</scope>
</dependency>