Skip to content

Preserve timestamps on class files copied from dependencies #259

@jszakmeister

Description

@jszakmeister

Shadow Version

1.2.3

Gradle Version

3.1.0

Expected Behavior

Expect the timestamps of files mirrored into the shadow jar file to maintain timestamps.

Actual Behavior

The timestamps to be preserved from the jar files.

Gradle Build Script(s)

I have an example project here: https://github.com/jszakmeister/aot-pprint-gradle

After running gradle shadowJar, run java -jar build/libs/aot-pprint-gradle-0.1.0-SNAPSHOT-all.jar, and you'll see an exception thrown.

It turns out that the Clojure is unhappy about the timestamps. I haven't quite figured out the exact details, but if I unpack the jar file, and touch clojure/pprint/utilities__init.class, then my test case works.

This came up because I'm trying to use the gradle-clojure plugin to build an application, and ran across this behavior which has been causing me enormous problems. See cursive-ghost/gradle-clojure#8. If the original timestamps were preserved, then things would function correctly. I have tested this by unpacking the original clojure files from the release jar (preserving the timestamps) and re-packing the jar file.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions