maven integration of filtered resources

I have had no luck in getting this to work well and am hoping somebody has a solution to the problem I'm having.

Basically ever since I've started filtering resources I haven't been able to use intellij build functionality (which is way faster than maven for incremental changes). Basically since all resources specified in the pom.xml are set as src folders their contents is always copied into the classpath upon build. If you have any maven filtered resources in there you're going to have your going to have placeholders instead of final values in your classpath resources.

Also maven has exclude and include filtering upon defined resources that allows me to specificy stuff like /src/main/resources, /src/main/resources/dev, /src/main/resources/qa as separate resources and have their contents merged into the classpath dependent on a profile. The intellij build will just copy the entire contents of all base resource paths into the classpath removing this environment specific configuration strategy.

So one strategy I came up with was creating a separated environment specific resource folder called something like src/main/env-resources/.. with filtered files and env specific files and setting up maven to process these resources and output them into the src/main/resources folder. This works sort of, but since the env-resources folder is a resource it's set as a src and I have to unset it in the IDE any time there's a sync with the pom or else it'll copy the contents over to the classpath.

searches have provided very few results of people having intellij issues with this. Am I totally missing something or does intellij simply not properly support maven resources?


Filtered resources are not yet supported, the feature is in the short-term plans, though.
You may create a jira issue to track the progress.


thanks for the update.