Maven ear plugin filtering problem

I have multimodule maven project (root, ear, ejb, web and java) with glassfish. And i'm trying to use filtering for deployment descriptors.

Project structure (here is only files where i'm trying to apply filtering option)

  • root
    • ear
      • src/main/application/META-INF/glassfish-resources.xml
    • ejb
      • src/main/resources/META-INF/persistence.xml
    • java
    • web

In ejb module filtering option in pom.xml is following:


and in ear module i'm using built-in filtering tag in maven ear plugin:


So the problem is when i compiling project via maven - filtering works great for both modules, but when i run it via Intellij Idea (build 129.451) - persistence.xml (ejb module) filters great, but glassfish-resources.xml (ear module) don't.

I've figured out that problem in ear-exploded artifact (ear module) - in javaeeapplication facet there is no deployment descriptor glassfish-resources.xml, only application.xml. But i can't add glassfish-resources.xml to javaeeapplication facet as non-static file.

Comment actions Permalink

Looks like it is the same issue. But there is another plugin in issue - maven war plugin. Should i create another one issue, or there is no need?

Also i've tried to enable filtering via resources tag and manually specify folder. But it doesn't work in both cases (maven and idea).

As i understand it is impossible to filter resources (via idea) in maven ear/war plugin at this moment?

Comment actions Permalink

Yes, create another issue, please.
Yes, it's impossible to to filter resources ear/war plugin now.


Please sign in to leave a comment.