当我在Mac上启动Mule Studio的新安装时,出现以下错误:
然后我转到Preferences / Mule Studio / Maven,选中复选框,指向Maven主目录(“/Users/name/tools/apache-maven-3.1.1”),然后保存设置。< / p>
当我重新启动Mule Studio时,它会出现相同的错误,我添加的Maven设置为空白。我的.bash_profile中也有以下设置:
export MAVEN_HOME=/Users/name/tools/apache-maven-3.1.1
export M2_HOME=/Users/name/tools/apache-maven-3.1.1
export M2=$M2_HOME$/bin
export PATH=$PATH:$M2
从终端,Maven版本是:
~ $ mvn --version
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8
Apache Maven 3.1.1 (0728685237757ffbf44136acec0402957f723d9a; 2013-09-17 09:22:22-0600)
Maven home: /Users/name/tools/apache-maven-3.1.1
Java version: 1.6.0_29, vendor: Apple Inc.
Java home: /Library/Java/JavaVirtualMachines/1.6.0_29-b11-402.jdk/Contents/Home
Default locale: en_US, platform encoding: UTF8
OS name: "mac os x", version: "10.9", arch: "x86_64", family: "mac"
在Mule Studio错误日志中,重复此信息:
!ENTRY org.eclipse.core.net 1 0 2013-10-29 08:30:52.973
!MESSAGE System property http.nonProxyHosts has been set to local|*.local|169.254/16|*.169.254/16 by an external source. This value will be overwritten using the values from the preferences
!SESSION 2013-10-29 09:56:40.767 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.6.0_29
java.vendor=Apple Inc.
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_US
Framework arguments: -keyring /Users/name/.eclipse_keyring -showlocation
Command-line arguments: -os macosx -ws cocoa -arch x86_64 -keyring /Users/name/.eclipse_keyring -showlocation
!ENTRY org.mule.tooling.core 1 0 2013-10-29 09:56:44.114
!MESSAGE 'M2_REPO has been previously set. Not adding it again to the workspace.
我需要做些什么才能解决此错误?
答案 0 :(得分:4)
这是与Mac OS X 10.9一起安装的XCode(我假设5.0.1)问题以及Mule Bug。此版本中的XCode不再安装maven,并且Mule无法正确读取其首选项。
Mule Maven Path设置存储在文件中:
[workspace_dir]/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.mule.tooling.maven.ui.prefs
用钥匙:
maven_preference_maven_installation_home=[maven_dir]
如果我更改了Mule首选项 - > Mule Studio-&gt; Maven设置中的设置,则文件内容将被更改,但Mule(Bug)不会读取。
因此,解决方案是创建maven目录的符号链接到默认位置Mule搜索它(旧的XCode maven安装位置):
$ sudo ln -s /opt/local/share/java/maven3 /usr/share/maven
(如果maven3是由MacPorts安装的。) 在你的情况下:
$ sudo ln -s /Users/name/tools/apache-maven-3.1.1 /usr/share/maven