Skip to content

Verify stage caches an empty directory for the main JAR #449

Description

@mensinda

Affected version

1.2.2

Bug description

When running mvn clean compile and mvn clean verify in that order, the cached main artifact (the JAR in the build-cache/v1.1) is a directory instead of a ZIP/JAR file.

drwxrwxr-x 2 d_mensinger d_mensinger  4096 Feb  4 09:51 maven-build-cache-test.jar
-rw-rw-r-- 1 d_mensinger d_mensinger 34935 Feb  4 09:51 buildinfo.xml
-rw------- 1 d_mensinger d_mensinger   382 Feb  4 09:51 maven-build-cache-test-mvn-cache-ext-extra-output-1.zip
-rw------- 1 d_mensinger d_mensinger   491 Feb  4 09:51 maven-build-cache-test-mvn-cache-ext-extra-output-2.zip
-rw------- 1 d_mensinger d_mensinger   207 Feb  4 09:51 maven-build-cache-test-mvn-cache-ext-extra-output-3.zip
-rw-rw-r-- 1 d_mensinger d_mensinger  2590 Feb  4 09:51 maven-build-cache-test-sources.jar


Checking JARs in cache dir:
.m2-home/build-cache/v1.1/test/maven-build-cache-test/1cee1f6bd6426d28c48863f31706b2012a89eb9322ef894692b3ae71d8c4b622/local/maven-build-cache-test.jar: directory
.m2-home/build-cache/v1.1/test/maven-build-cache-test/1cee1f6bd6426d28c48863f31706b2012a89eb9322ef894692b3ae71d8c4b622/local/maven-build-cache-test-sources.jar: Zip archive data, at least v1.0 to extract, compression method=store


Checking JARs in target dir:
target/maven-build-cache-test-1.0-SNAPSHOT.jar: Zip archive data, at least v1.0 to extract, compression method=store
target/maven-build-cache-test-1.0-SNAPSHOT-sources.jar: Zip archive data, at least v1.0 to extract, compression method=store

This is likely related to #394.


To reproduce

For convenience I have created a reproducer Project here: https://github.com/mensinda/maven-build-cache-test/tree/verify-fail

Please only use the verify-fail branch!

Then just run the run.sh shell script. This will automatically execute the relevant maven commands. It will also ensure that a local m2 Repository + build cache is used for better reproducibility.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions