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.


Please sign in to leave a comment.