How to generate and upload checksums with maven deploy plugin 3.0.0-M1?

3k views Asked by At

The feature to generate checksums seems to have moved from install to deploy plugin (see MDEPLOY-231). There seems to be no parameter to control the generation and the deployment of checksums any more, neither in install plugin 3.0.0-M1 (the "createChecksum" parameter apparently doesn't exist any more), nor in deploy plugin 3.0.0-M1.

I was assuming checksums would be activated by default now (see this blog post), but I end up without any checksum neither in my local repo nor in Artifactory and I cannot see anything checksum-related in the logs (running mvn deploy).

It shouldn't be important, but maybe it is: I am using https transport, not ssh.

Here a log excerpt:

[INFO] --- maven-install-plugin:3.0.0-M1:install (default-install) @ base-module ---

[INFO] Installing C:\data\src\s-libs\base\target\base-module-0.2.5-SNAPSHOT.jar to (...)
[INFO] Installing C:\data\src\s-libs\base\pom.xml to (...)
[INFO] Installing C:\data\src\s-libs\base\target\base-module-0.2.5-SNAPSHOT-sources.jar to (...)
[INFO] 
[INFO] --- maven-deploy-plugin:3.0.0-M1:deploy (default-deploy) @ base-module ---
Downloading (...)
Uploading to psys_mvn: https://psys.ex1.de/artifactory/psys_mvn/de/ex1/psys/base-module/0.2.5-SNAPSHOT/base-module-0.2.5-20200311.190843-3.jar
(...)
Uploading to psys_mvn: https://psys.ex1.de/artifactory/psys_mvn/de/ex1/psys/base-module/0.2.5-SNAPSHOT/base-module-0.2.5-20200311.190843-3.pom
(...)
Uploading to psys_mvn: https://psys.ex1.de/artifactory/psys_mvn/de/ex1/psys/base-module/0.2.5-SNAPSHOT/base-module-0.2.5-20200311.190843-3-sources.jar
(...)
Uploading to psys_mvn: https://psys.ex1.de/artifactory/psys_mvn/de/ex1/psys/base-module/0.2.5-SNAPSHOT/maven-metadata.xml
(...)
Uploading to psys_mvn: https://psys.ex1.de/artifactory/psys_mvn/de/ex1/psys/base-module/maven-metadata.xml
(...)
1

There are 1 answers

3
khmarbaise On

The parameter createChecksum has been removed and is documented on this page: https://maven.apache.org/plugins/maven-install-plugin/index.html furthermore only during mvn deploy the checksums will be created and uploaded to remote repository. Checksums are activated automatically. There is no other action needed. If you use mvn clean deploy the checksum must be in your local repository $HOME/.m2/repository like this:

total 72
drwxr-xr-x  11 khmarbaise  staff   352 Mar 11 19:01 .
drwxr-xr-x   7 khmarbaise  staff   224 Mar 11 19:01 ..
-rw-r--r--   1 khmarbaise  staff   196 Mar 11 19:01 _remote.repositories
-rw-r--r--   1 khmarbaise  staff   698 Mar 11 19:01 maven-metadata-local.xml
-rw-r--r--   1 khmarbaise  staff   762 Mar 11 19:01 maven-metadata-snapshots.xml
-rw-r--r--   1 khmarbaise  staff    40 Mar 11 19:01 maven-metadata-snapshots.xml.sha1
-rw-r--r--   1 khmarbaise  staff   195 Mar 11 19:01 resolver-status.properties
-rw-r--r--   1 khmarbaise  staff  2185 Mar 11 19:01 sample-0.0.1-SNAPSHOT.jar
-rw-r--r--   1 khmarbaise  staff    32 Mar 11 19:01 sample-0.0.1-SNAPSHOT.jar.md5
-rw-r--r--   1 khmarbaise  staff    40 Mar 11 19:01 sample-0.0.1-SNAPSHOT.jar.sha1
-rw-r--r--   1 khmarbaise  staff  2149 Mar 11 18:55 sample-0.0.1-SNAPSHOT.pom

The upload shown in the picture is from a Nexus repository manager.

Uploaded data with checksume