Я пытаюсь добавить некоторую фильтрацию в файл контекста приложения, который находится в каталоге WEB-INF.
У меня есть файл, который нужно отфильтровать (xmlgateway-context.xml) в папке /src/main/resources.
У меня есть файлы свойств (config-e05.properties) в папке src/main/filters
И у меня POM настроено следующим образом:
<!-- environment profiles -->
<profiles>
<profile>
<id>e04</id>
<properties>
<targetenv>e04</targetenv>
</properties>
</profile>
<profile>
<id>e05</id>
<properties>
<targetenv>e05</targetenv>
</properties>
</profile>
</profiles>
<!-- build settings (filtering) -->
<build>
<filters>
<filter>src/main/filters/config-${targetenv}.properties</filter>
</filters>
<resources>
<resource>
<targetPath>WEB-INF</targetPath>
<filtering>true</filtering>
<directory>src/main/resources</directory>
</resource>
</resources>
</build>
Это будет корректно установлено mvn, но когда я открою выходной файл войны, я ожидал, что файл xmlgateway-context.xml будет в каталоге /WEB -INF, но он попадает в папку/WEB-INF/классы/WEB-INF.
Как я могу получить этот файл в нужном месте.
В качестве альтернативы, я могу помещать контекст приложения в другое место и ссылаться на него там.