Ekryd / sortpom

Maven plugin that helps the user sort pom.xml.
https://github.com/Ekryd/sortpom/wiki/
BSD 3-Clause "New" or "Revised" License
334 stars 178 forks source link

Preserve 3.3.x method signature #426

Closed mches closed 4 months ago

mches commented 4 months ago

Restores a 3.3.x method signature to preserve compatibility with the current version of Spotless

Ekryd commented 4 months ago

🤔 Do you need this? Can't you use an earlier version of SortPom until the method can be migrated? The reason is that it will make further development of the Plugin much harder if I have to maintain backwards compatibility with something that has a different lifecycle (also that I don't keep track of myself) .

mches commented 4 months ago

If this were merged and released I could upgrade to the latest version and remove workarounds, but it's not as though I'm stuck. I can appreciate why you wouldn't want to go to the trouble when we know the eventual Spotless release will alleviate the problem.

Ekryd commented 4 months ago

FYI, some sidetracking. I was delaying a new major version for this PR: https://github.com/Ekryd/sortpom/pull/429 I thought that I wanted to change both the schemaLocation setting and the spaces at the same time. Feel free to check it out

mches commented 4 months ago

I had a look and that should work. I don't think I would use indentAttributes=all myself. I find myself wanting to break and indent properties with long names or values, like sonar properties. I'm achieving that right now with regex replacement.

    <sonar.coverage.jacoco.xmlReportPaths>
      ${maven.multiModuleProjectDirectory}/markitect-liquibase-coverage/target/site/jacoco-aggregate/jacoco.xml
    </sonar.coverage.jacoco.xmlReportPaths>
    <sonar.cpd.exclusions>
      src/main/java/dev/markitect/liquibase/change/CreateSchemaChange.java,
      src/main/java/dev/markitect/liquibase/change/DropSchemaChange.java,
      src/main/java/dev/markitect/liquibase/change/MarkitectInsertDataChangeMssql.java,
      src/main/java/dev/markitect/liquibase/change/MarkitectLoadDataChangeMssql.java,
      src/main/java/dev/markitect/liquibase/change/MarkitectLoadUpdateDataChangeMssql.java,
      src/main/java/dev/markitect/liquibase/database/h2/MarkitectH2Database.java,
      src/main/java/dev/markitect/liquibase/database/hsqldb/MarkitectHsqlDatabase.java,
      src/main/java/dev/markitect/liquibase/database/mssql/MarkitectMssqlDatabase.java,
      src/main/java/dev/markitect/liquibase/database/postgresql/MarkitectPostgresDatabase.java,
      src/main/java/dev/markitect/liquibase/precondition/CatalogExistsPrecondition.java,
      src/main/java/dev/markitect/liquibase/precondition/SchemaExistsPrecondition.java,
      src/main/java/dev/markitect/liquibase/sqlgenerator/MarkitectInsertOrUpdateGeneratorHsql.java,
      src/main/java/dev/markitect/liquibase/sqlgenerator/MarkitectInsertOrUpdateGeneratorPostgres.java,
      src/main/java/dev/markitect/liquibase/statement/CreateSchemaStatement.java,
      src/main/java/dev/markitect/liquibase/statement/DropSchemaStatement.java,
      src/main/java/dev/markitect/liquibase/statement/SchemaExistsStatement.java
    </sonar.cpd.exclusions>