You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by "Dennis Lundberg (JIRA)" <ji...@codehaus.org> on 2006/01/14 00:11:01 UTC

[jira] Commented: (MPSCM-63) If project.xml can't be edited (e.g. read only), prepare-release goal still succeeds

    [ http://jira.codehaus.org/browse/MPSCM-63?page=comments#action_55757 ] 

Dennis Lundberg commented on MPSCM-63:
--------------------------------------

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?

> If project.xml can't be edited (e.g. read only), prepare-release goal still succeeds
> ------------------------------------------------------------------------------------
>
>          Key: MPSCM-63
>          URL: http://jira.codehaus.org/browse/MPSCM-63
>      Project: maven-scm-plugin
>         Type: Bug

>     Versions: 1.4.1
>     Reporter: David Jackman

>
>
> 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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org