You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Sylwester Lachiewicz (Jira)" <ji...@apache.org> on 2021/12/06 16:22:00 UTC
[jira] [Commented] (MRESOURCES-265) Resource copying not using specified encoding
[ https://issues.apache.org/jira/browse/MRESOURCES-265?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17454119#comment-17454119 ]
Sylwester Lachiewicz commented on MRESOURCES-265:
-------------------------------------------------
Please try with updated maven-filtering dependency - should be fixed now
{{ <groupId>org.apache.maven.plugins</groupId>}}
{{ <artifactId>maven-resources-plugin</artifactId>}}
{{ <version>3.2.0</version>}}
{{ <dependencies>}}
{{ <dependency>}}
{{ <groupId>org.apache.maven.shared</groupId>}}
{{ <artifactId>maven-filtering</artifactId>}}
{{ <version>3.3.0-SNAPSHOT</version>}}
{{ </dependency>}}
{{ </dependencies>}}
[Edit|https://issues.apache.org/jira/secure/EditComment!default.jspa?id=13337258&commentId=17454108] [Delete|https://issues.apache.org/jira/secure/DeleteComment!default.jspa?id=13337258&commentId=17454108]
> Resource copying not using specified encoding
> ---------------------------------------------
>
> Key: MRESOURCES-265
> URL: https://issues.apache.org/jira/browse/MRESOURCES-265
> Project: Maven Resources Plugin
> Issue Type: Bug
> Components: copy
> Affects Versions: 3.2.0
> Environment: Linux, CentOS 7
> Jenkins 2.251
> Jenkins Maven Integration plugin 3.1.2
> Java 1.8
> Reporter: Duncan Kinnear
> Priority: Major
>
> Overnight our Jenkins builds stopped working. On investigation we found that maven-resources-plugin version used yesterday was 3.1.0 (which worked fine) and today it was using 3.2.0.
> The stacktrace produced by adding the "e" switch to the maven command line had the following root cause (truncated for brevity):-
> Caused by: java.nio.charset.MalformedInputException: Input length = 1
> at java.nio.charset.CoderResult.throwException (CoderResult.java:281)
> at sun.nio.cs.StreamDecoder.implRead (StreamDecoder.java:339)
> at sun.nio.cs.StreamDecoder.read (StreamDecoder.java:178)
> at java.io.InputStreamReader.read (InputStreamReader.java:184)
> at java.io.BufferedReader.read1 (BufferedReader.java:210)
> at java.io.BufferedReader.read (BufferedReader.java:286)
> at java.io.BufferedReader.fill (BufferedReader.java:161)
> at java.io.BufferedReader.read (BufferedReader.java:182)
> at org.apache.maven.shared.filtering.BoundedReader.read (BoundedReader.java:85)
> at org.apache.maven.shared.filtering.MultiDelimiterInterpolatorFilterReaderLineEnding.read (MultiDelimiterInterpolatorFilterReaderLineEnding.java:235)
> at org.apache.maven.shared.filtering.MultiDelimiterInterpolatorFilterReaderLineEnding.read (MultiDelimiterInterpolatorFilterReaderLineEnding.java:197)
> at java.io.Reader.read (Reader.java:140)
> at org.apache.maven.shared.utils.io.IOUtil.copy (IOUtil.java:199)
>
> After a google search told us this was an encoding issue, we added the following to the maven command line, but this made no difference:
> -Dproject.build.sourceEncoding=UTF-8 -Dproject.reporting.outputEncoding=UTF-8
>
> The maven build log has these info messsage just before the error:
> [INFO] — maven-resources-plugin:3.2.0:resources (default-cli) @ uniworks —
> [INFO] Using 'UTF-8' encoding to copy filtered resources.
> [INFO] Using 'UTF-8' encoding to copy filtered properties files.
> [INFO] Copying 430 resources
> We only 'fixed' the problem by specifying version 3.1.0 of the plugin in the projects POM 'pluginManagement' section.
--
This message was sent by Atlassian Jira
(v8.20.1#820001)