Error in setting up ODK sync-endpoint

I have been following this documentation :https://docs.opendatakit.org/odk2/sync-endpoint/#odk-sync-endpoint-setup.
I am getting following errors while running mvn clean install.

@linl33 might have a better answer but it looks like the tests are failing for some reason. I would try skipping the tests with this command (instead of the one you used):
mvn -Dmaven.test.skip=true install

I agree with Jeff, skipping the tests is probably your best bet.

I had the same issue - it turned out to be a problem with line endings because my Git (on Windows) had autoreplaced LF with CRLF. Changing back from CRLF to LF made the tests pass.

If you skipTests as suggested the system image may not be built correctly. @Emil correctly points out a common problem of formatting. It is important to get the formatting correct when building the image otherwise you sync-endpoint docker image may fail to load properly and continually reset as it gets an error during the boot phase.

There was some updates to improve building.