Red Hat Bugzilla – Bug 1007894
Not much friendly maven error message appears when there is some problem with project (e.g. with dependencies)
Last modified: 2015-12-10 05:55:14 EST
Description of problem:
Look at the screen shot. This error message provides no help to user without knowledge what is maven, pom.xml and how it works. It says what's wrong in pom.xml - which is some file the user shouldn't have to know it's connected with this screen. And it's very easy to get this error, see the following steps.
steps to reproduce:
1. open any project
2. navigate to Project Screen -> dependencies
3. add dependency (custom one, not from repository)
4. fill in only artifactId
5. save, build & deploy
Radovan, I think it is missing the screenshot attachment?
Internal Whiteboard: Beta Blocker → Blocker
Not critical for Beta, but need to address for GA
Created attachment 798655 [details]
Sorry Edson, I forgot to attach it.
Fixed. Basically two changes are performed:
1.- Depedency fields (groupId artifactId, versionID) are now mandatory.
2.- Adding a non existing dependecy produces a friendly error in the user console, no exception is thrown to the client.
Commits to master
Commits to 6.0.x
Created attachment 812857 [details]
fix performed: example of friendly error in the user console
I am afraid that what I got by simply following the steps to reproduce from the description of this issue does not look like the user friendly error message in Problems panel, but more like the same error screen as originally reported. A new screen shot attached.
Created attachment 832715 [details]
second screen shot
No error can be created for any possible unexpected condition. The only way to reduce this is make sure the UI validates most of the possible outcomes, but the latest resort will always print the underlying exception, since it's the only available piece of information.
@Radovan: Agree, it's still happening :S
@Pedro: Agree, the UI was improved and fields cannot be empty. But you can add a GAV into the project pointing to an artifact that does not exist. Then, the UI will pass validations (as the fields are not empty), but when the server side compiles the project then it throws an exception to the client. This exception cannot be more friendly as it's important to show to the user the root cause, but it should not appear as an error popup screen, it should appear in Problems section.
Further work on this ticket, if any, is postponed to 6.0.1.
Fixed in master branch only, as this issue does not have the bloquer+ flag.
The fix is based on catching maven build exceptions and build an instance of BuildMessages on the fly with the exception details information. Then, the exception is not shown in a popup, it's displayed in problems widget.
Commit in master -> https://github.com/droolsjbpm/guvnor/commit/8fd816e118ba64d0b9f268f34ae69f61895b5df0
Please notice that the doc text provided applies to 6.0.1, as this issue is not fixed for 6.0.0 and therefore it's known issue for 6.0.0, not bug fix. Removing Fix and Result from 6.0.0 release notes should be sufficient.
Commit on 6.0.x:
Verified with BRMS-6.0.1.ER1