Anypoint Studio 自动将 /ee 添加到 XMLNS 路径

Anypoint Studio automatically adding /ee to XMLNS paths

所以我继承了一个使用 Mulesoft 构建的项目。我花了很多时间尝试调试为什么我看似简单的更改不起作用,只是在我尝试保存时才意识到我的 XML 文件正在被更改。

我正在使用 Anypoint Studio 并修改现有流程。当我保存时会发生什么,由于某种原因它正在更新标签

保存前:

<mule xmlns:ftp="http://www.mulesoft.org/schema/mule/ftp" xmlns:vm="http://www.mulesoft.org/schema/mule/vm"
        xmlns:scripting="http://www.mulesoft.org/schema/mule/scripting"
    xmlns:file="http://www.mulesoft.org/schema/mule/file"
    xmlns="http://www.mulesoft.org/schema/mule/core"
    xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
    xmlns:spring="http://www.springframework.org/schema/beans"
    version="CE-3.6.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.mulesoft.org/schema/mule/vm http://www.mulesoft.org/schema/mule/vm/current/mule-vm.xsd
http://www.mulesoft.org/schema/mule/ftp http://www.mulesoft.org/schema/mule/ee/ftp/current/mule-ftp.xsd
http://www.mulesoft.org/schema/mule/file http://www.mulesoft.org/schema/mule/file/current/mule-file.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/scripting http://www.mulesoft.org/schema/mule/scripting/current/mule-scripting.xsd">

保存后:

<mule xmlns:ftp="http://www.mulesoft.org/schema/mule/ee/ftp" xmlns:vm="http://www.mulesoft.org/schema/mule/vm"
        xmlns:scripting="http://www.mulesoft.org/schema/mule/scripting"
    xmlns:file="http://www.mulesoft.org/schema/mule/file"
    xmlns="http://www.mulesoft.org/schema/mule/core"
    xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
    xmlns:spring="http://www.springframework.org/schema/beans"
    version="CE-3.6.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://www.mulesoft.org/schema/mule/vm http://www.mulesoft.org/schema/mule/vm/current/mule-vm.xsd
http://www.mulesoft.org/schema/mule/ee/ftp http://www.mulesoft.org/schema/mule/ee/ftp/current/mule-ftp-ee.xsd
http://www.mulesoft.org/schema/mule/file http://www.mulesoft.org/schema/mule/file/current/mule-file.xsd
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/scripting http://www.mulesoft.org/schema/mule/scripting/current/mule-scripting.xsd">

如您所见,它正在尝试在我保存时自动将 "Enterprise Edition" (mule/ee/ftp) 添加到我的 FTP 标签。

我该如何阻止它?

David Dossot 在一条引导我找到解决方案的评论中提到。

问题是我在 Anypoint Studio 安装中默认设置为使用 "Mule Server 3.6.0 EE" 运行时。 (Windows > 首选项 > Anypoint Studio)

安装新的运行时并将其设置为我的默认值解决了这个问题。

http://www.mulesoft.org/documentation/display/current/Adding+Community+Runtime#AddingCommunityRuntime-AddingCommunityRuntime

确保您已在 Studio 中为项目选择 CE 运行时。

  • 双击项目根目录下的 mule-project.xml
  • Select一个CE Runtime,如下图: