Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

mvn -e Complete Stack Trace?

Tags:

maven

I'm kinda new to maven and I'm assuming this is a maven thing and not something to do with my shell, but when I run with the -e switch to try and identify an error, I get something incomplete like this:

[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] ------------------------------------------------------------------------

How can I see the "... 17 more" things? I believe it will help me find out exactly which maven task is failing? Thanks for any help or links to documentation!

P.S. If you are curious and feel the urge to help me figure out the actual problem, I am simply running "mvn clean package jboss-as:deploy" to deploy, and I could provide more info in another question specific to the problem if I don't figure it out myself.

like image 952
mwillson Avatar asked Apr 07 '13 17:04

mwillson


People also ask

How do you see the full stack trace of the errors re run Maven with the switch?

[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch. [ERROR] Re-run Maven using the -X switch to enable full debug logging.

How do I debug test cases in Maven IntelliJ?

In the IDE, add debug points where you want the debugger to pause during execution. Then in the terminal, enter your Maven execution command, replacing mvn with mvnDebug . In IntelliJ, make sure your debugging configuration is selected, then press the “Debug” button.


1 Answers

This isn't strictly an answer, but it might help your investigation.

The source code for StandaloneDeployment (line 140) (warning, this may not be the version you are using) shows the place where the DeploymentExecutionException is thrown:

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

and a root exception (actionResult.getDeploymentException()) is passed to this DeploymentExecutionException.

I would have thought you would get to see this root exception in the Maven stack trace, but it seems not in your case.

You could always try debugging the plugin itself, and putting a breakpoint on the line shown above.

like image 50
Paul Grime Avatar answered Sep 28 '22 04:09

Paul Grime