Caused by: org.apache.maven.plugin.MojoExecutionException: The following files had format violations: features\karaf\openhab-core\src\main\feature\feature.xml
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.
- Platform information:
- Hardware: Alienware
- OS: Windows 11
- java version: “11.0.15” 2022-04-19 LTS
- maven: Apache Maven 3.8.5
- openHAB version: GitHub - openhab/openhab-core: Core framework of openHAB branch: main
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:
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.