Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 1.4.1
-
Fix Version/s: 1.6.1
-
Labels:None
-
Number of attachments :
Description
If the scm plugin can't edit the project.xml file, the prepare-release goal shows that the error happened (by showing a stack trace), but doesn't fail. It should fail with nothing changed in the source control repository.
Issue Links
- supercedes
-
MPSCM-37
can't change read-only project.xml
-
What is the correct way to handle this. I have found the source of the Exception in maven-release-plugin, but I'm unsure how to handle it. Here is the calling sequence:
maven-scm-plugin:
plugin.jelly goal prepare:release
maven-release-plugin:
plugin.jelly taglib definition release:transform
plugin.jelly tag definition release-version
transformer = new VersionTransformerTag
transformer.write()
AbstractPomTransformer.write()
The last method doesn't handle the fact that the output file might not be writable, so I added that check and throw an Exception with a suitable message. What kind of Exception should I throw so that it can be caught in the jelly script later on?
How do you handle handle exceptions in jelly? Can someone point me to another plugin that might do that.
Also how do you tell a target to fail?