Maven filtering does ignores plugins that provide properties


We use the maven-buildnumber-plugin [1] to retrieve the svn revision and the current timestamp so we can store that information in a .properties file.

This works for maven when executed on the command line but once we execute a JUnit test the filtered file is written again but the properties from the buildnumber plugin are not replaced. I've created a small project to demonstrate this. You may need to add it to SVN and fix the developerConnection in pom.xml (a svn command must be available in you PATH as well).

When I execute compile as maven goal in intellij the file look ok (the JUnit Test works).
If I run the JUnit Test it fails (the filtered file is no longer correct)

I've tried to select a different phase for the make command in the intellij settings, but the only thing working was to execute mvn comile before running the JUnit test. But I have to do this for every run configuration.

Is there some magic setting i'm missing?


1 comment
Comment actions Permalink

I'm seeing this as well. Did you ever figure out a workaround?


Please sign in to leave a comment.