Error Creating a Maven Project

后端 未结 9 932
遥遥无期
遥遥无期 2021-01-04 11:38

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

相关标签:
9条回答
  • 2021-01-04 12:32

    You need to add the Maven Dependency for the Plugin

    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

    0 讨论(0)
  • 2021-01-04 12:34

    in your anypoint studio go to windows >> preferences >> on the left hand menu select java >> installed jre change it to jdk path

    0 讨论(0)
  • 2021-01-04 12:39

    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>
    
    0 讨论(0)
提交回复
热议问题