Continuum

Improve error message when perform release fails due to missing distributionManagement

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.1-alpha-2
  • Fix Version/s: 1.3.2 (Beta)
  • Component/s: Release
  • Labels:
    None
  • Complexity:
    Intermediate
  • Patch Submitted:
    Yes
  • Number of attachments :
    2

Description

When 'perform release' fails because there is no distributionManagment section in the pom, all you get in 'View Output' is the following:

[ERROR] org.apache.maven.shared.release.ReleaseExecutionException: Maven execution failed, exit code: '1'
	at org.apache.maven.shared.release.phase.AbstractRunGoalsPhase.execute(AbstractRunGoalsPhase.java:66)
	at org.apache.maven.shared.release.phase.RunPerformGoalsPhase.execute(RunPerformGoalsPhase.java:57)
	at org.apache.maven.shared.release.DefaultReleaseManager.perform(DefaultReleaseManager.java:319)
	at org.apache.maven.shared.release.DefaultReleaseManager.performWithResult(DefaultReleaseManager.java:279)
	at org.apache.maven.continuum.release.executors.PerformReleaseTaskExecutor.execute(PerformReleaseTaskExecutor.java:82)
	at org.apache.maven.continuum.release.executors.AbstractReleaseTaskExecutor.executeTask(AbstractReleaseTaskExecutor.java:67)
	at org.codehaus.plexus.taskqueue.execution.ThreadedTaskQueueExecutor$ExecutorRunnable$1.run(ThreadedTaskQueueExecutor.java:116)
	at edu.emory.mathcs.backport.java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:442)
	at edu.emory.mathcs.backport.java.util.concurrent.FutureTask.run(FutureTask.java:176)
	at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:665)
	at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:690)
	at java.lang.Thread.run(Thread.java:595)
Caused by: org.apache.maven.shared.release.exec.MavenExecutorException: Maven execution failed, exit code: '1'
	at org.apache.maven.shared.release.exec.ForkedMavenExecutor.executeGoals(ForkedMavenExecutor.java:103)
	at org.apache.maven.shared.release.exec.ForkedMavenExecutor.executeGoals(ForkedMavenExecutor.java:121)
	at org.apache.maven.shared.release.phase.AbstractRunGoalsPhase.execute(AbstractRunGoalsPhase.java:59)
	... 11 more

The log file shows the actual error:

INFO   | jvm 1    | 2007/06/19 17:19:37 |     [INFO] ------------------------------------------------------------------------
INFO   | jvm 1    | 2007/06/19 17:19:37 |     [ERROR] BUILD ERROR
INFO   | jvm 1    | 2007/06/19 17:19:37 |     [INFO] ------------------------------------------------------------------------
INFO   | jvm 1    | 2007/06/19 17:19:37 |     [INFO] Failed to configure plugin parameters for: org.apache.maven.plugins:maven-deploy-plugin:2.3
INFO   | jvm 1    | 2007/06/19 17:19:37 |
INFO   | jvm 1    | 2007/06/19 17:19:37 |     check that the following section of the pom.xml is present and correct:
INFO   | jvm 1    | 2007/06/19 17:19:37 |
INFO   | jvm 1    | 2007/06/19 17:19:37 |     <distributionManagement>
INFO   | jvm 1    | 2007/06/19 17:19:37 |       <!-- use the following if you're not using a snapshot version. -->
INFO   | jvm 1    | 2007/06/19 17:19:37 |       <repository>
INFO   | jvm 1    | 2007/06/19 17:19:37 |         <id>repo</id>
INFO   | jvm 1    | 2007/06/19 17:19:37 |         <name>Repository Name</name>
INFO   | jvm 1    | 2007/06/19 17:19:37 |         <url>scp://host/path/to/repo</url>
INFO   | jvm 1    | 2007/06/19 17:19:37 |       </repository>
INFO   | jvm 1    | 2007/06/19 17:19:37 |       <!-- use the following if you ARE using a snapshot version. -->
INFO   | jvm 1    | 2007/06/19 17:19:37 |       <snapshotRepository>
INFO   | jvm 1    | 2007/06/19 17:19:37 |         <id>repo</id>
INFO   | jvm 1    | 2007/06/19 17:19:37 |         <name>Repository Name</name>
INFO   | jvm 1    | 2007/06/19 17:19:37 |         <url>scp://host/path/to/repo</url>
INFO   | jvm 1    | 2007/06/19 17:19:37 |       </snapshotRepository>
INFO   | jvm 1    | 2007/06/19 17:19:37 |     </distributionManagement>
INFO   | jvm 1    | 2007/06/19 17:19:37 |
INFO   | jvm 1    | 2007/06/19 17:19:37 |     Cause: Class 'org.apache.maven.artifact.repository.ArtifactRepository' cannot be instantiated
INFO   | jvm 1    | 2007/06/19 17:19:37 |     [INFO] ------------------------------------------------------------------------
INFO   | jvm 1    | 2007/06/19 17:19:37 |     [INFO] For more information, run Maven with the -e switch
INFO   | jvm 1    | 2007/06/19 17:19:37 |     [INFO] ------------------------------------------------------------------------
INFO   | jvm 1    | 2007/06/19 17:19:37 |     [INFO] Total time: 5 seconds
INFO   | jvm 1    | 2007/06/19 17:19:37 |     [INFO] Finished at: Tue Jun 19 17:19:37 PDT 2007
INFO   | jvm 1    | 2007/06/19 17:19:37 |     [INFO] Final Memory: 9M/17M
INFO   | jvm 1    | 2007/06/19 17:19:37 |     [INFO] ------------------------------------------------------------------------
  1. CONTINUUM-1321.patch
    16/Jan/09 12:59 AM
    5 kB
    Gwen Harold Autencio
  1. continuum.png
    154 kB
    16/Jan/09 12:59 AM

Activity

Hide
Gwen Harold Autencio added a comment -

Hi. attached to change the exception displayed in the "view output" of continuum.
Also attached patch..Patch modifies the exception displayed.

Thanks.

Show
Gwen Harold Autencio added a comment - Hi. attached to change the exception displayed in the "view output" of continuum. Also attached patch..Patch modifies the exception displayed. Thanks.
Hide
Maria Odea Ching added a comment -

Hi Gwen, I tried your patch and it's displaying the correct output when the cause of error is the missing <distributionManagement>. However, it still shows that same error message even though the actual cause of error is different. In the case I tried, the actual error is a connection refused, as shown below:

[INFO] ------------------------------------------------------------------------
[ERROR] BUILD ERROR
[INFO] ------------------------------------------------------------------------
[INFO] Error deploying artifact: Error transferring file

Connection refused
[INFO] ------------------------------------------------------------------------
[INFO] For more information, run Maven with the -e switch
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 18 seconds
[INFO] Finished at: Fri Jan 16 19:30:05 PHT 2009
[INFO] Final Memory: 14M/82M
[INFO] ------------------------------------------------------------------------

But the release output shows this:

RROR] org.apache.continuum.release.exception.ContinuumReleaseExecutionException: Check that the following section of the pom.xml is present and correct:

<distributionManagement>
<!-- use the following if you're not using a snapshot version. -->
<repository>
<id>repo</id>
<name>Repository Name</name>
<url>scp://host/path/to/repo</url>
</repository>
<!-- use the following if you ARE using a snapshot version. -->
<snapshotRepository>
<id>repo</id>
<name>Repository Name</name>
<url>scp://host/path/to/repo</url>
</snapshotRepository>
</distributionManagement>

at org.apache.continuum.release.phase.AbstractContinuumRunGoalsPhase.execute(AbstractContinuumRunGoalsPhase.java:88)
at org.apache.continuum.release.phase.RunPerformGoalsPhase.execute(RunPerformGoalsPhase.java:62)
at org.apache.maven.shared.release.DefaultReleaseManager.perform(DefaultReleaseManager.java:319)
at org.apache.maven.shared.release.DefaultReleaseManager.performWithResult(DefaultReleaseManager.java:279)
at org.apache.maven.continuum.release.executors.PerformReleaseTaskExecutor.execute(PerformReleaseTaskExecutor.java:89)
at org.apache.maven.continuum.release.executors.AbstractReleaseTaskExecutor.executeTask(AbstractReleaseTaskExecutor.java:68)
at org.codehaus.plexus.taskqueue.execution.ThreadedTaskQueueExecutor$ExecutorRunnable$1.run(ThreadedTaskQueueExecutor.java:116)
at edu.emory.mathcs.backport.java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:442)
at edu.emory.mathcs.backport.java.util.concurrent.FutureTask.run(FutureTask.java:178)
at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1061)
at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:575)
at java.lang.Thread.run(Thread.java:595)

Show
Maria Odea Ching added a comment - Hi Gwen, I tried your patch and it's displaying the correct output when the cause of error is the missing <distributionManagement>. However, it still shows that same error message even though the actual cause of error is different. In the case I tried, the actual error is a connection refused, as shown below: [INFO] ------------------------------------------------------------------------ [ERROR] BUILD ERROR [INFO] ------------------------------------------------------------------------ [INFO] Error deploying artifact: Error transferring file Connection refused [INFO] ------------------------------------------------------------------------ [INFO] For more information, run Maven with the -e switch [INFO] ------------------------------------------------------------------------ [INFO] Total time: 18 seconds [INFO] Finished at: Fri Jan 16 19:30:05 PHT 2009 [INFO] Final Memory: 14M/82M [INFO] ------------------------------------------------------------------------ But the release output shows this: RROR] org.apache.continuum.release.exception.ContinuumReleaseExecutionException: Check that the following section of the pom.xml is present and correct: <distributionManagement> <!-- use the following if you're not using a snapshot version. --> <repository> <id>repo</id> <name>Repository Name</name> <url>scp://host/path/to/repo</url> </repository> <!-- use the following if you ARE using a snapshot version. --> <snapshotRepository> <id>repo</id> <name>Repository Name</name> <url>scp://host/path/to/repo</url> </snapshotRepository> </distributionManagement> at org.apache.continuum.release.phase.AbstractContinuumRunGoalsPhase.execute(AbstractContinuumRunGoalsPhase.java:88) at org.apache.continuum.release.phase.RunPerformGoalsPhase.execute(RunPerformGoalsPhase.java:62) at org.apache.maven.shared.release.DefaultReleaseManager.perform(DefaultReleaseManager.java:319) at org.apache.maven.shared.release.DefaultReleaseManager.performWithResult(DefaultReleaseManager.java:279) at org.apache.maven.continuum.release.executors.PerformReleaseTaskExecutor.execute(PerformReleaseTaskExecutor.java:89) at org.apache.maven.continuum.release.executors.AbstractReleaseTaskExecutor.executeTask(AbstractReleaseTaskExecutor.java:68) at org.codehaus.plexus.taskqueue.execution.ThreadedTaskQueueExecutor$ExecutorRunnable$1.run(ThreadedTaskQueueExecutor.java:116) at edu.emory.mathcs.backport.java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:442) at edu.emory.mathcs.backport.java.util.concurrent.FutureTask.run(FutureTask.java:178) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1061) at edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:575) at java.lang.Thread.run(Thread.java:595)
Hide
Wendy Smoak added a comment -

Looking at the patch, it hard-codes the log output in the original error report. That's only one of many things that can go wrong during a release.

The problem is that you have to look at the log file to find out what really happened. We need to somehow capture the actual output from the forked process that executes the release, and display that instead.

Also, there's some noise in the patch – looks like some inadvertent whitespace changes.

Show
Wendy Smoak added a comment - Looking at the patch, it hard-codes the log output in the original error report. That's only one of many things that can go wrong during a release. The problem is that you have to look at the log file to find out what really happened. We need to somehow capture the actual output from the forked process that executes the release, and display that instead. Also, there's some noise in the patch – looks like some inadvertent whitespace changes.
Hide
Maria Catherine Tan added a comment -

fixed in rev 735960

Show
Maria Catherine Tan added a comment - fixed in rev 735960

People

Vote (3)
Watch (2)

Dates

  • Created:
    Updated:
    Resolved: