Friday 13 February 2009

How to add a svnlog to artifact

<!-- this puts a xml file with svn log info in the ear -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.1</version>
<executions>
<execution>
<goals>
<goal>exec</goal>
</goals>
<phase>validate</phase>
</execution>
</executions>
<configuration>
<executable>svn</executable>
<commandlineArgs>log --xml -r{`date %Y-%m-%d -d '2 months ago'`}:HEAD</commandlineArgs>
<skip>${skipSvnLog}</skip>
<workingDirectory>${basedir}/../..</workingDirectory>
<outputFile>${project.build.directory}/${project.build.finalName}/svnlog.xml</outputFile>
</configuration>
</plugin>