Maven 3 resource filtering weirdness

Maven 3 is all nice and fast(er) and shiny, so I decided to upgrade a Maven 2 project to Maven 3. It (cl)aims to be backwards-compatible, so my consternation was pretty great when my build failed straight away. That’s to say, my tests failed. For some reason, my resources were no longer being filtered. Yup, ${property.keys} weren’t being replaced by values.

This struck me as being somewhat odd, because it worked fine with 2.2.1. A bit of debugging led me to the cause of the problem:

<!-- @Transactional can now be used as well -->

… apparently, the @ symbol is an escape character of sorts.

Considering that blurb on their website doesn’t even qualify as English, I’m not sure if this is a feature or a bug. But whatever. Removing that comment fixed the problem. Whoever came up with that bright idea (especially in an age where @annotations are as rampant as the black plague in the 14th century) probably deserves a spanking.

One Reply to “Maven 3 resource filtering weirdness”

  1. Thanks so much for posting this. Helped us figure out the exact same resource-filtering issue. This has got to be a bug or something… they should at least spit out a warning message when they see the @ sign and it’s not being used as a token delimiter. LOL… and you’re right, what kind of language is that for the explanation of the @ sign???? Goodness… their docs suck for that one.

Leave a Reply

Your email address will not be published. Required fields are marked *