Fork me on GitHub

Check project dependencies checksums

This configuration will check the summary file checksum digest against the checksums of the project dependencies:

<project>
  ...
  <build>
    <plugins>
      <plugin>
        <groupId>net.nicoulaj.maven.plugins</groupId>
        <artifactId>checksum-maven-plugin</artifactId>
        <version>1.8</version>
        <executions>
          <execution>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <csvSummaryFile>dependencies-checksums.csv</csvSummaryFile>
        </configuration>
      </plugin>
      ...
    </plugins>
  </build>
  ...
</project>

Filtering by scopes and types

Dependencies can be filtered by scope and type:

<project>
  ...
  <build>
    <plugins>
      <plugin>
        <groupId>net.nicoulaj.maven.plugins</groupId>
        <artifactId>checksum-maven-plugin</artifactId>
        <version>1.8</version>
        <executions>
          <execution>
            <goals>
              <goal>check</goal>
            </goals>
          </execution>
        </executions>
        <configuration>
          <scopes>
            <scope>compile</scope>
          </scopes>
          <types>
            <type>jar</type>
          </types>
		  <csvSummaryFile>dependencies-checksums.csv</csvSummaryFile>
        </configuration>
      </plugin>
      ...
    </plugins>
  </build>
  ...
</project>