Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable up-to-date checking in Maven plugin by default #1621

Merged

Commits on Mar 12, 2023

  1. Enable up-to-date checking in Maven plugin by default

    Up-to-date checking has been supported for a long time. We haven't received any
    negative feedback about it. Neo4j is an example project that has up-to-date
    checking enabled to improve performance and haven't had problems with it:
    https://github.com/neo4j/neo4j/blob/6ebc409772cea13354adb6a11aab4ed38da9d53e/pom.xml#L745-L747.
    
    It should be safe to enable up-to-date checking for all users of the Spotless Maven plugin.
    
    This commit also fixes the problem where plugin execution would fail on a parent of a multimodule
    Maven project with up-to-date checking enabled. A parent project can configure Spotless as:
    
    ```xml
    <build>
      <pluginManagement>
        <plugins>
          <plugin>
            <groupId>com.diffplug.spotless</groupId>
            <artifactId>spotless-maven-plugin</artifactId>
            ...
          </plugin>
        </plugins>
      </pluginManagement>
    </build>
    ```
    
    It allows child projects to inherit plugin's version and configuration but the
    plugin is not enables by default.
    
    PluginFingerprint did not handle such configuration correctly. It could only handle a simple
    configuration like:
    
    ```xml
    <build>
      <plugins>
        <plugin>
          <groupId>com.diffplug.spotless</groupId>
          <artifactId>spotless-maven-plugin</artifactId>
          ...
        </plugin>
      </plugins>
    </build>
    ```
    
    And failed with "Spotless plugin absent from the project" error for a multimodule
    parent project with Spotless in `<pluginManagement>`.
    lutovich committed Mar 12, 2023
    Configuration menu
    Copy the full SHA
    24abb54 View commit details
    Browse the repository at this point in the history