Karaf build failure

Caused by: org.apache.maven.plugin.MojoExecutionException: The following files had format violations:

This post of yours has zero information.
Please read the „Howto ask a good question“ post and provide as most as possible information with your question.

mvn clean install -DskipTests -DskipChecks=true -e

Same thing for openhab-core 3.2.x

GitHub main branch and 3.2.x branch point to same code.

Switched branch. Now using 3.2.1-SNAPSHOT

Same error with 3.2.1-SNAPSHOT

[ERROR] Failed to execute goal com.diffplug.spotless:spotless-maven-plugin:2.0.3:check (codestyle_check) on project org.openhab.core.features.karaf.openhab-tp: The following files had format violations:
[ERROR] src\main\feature\feature.xml

Building on windows is a bit difficult and requires special git configuration due to the line endings. IIRC for me it worked to set

git config --global core.autocrlf true
git config --local core.eol crlf

I believe the first setting is the standard setting.

Thank you very much. That worked!

In some cases spotless:apply can fix some of troubles as well. It does complain by default but it is also able to recover basic mistakes. Not sure about line endings, but in general it is able to format files.

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.