mvn -e完整的堆栈跟踪?

时间:2013-04-07 17:27:34

标签: maven

我是maven的新手,我假设这是一个maven的事情,而不是我的shell,但是当我使用-e开关来尝试识别错误时,我会得到一些不完整的东西这样:

[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Deployment failed and was rolled back.
[INFO] ------------------------------------------------------------------------
[INFO] Trace
org.apache.maven.lifecycle.LifecycleExecutionException: Deployment failed and was rolled back.
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:719)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:569)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:539)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:601)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: org.jboss.as.plugin.common.DeploymentExecutionException: Deployment failed and was rolled back.
at org.jboss.as.plugin.deployment.standalone.StandaloneDeployment.execute(StandaloneDeployment.java:140)
at org.jboss.as.plugin.deployment.AbstractDeployment.executeDeployment(AbstractDeployment.java:119)
at org.jboss.as.plugin.deployment.AbstractDeployment.doExecute(AbstractDeployment.java:141)
at org.jboss.as.plugin.deployment.AbstractAppDeployment.doExecute(AbstractAppDeployment.java:70)
at org.jboss.as.plugin.deployment.AbstractDeployment.execute(AbstractDeployment.java:111)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
... 17 more
[INFO] ------------------------------------------------------------------------

我怎样才能看到“......还有17个”的东西?我相信它会帮助我找出究竟哪个maven任务失败了?感谢您提供任何帮助或文档链接!

P.S。如果你很好奇并且感到有帮助我弄清楚实际问题的冲动,我只是简单地运行“mvn clean package jboss-as:deploy”进行部署,如果我不知道,我可以在另一个问题中提供更多信息。我自己弄清楚了。

1 个答案:

答案 0 :(得分:0)

这不是一个严格的答案,但它可能有助于您的调查。

StandaloneDeployment (line 140)的源代码(警告,这可能不是您使用的版本)显示了DeploymentExecutionException被抛出的位置:

case ROLLED_BACK:
    throw new DeploymentExecutionException("Deployment failed and was rolled back.", actionResult.getDeploymentException());

并将根异常(actionResult.getDeploymentException())传递给此DeploymentExecutionException

我原本以为你会在Maven堆栈跟踪中看到这个根异常,但似乎不是你的情况。

您可以随时尝试debugging the plugin itself,并在上面显示的行上设置断点。