Здравствуйте!
Пытаюсь выполнить подстановку констант через maven.
pom.xml:
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
52.
53.
54.
55.
56.
57.
58.
59.
60.
61.
62.
63.
64.
65.
66.
67.
68.
69.
70.
71.
72.
73.
74.
75.
76.
77.
78.
79.
80.
81.
82.
83.
84.
85.
86.
87.
88.
89.
90.
91.
92.
93.
94.
95.
96.
97.
98.
99.
100.
101.
102.
103.
104.
105.
106.
107.
108.
109.
110.
111.
112.
113.
114.
115.
116.
117.
118.
119.
120.
121.
122.
123.
124.
125.
126.
127.
128.
129.
130.
131.
132.
133.
134.
135.
136.
137.
138.
139.
140.
141.
142.
143.
144.
145.
146.
147.
148.
149.
150.
151.
152.
153.
154.
155.
156.
157.
158.
159.
160.
161.
162.
163.
164.
165.
166.
167.
168.
169.
170.
171.
172.
173.
174.
175.
176.
177.
178.
179.
180.
181.
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
<configuration>
<source>${target.jdk}</source>
<target>${target.jdk}</target>
<encoding>${project.build.sourceEncoding}</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>${gwt.version}</version>
<configuration>
<strict>true</strict>
<testTimeOut>180</testTimeOut>
<mode>htmlunit</mode>
<includes>**/*GwtTest.java</includes>
<logLevel>INFO</logLevel>
<extraJvmArgs>-Xmx2048m</extraJvmArgs>
<runTarget>index.html</runTarget>
<module>online.draughts.rus.Application_dev</module>
<draftCompile>true</draftCompile>
<sourceLevel>${maven.compiler.source}</sourceLevel>
<style>${gwt.style}</style>
<webappDirectory>
${project.basedir}/../../${project.artifacts.directory}/${project.devOutput.directory}
</webappDirectory>
</configuration>
<executions>
<execution>
<goals>
<goal>resources</goal>
<goal>compile</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.7</version>
<executions>
<execution>
<id>filter-sources</id>
<goals>
<goal>copy-resources</goal>
</goals>
<phase>validate</phase>
<configuration>
<outputDirectory>${project.build.directory}/gwt-extra</outputDirectory>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.9.1</version>
<executions>
<execution>
<id>add-source-gwt</id>
<phase>validate</phase>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>${project.build.directory}/gwt-extra</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<profiles>
<profile>
<id>dev</id>
<!-- The development profile is active by default -->
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<properties>
<!--
Specifies the build.profile.id property that must be equal than the name of
the directory that contains the profile specific configuration file.
Because the name of the directory that contains the configuration file of the
development profile is dev, we must set the value of the build.profile.id
property to dev.
-->
<build.profile.id>dev</build.profile.id>
</properties>
<build>
<filters>
<!--
Ensures that the config.properties file is always loaded from the
configuration directory of the active Maven profile.

-->
<filter>${project.basedir}/src/main/resources/online/draughts/rus/shared/config/profiles/${build.profile.id}/config.properties</filter>
</filters>
</build>
</profile>
<profile>
<id>release</id>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>gwt-maven-plugin</artifactId>
<version>${gwt.version}</version>
<configuration>
<strict>true</strict>
<logLevel>INFO</logLevel>
<runTarget>index.html</runTarget>
<module>online.draughts.rus.Application</module>
<draftCompile>false</draftCompile>
<sourceLevel>${maven.compiler.source}</sourceLevel>
<style>OBFUSCATED</style>
<outputDirectory>${outputDirectory}</outputDirectory>
<webappDirectory>
${project.basedir}/../../${project.artifacts.directory}/draughts_web_exploded.war
</webappDirectory>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>compile</goal>
<goal>resources</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
<filters>
<!--
Ensures that the config.properties file is always loaded from the
configuration directory of the active Maven profile.

-->
<filter>${project.basedir}/src/main/java/online/draughts/rus/shared/config/profiles/${build.profile.id}/config.properties</filter>
</filters>
</build>
<properties>
<!--
Specifies the build.profile.id property that must be equal than the name of
the directory that contains the profile specific configuration file.
Because the name of the directory that contains the configuration file of the
production profile is prod, we must set the value of the build.profile.id
property to prod.
-->
<build.profile.id>prod</build.profile.id>
</properties>
</profile>
</profiles>
Здесь я выполняю подстановку в файл ресурсов: ClientConfiguration.properties из файлов conf.properties, которые находятся в папке profiles.
При компиляции все успешно заменяется и я получаю файл ClientConfiguration.properties с правильными значениями, так же в выводе GWT подстановка выполняется и в js. Но при компиляции в браузере значения затираются теми, что в исходниках. Вопрос, как сделать так, чтобы gwt-maven-plugin брал ресурсы из target, где замена выполнена.
Нашел что-то про <resourcesOnPath>false</resourcesOnPath>, но такой конфигурации в этом плагине нет, или я не в том плагине прописывал?