0

We had been having problems trying to run a mvn -X -e clean package on our project workspace and it was producing this error:

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources (default-resources) on project eWell-web: Input length = 1 -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-resources-plugin:3.2.0:resources **(default-resources)** on project eWell-web: Input length = 1

I highlighted the important part as that helped us isolate the issue. Evidently, from reading other articles, we determined that there was some extraneous character in a file in the default-resources path. In our case, this is src/main/resouces.

The bad file had a message that ended with:

location restrictions in � 3215.

those characters are 0xEF, 0xBF, 0xBD

This displayed in the text editor as: location restrictions in � 3215.

How were we supposed to fix this?

Leviand
  • 2,745
  • 4
  • 29
  • 43
user1955401
  • 91
  • 1
  • 2
  • 8

1 Answers1

0

We opened up each of the files in NotePad++ which has an encoding menu option and examined them. One of the files, called messages.properties, was not UTF-8 encoded. We converted it to UTF-8 and then ran a compare against the two files.

In terms of display, this now displays as a paragraph marker: location restrictions in § 3215.

which is 0xC2, 0xA7

And the maven command ran fine again.

This is similar to the thread here: Maven Clean Install Failed to Execute Goal, and there are a lot of answers there that simply put us on a wild goose chase. The two most useful answers were:

Invalid characters can cause problems. Wrong encoding in properties files vs Maven (ANSI vs UTF-8)

user1955401
  • 91
  • 1
  • 2
  • 8