How does Mule IDE create pom.xml? Why it is adding

2019-08-08 00:04发布

问题:

When I create a new project in mule studio, it adds mule EE dependencies in autogenerated pom.xml. Any idea why it's doing that?

    <!-- Mule Dependencies -->
<dependencies>
    <dependency>
        <groupId>org.mule</groupId>
        <artifactId>mule-core</artifactId>
        <version>${mule.version}</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>com.mulesoft.muleesb.modules</groupId>
        <artifactId>mule-module-boot-ee</artifactId>
        <version>${mule.version}</version>
        <scope>provided</scope>
    </dependency>
    <!-- Xml configuration -->
    <dependency>
        <groupId>org.mule.modules</groupId>
        <artifactId>mule-module-spring-config</artifactId>
        <version>${mule.version}</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>com.mulesoft.muleesb</groupId>
        <artifactId>mule-core-ee</artifactId>
        <version>${mule.version}</version>
        <scope>provided</scope>
    </dependency>
    <dependency>
        <groupId>com.mulesoft.muleesb.modules</groupId>
        <artifactId>mule-module-data-mapper</artifactId>
        <version>${mule.version}</version>
    </dependency>
    <!-- Xml configuration -->
    <dependency>
        <groupId>com.mulesoft.muleesb.modules</groupId>
        <artifactId>mule-module-spring-config-ee</artifactId>
        <version>${mule.version}</version>
        <scope>provided</scope>
    </dependency>

回答1:

No it does this regardless of if you select CE or EE as runtime for the project.

There is a issue reported in there Jira for this.

https://www.mulesoft.org/jira/browse/STUDIO-3506

Update: Latest MuleStudio 3.5 update seems to have this solved even if the Jira issue is not closed yet.



回答2:

I used Mule Studio 3.5.0 and experienced the same issue.

As default, Mule Studio only has EE runtime and all the tutorials shows EE runtime when you create new project. So, I needed hours and hours to find this solution

  1. [Help] -> [Install new software]
  2. Select [Work with] "Mule ESB Runtimes for Studio - http://studio.mulesoft.org/runtimes/"
  3. Choose "Mule ESB Server Runtime 3.4.0 CE"
  4. Then when you create a new Mule Project with Maven, you can see "Mule Server 3.4.0 CE Runtime"

and then, the pom.xml doesn't contain any EE dependencies.



回答3:

Probably is because you selected the EE version of the runtime. By selecting the CE version Studio should only add CE dependencies.