运行Maven项目时Anypoint Studio失败 [英] Anypoint Studio fails when running Maven project
问题描述
我是Mule的新手,正在努力使Anypoint Studio与Maven一起使用.
I am a Mule newbie and struggling to get the Anypoint Studio to work with Maven.
我使用了mule-maven插件创建了一个多模块项目,并将我的代码添加到了apps子项目中.该项目在maven下构建,并在domain-bundle/target目录下生成一个zip文件.压缩文件的内容看起来很合理.
I used the mule-maven plugin to create a multi-module project and added my code to the apps sub-project. The project builds under maven and produces a zip file under the domain-bundle/target directory. The contents of the zip file looks reasonable.
当我尝试运行项目时(用Maven右键单击项目/运行方式/Mule应用程序),该项目由maven构建,然后得到以下信息
When I tried to run the project (right click project/run as/Mule application with Maven) the project gets built by maven and then I get the following
Using as WTP server : null
[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] Full Domain bbc-demo Project ....................... SUCCESS [ 0.264 s]
[INFO] Domain bbc-demo Project ............................ FAILURE [ 0.323 s]
[INFO] Mule bbcwebservices Application .................... SKIPPED
[INFO] Mule bbcmetadata Application ....................... SKIPPED
[INFO] Mule bbcfilemonitor Application .................... SKIPPED
[INFO] Domain bbc-demo Applications ....................... SKIPPED
[INFO] Domain bbc-demo Bundle Project ..................... SKIPPED
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.195 s
[INFO] Finished at: 2015-11-20T12:56:17+13:00
[INFO] Final Memory: 15M/231M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.mule.tools:studio-maven-plugin:3.4.10:studio
(default-cli) on project bbc-demo-domain:
Execution default-cli of goal org.mule.tools:studio-maven-
plugin:3.4.10:studio failed. NullPointerException -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e
可以看到,该错误与运行Studio插件有关-我的maven存储库中提供了该插件.
As can be see the error is related to the running the studio plugin - which is available in my maven repository.
有时它会以另一种方式失败. Maven构建似乎可以正常工作,但是Eclipse随后显示以下错误消息
Sometimes it fails in another way. The maven build appears to work correctly but Eclipse then displays the following error message
Unable to copy project zip file to the embedded Mule instance.
Project: [Mule Project] Name: bbc-demo - Domain: default
Source 'AnypointStudio\workspace_anypoint\bbc-demo\target\bbc-demo-1-SNAPSHOT.zip'
does not exist
这并不奇怪,因为它应该运行的zip文件实际上位于名为bbc-demo-domain-的'workspace_anypoint \ bbc-demo \ domain-bundle \ target'目录中1-SNAPSHOT.zip
This is not un-surprising as the zip file it should be running is actually in 'workspace_anypoint\bbc-demo\ domain-bundle \target' directory with the name bbc-demo-domain-1-SNAPSHOT.zip
推荐答案
您在pom.xml上设置的打包选项是什么?尝试将其更改为"m子",而不是战争".
What is the packaging option you had set on your pom.xml? Try changing it to "mule" instead of "war".
<packaging>mule</packaging>
我可以在Anypoint Studio 6.23上使用Maven运行基于Mule 3.4 CE的应用程序
I was able to use this run my Mule 3.4 CE based application using Maven on Anypoint Studio 6.23
这篇关于运行Maven项目时Anypoint Studio失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!