使用 flexmojos-maven-plugin 时如何获取信息丰富的编译错误消息?
我正在使用 flexmojos-maven-plugin 构建我的 Flex 模块。所以在编译阶段我得到
org.apache.maven.plugin.MojoExecutionException:编译错误!
没有关于错误发生的位置(在哪个源文件中)以及编译错误的性质的信息。如果有人能指导我如何让 flexmojos-maven-plugin 打印有关编译错误的更多信息,我将不胜感激。
I'am using flexmojos-maven-plugin to build my Flex module. So on the compile phase I'm getting
org.apache.maven.plugin.MojoExecutionException: Error compiling!
with no information on where (at what source file) the error happens and what is nature of the compile error. I'll appreciate if anyone can instruct me on how to make flexmojos-maven-plugin print more information about compile errors.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我有类似的问题。第一个答案是,在编译时获取更多信息是使用内置的 maven -X 选项。
mvn -X clean install
这将为您提供描述此错误发生位置的输出。对我来说,我遇到了与您遇到的错误非常相似的错误,可以这么说,它最终来自“Adobe 的代码”。
就我而言,通过浏览错误堆栈跟踪:
我可以看出它与描述符文件有关。因此,我打开我的描述符文件并(基于一些谷歌搜索)更改了以下内容:
到:
和:
到:
第一个更改修复了空指针异常,第二个更改允许显示我的应用程序窗口。
我希望这对某人有帮助,
-gMale
edit:
另外,请务必在 Flexmojos 的配置中明确指向您的描述符:
I had a similar problem. The first answer, to get more information when compiling is to use the built-in maven -X option.
mvn -X clean install
That will give you output that describes where this error is happening. For me, I had a very similar error to the one you have and it was ultimately coming from "Adobe's code," so to speak.
In my case, by skimming over the error stacktrace:
I could tell it had something to do with the descriptor file. So I opened my descriptor file and (based on a few google searches) changed the following:
to:
and:
to:
The first change fixed the null pointer exception and the second allowed my application window to display.
I hope this helps someone,
-gMale
edit:
Also, be sure to explicitly point to your descriptor in the configuration of Flexmojos:
我以前也遇到过这样的情况。事实证明,实际的错误消息隐藏在控制台输出中的某个位置。
尝试将执行的 Maven 命令生成的所有控制台输出复制粘贴到文本编辑器中的某个位置,然后搜索字符串“ERROR”。
I have been in a situation like this before. It turns out that the actual error message is hidden somewhere in the console output.
Try to copy-paste all the console outputs generated from that executed maven command into a text editor somewhere and search the string 'ERROR'.