[ 
http://jira.codehaus.org/browse/MOJO-1311?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=169032#action_169032
 ] 

Marco Sandrini commented on MOJO-1311:
--------------------------------------

It actually works for me:

here is a snippet of the pom file:

        <plugin>
                        <groupId>org.codehaus.mojo</groupId>
                        <artifactId>buildnumber-maven-plugin</artifactId>
                        <version>1.0-beta-2</version>
                        <executions>
                                <execution>
                                        <id>buildnumber-create</id>
                                        <phase>validate</phase>
                                                <goals>
                                                <goal>create</goal>
                                                </goals>
                                        <configuration>
                                                
<revisionOnScmFailure>no_revision</revisionOnScmFailure>
                                        </configuration>
                                </execution>
     </plugin>

and here is the output during the build (in order to make SVN fail I ran this 
in a directory where there is no .svn subfolder)

[INFO] [buildnumber:create {execution: buildnumber-create}]
[INFO] Checking for local modifications: skipped.
[INFO] Updating project files from SCM: skipped.
Provider message:
The svn command failed.
Command output:
svn: '.' is not a working copy

[WARNING] Cannot get the revision information from the scm repository, 
proceeding with revision of no_revision :
Error!
[INFO] Storing buildNumber: no_revision at timestamp: 1236848923105



> Can't set properties from Maven: revisionOnScmFailure
> -----------------------------------------------------
>
>                 Key: MOJO-1311
>                 URL: http://jira.codehaus.org/browse/MOJO-1311
>             Project: Mojo
>          Issue Type: Bug
>          Components: buildnumber
>         Environment: Affects version 1.0-beta-2
>            Reporter: Sander Verhagen
>
> Some properties/parameters of the build mojo are not getting their values 
> from Maven. I tried both command line and plugin configuration in the POM. I 
> also tried to patch it, and I definitely think that the following is wrong:
>     /**
>      * Setting this value allows the build to continue even in the event of 
> an SCM failure.  The value set will be
>      * used as the revision string in the event of a failure to retrieve the 
> revision it from the SCM.
>      * 
>      * @parameter
>      * @since 1.0-beta-2
>      */
>     private String revisionOnScmFailure;
> It should be something like the following:
>     /**
>      * Setting this value allows the build to continue even in the event of 
> an SCM failure.  The value set will be
>      * used as the revision string in the event of a failure to retrieve the 
> revision it from the SCM.
>      * 
>      * @parameter expression="${revisionOnScmFailure}"
>      * @since 1.0-beta-2
>      */
>     private String revisionOnScmFailure;
> There are more props that have their "expression=..." missing. I only focused 
> my investigation onto revisionOnScmFailure and I am confident that it is 
> wrong this way.
> Unit tests in the project do test this property, though they inject it 
> directly in a Java object. The @parameter annotations are untested that way.

-- 
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 from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to