Hi,

TL;DR 

The <attachChecksums> option makes a subsequent maven-install-plugin install put
all the correctly generated, different checksum artifacts into the same
destination, overlaying all of them.  Example:

[INFO] Installing
   ...                       
\parent-pom\target\parent-pom-12-SNAPSHOT-source-release.zip.sha512
to ...\.m2\repository\...\parent-pom\12-SNAPSHOT\parent-pom-12-SNAPSHOT.sha512
[INFO] Installing
   ...                        
\parent-pom\target\parent-pom-12-SNAPSHOT.pom.sha512
to ...\.m2\repository\...\parent-pom\12-SNAPSHOT\parent-pom-12-SNAPSHOT.sha512

You can see the maven-install-plugin copies the 2nd checksum file with exactly
the same name in the .m2 as the first, and overlays it.

The problem is likely the <attachChecksums>true</attachChecksums> isn't 
including
the full artifact name (e.g. xxx-source-release) and the packaging type (e.g.
".jar", or ".zip", etc)


More detail: I'm trying to use this to generate checksums for a project which 
has

- a pom.xml
- a source-release.zip
- a source-release.jar
- a <projectName>.jar

etc.

When I configure this and specify the fileSets, my directory (except for the
POM) is the project "build" directory, and the FileSets  <include> specify the
artifacts.

(I'm using goal = "files").

I'm wanting these to be attached, to go into my .m2 repository, so I specify
<attachChecksums>true</attachChecksums>.
This gives output while running indicating it's finding the sources and running
on the various artifacts, producing checksums.

It actually generates the properly named files in the project's target 
directory.

But - my .m2 gets updated with just 1 checksum file, with 1 checksum, with the 
name

<project-name>-<version>.sha512  (I'm using the SHA-512 algorithm).  I expected
<artifact-name-including-packaging>.sha512, for example:

myProj-2.10.3-SNAPSHOT.jar.sha512
pom.xml.sha512

etc.

Am I doing some incorrect configuration? Is this a known issue?  Is there a
workaround?

Thanks.  -Marshall

Reply via email to