I've been using this:

<plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>buildnumber-maven-plugin</artifactId>
        <version>1.0-beta-1</version>
        <executions>
                <execution>
                        <phase>validate</phase>
                        <goals>
                                <goal>create</goal>
                        </goals>
                </execution>
        </executions>
        <configuration>
                <doCheck>false</doCheck>
                <doUpdate>false</doUpdate>
        </configuration>
</plugin>

And in a resource properties file that's filtered:
scm.version=${buildNumber}

On 06/05/2009, at 1:20 AM, Allan Ditzel wrote:

Thanks Olivier!

That _almost_ does it. If I don't specify <format> and <items> then I see the correct revision printed on screen when the module builds. But I can't seem to find the right format and items to read the buildNumber in the file.

Here is what I have in my <configuration> block for the plugin:

<format>{0,number}</format>
<items><item>buildNumber</item></items>

And the file output is:

#maven.buildNumber.plugin properties file
#Tue May 05 11:16:55 EDT 2009
buildNumber=1

I know I have to be missing something rather simple here. Any thoughts?

Thanks again!

Allan

On Tue, May 5, 2009 at 10:24 AM, Olivier Lamy <ol...@apache.org> wrote:

Hi,
Have a look here : http://mojo.codehaus.org/buildnumber-maven-plugin/

HTH,
--
Olivier

2009/5/5 Allan Ditzel <allan.dit...@gmail.com>:
Hi all,

I'm trying to do the following:

We're using subversion and we need to extract the revision number of the
working copy and put that in a properties file. Is there an existing
plugin
available to do this? I looked at the documentation for the SCM plugin
and
it doesn't seem to quite fit the bill in order to do this.

Thanks!

Allan


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org



with regards,
--

Lachlan Deck




---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to