Skip to content

Overwrite lastModified on the folder after compiling #72

Open
@MartinKanters

Description

@MartinKanters

For implementing Maven issue MNG-4660 we would like to be able to know when the last compilation happened. We need this information to determine the packaged artifact (.jar) is up-to-date with the compiled sources (in target/classes usually).
For now we will look through all target/classes files to check their lastModified time, but if we could use the lastModified time on the target/classes directory, we could improve performance a lot.

On Unix based systems, the target/classes directory will (if I remember correctly) be updated to the time of compilation, but for Windows it isn't.
https://stackoverflow.com/questions/12249155/how-to-get-the-last-modified-date-and-time-of-a-directory-in-java

So my suggestion is to overwrite the lastModified property on the target/classes directory after compilation.

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