Wrong checksums when uploading to S3 repo with maven-publish plugin

When uploading to S3 repo with the maven-publish plugin I seem to consitently get wrong checksums on the jars. Both md5 & sha1 checksums are incorrect. The poms get correct checksums.

However, if I change and publish to local directory instead, the checksums are correct. I’m using gradle 2.4.

@Steinar_Haugen Do you have a Gradle build or Github repo you can share which reproduces this issue?

I’ve verified the checksums using a simple Gradle build which publishes to both a local repository manager (Artifactory) and Amazon S3. All of the checksums lined up with the locally generated ones.

You could also try publishing to a local install of Artifactory as it will actually report errors in Artifactory’s system logs if the uploaded checksums are incorrect.

@Adrian_Kelly This turned out to be a freaky bug that was harder to reproduce than I originally thought. For the checksums uploaded to Amazon S3 to be incorrect, it turned out that a few AST transform source files must be included. I stripped it down as far as I could.

Add the three files from the following gist (one groovy, two java) to their correct source locations. Add dependency to your gradle file: ‘org.codehaus.groovy:groovy-all:2.4.3’

That should reproduce the problem.

@Steinar_Haugen thank you for taking the time to dig in to this!

I was able to reproduce the issue with a simple project using the conditions you identified. I have opened an issue for this and hopefully we can address it soon.

@Steinar_Haugen this has been resolved and you can try it out with the nightly build.

This will be released with Gradle version 2.5.

@Adrian_Kelly thank you for the quick resolve.

I can confirm that the nightly build produce correct checksums in all my projects.