How do I create a checksum in Maven, then output it to a text file?

Continuing to learn to use Maven

and I was wondering if there is a way to do checksum

in the generated file WAR

.

The target Maven

is package

and I am trying to get the value checksum

(of the zipped file WAR

) put in a text file along with the zipped file.

Thanks in advance!

+3


source to share


1 answer


Worked with the below code pom

and changed my target Maven

toverify



<dependency>
    ...
    <!-- CheckSum -->
    <dependency>
      <groupId>net.ju-n.maven.plugins</groupId>
      <artifactId>checksum-maven-plugin</artifactId>
      <version>1.2</version>
      <exclusions>
          <exclusion>
            <groupId>org.bouncycastle</groupId>
            <artifactId>bcprov-jdk15on</artifactId>
          </exclusion>
        </exclusions>
    </dependency>
    <dependency>
        <groupId>org.bouncycastle</groupId>
        <artifactId>bcprov-jdk15on</artifactId>
        <version>1.51</version>
    </dependency>
</dependencies>

<plugins>
    ...
    <plugin>
        <groupId>net.ju-n.maven.plugins</groupId>
        <artifactId>checksum-maven-plugin</artifactId>
        <version>1.2</version>
        <executions>
            <execution>
                <goals>
                  <goal>artifacts</goal>
                </goals>
            </execution>
        </executions>
        <configuration>
            <fileSets>
                <fileSet>
                    <includes>
                      <include>**/*.war</include>
                    </includes>
                </fileSet>
            </fileSets>
            <csvSummary>true</csvSummary>
            <csvSummaryFile>IRIDDS-checksums.csv</csvSummaryFile>
        </configuration>
        <dependencies>
            <dependency>
                <groupId>org.bouncycastle</groupId>
                <artifactId>bcprov-jdk15on</artifactId>
                <version>1.51</version>
            </dependency>
        </dependencies>
    </plugin>
</plugins>

      

+3


source







All Articles