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)
In ejb module filtering option in pom.xml is following:
<resources> <resource> <directory>src/main/resources</directory> <filtering>true</filtering> <includes> <include>**/*.xml</include> </includes> </resource> </resources>
and in ear module i'm using built-in filtering tag in maven ear plugin:
<plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-ear-plugin</artifactId> <version>2.8</version> <configuration> <filtering>true</filtering> ... </configuration> </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.
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?