spotless
spotless copied to clipboard
Maven plugin has no `endWithNewLine` option
Summary
Maven plugin has no option endWithNewLine for sortPom in the current version (2.43.0) although README mentions it (link to the jar here).
I decopmpiled it and indeed, there is no such @Parameter in the SortPom class. The error after mvn spotless:apply:
[ERROR] Failed to execute goal com.diffplug.spotless:spotless-maven-plugin:2.43.0:apply (default-cli) on project foo: Unable to parse configuration of mojo com.diffplug.spotless:spotless-maven-plugin:2.43.0:apply for parameter endWithNewLine: Cannot find 'endWithNewLine' in class com.diffplug.spotless.maven.pom.SortPom -> [Help 1]
Maven version & Operating system version
mvn --version outputs
Apache Maven 3.9.5 (57804ffe001d7215b5e7bcb531cf83df38f93546)
Maven home: C:\Program Files\Maven\apache-maven-3.9.5
Java version: 17.0.8, vendor: Oracle Corporation, runtime: C:\Program Files\Java\jdk-17
Default locale: en_US, platform encoding: Cp1252
OS name: "windows 11", version: "10.0", arch: "amd64", family: "windows"
Spotless version
2.43.0
Spotless configuration
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<version>2.43.0</version>
<configuration>
<pom>
<sortPom>
<endWithNewLine>true</endWithNewLine>
</sortPom>
</pom>
</configuration>
</plugin>
Checklist
- [x] summary of problem
- [x] Gradle or Maven version
- [x] spotless version
- [x] operating system and version
- [x] copy-paste your full Spotless configuration block(s), and a link to a public git repo that reproduces the problem if possible
- [ ] copy-paste the full content of any console errors emitted by
gradlew spotless[Apply/Check] --stacktrace