Skip to content

Commit 534d2c8

Browse files
committed
[Build] Remove unnecessary resources-plugin executions and set encoding
Java properties files are encoded using ISO-8859-1 encoding. Therefore, when filtered by the maven-resources-plugin, these files should be written with that encoding. Explicit specifying the encoding also prevents the following INFO log ''' The encoding used to copy filtered properties files has not been set. This means that the same encoding will be used to copy filtered properties files as when copying other filtered resources. This might not be what you want! Run your build with --debug to see which files might be affected. Read more at https://maven.apache.org/plugins/maven-resources-plugin/examples/filtering-properties-files.html '''
1 parent 15ac2fa commit 534d2c8

2 files changed

Lines changed: 5 additions & 20 deletions

File tree

eclipse-platform-parent/pom.xml

Lines changed: 5 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -277,18 +277,12 @@
277277
<artifactId>maven-resources-plugin</artifactId>
278278
<executions>
279279
<execution>
280-
<id>filter-resources</id>
280+
<id>saveproperties</id>
281281
<goals>
282-
<goal>resources</goal>
282+
<goal>copy-resources</goal>
283283
</goals>
284284
<phase>process-resources</phase>
285-
<configuration>
286-
<outputDirectory>${project.build.directory}/resources</outputDirectory>
287-
<escapeString>\</escapeString>
288-
</configuration>
289-
</execution>
290-
<execution>
291-
<id>saveproperties</id>
285+
<inherited>false</inherited>
292286
<configuration>
293287
<outputDirectory>${project.build.directory}</outputDirectory>
294288
<changeDetection>always</changeDetection>
@@ -298,11 +292,8 @@
298292
<filtering>true</filtering>
299293
</resource>
300294
</resources>
295+
<propertiesEncoding>ISO-8859-1</propertiesEncoding><!-- Default encoding for Java properties files-->
301296
</configuration>
302-
<phase>validate</phase>
303-
<goals>
304-
<goal>copy-resources</goal>
305-
</goals>
306297
</execution>
307298
</executions>
308299
</plugin>
@@ -990,6 +981,7 @@
990981
<filtering>true</filtering>
991982
</resource>
992983
</resources>
984+
<propertiesEncoding>ISO-8859-1</propertiesEncoding><!-- Default encoding for Java properties files-->
993985
</configuration>
994986
<goals>
995987
<goal>copy-resources</goal>

products/eclipse-junit-tests/pom.xml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,6 @@
3232
<build>
3333
<finalName>${project.artifactId}</finalName>
3434

35-
<resources>
36-
<resource>
37-
<directory>src/main/resources</directory>
38-
<filtering>true</filtering>
39-
</resource>
40-
</resources>
41-
4235
<pluginManagement>
4336
<plugins>
4437
<plugin>

0 commit comments

Comments
 (0)