Skip to content

Tidy up - #255

Merged
cstamas merged 7 commits into
masterfrom
tidy-up
Jan 20, 2026
Merged

Tidy up#255
cstamas merged 7 commits into
masterfrom
tidy-up

Conversation

@cstamas

Copy link
Copy Markdown
Collaborator

Removal of Ant left some remnants, clean them up.

Removal of Ant left some remnants, clean them up.
@cstamascstamas self-assigned this Jan 20, 2026
@cstamas

Copy link
Copy Markdown
CollaboratorAuthor

ping @odisseus

@cstamas
cstamas marked this pull request as ready for review January 20, 2026 11:40
@@ -18,7 +20,7 @@ jobs:
with:
distribution: temurin
java-version: 11

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cache: 'maven' would enable caching of Maven artifacts

Copy link
Copy Markdown
CollaboratorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The cache: 'maven' would cache local repository, and usually this is not what you want. But I agree, we can use this "low hanging fruit" until come up with better cache.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The cache: 'maven' would cache local repository, and usually this is not what you want. But I agree, we can use this "low hanging fruit" until come up with better cache.

Now Maven does not download anything and this is what I want:

Cache hit for: setup-java-Linux-x64-maven-3ddbf759ed683e90355f47106d5267473ecc42a2c13648ab09a57287f5d9dfa9
...
Cache restored successfully
Cache restored from key: setup-java-Linux-x64-maven-3ddbf759ed683e90355f47106d5267473ecc42a2c13648ab09a57287f5d9dfa9

Copy link
Copy Markdown
CollaboratorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's right, with pre-populated local repository it will pick up everything (even corruption) from previous build. This is why caching local repository is wrong.

Maven caching without re-using local repository is much better:
https://maveniverse.eu/blog/2025/09/16/maven-local-repository/
and
https://maveniverse.eu/docs/mimir/

Copy link
Copy Markdown
CollaboratorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or in other words: building with empty local repository AND still downloading nothing is what CI should do, as otherwise it is prone to same issues as your workstation, and leads to issues "works for me (on my workstation)" but fails on my colleagues workstation (and endless scratching heads why).

@cstamas

Copy link
Copy Markdown
CollaboratorAuthor

Thanks @manandbytes and @odisseus for helping!
Will merge once @ianopolous or @vorburger take a peek and approve.

@ianopolous

Copy link
Copy Markdown
Collaborator

Is there a way to include hashes in the pom for dependencies so we are not vulnerable to third party tampering?

@cstamas

Copy link
Copy Markdown
CollaboratorAuthor

Yes, not in the pom but it is possible to lock down key deps.
See:

@ianopolous

Copy link
Copy Markdown
Collaborator

That was a large factor of why I had vendored dependencies. To rule out a class of supply chain attack.

@cstamas

Copy link
Copy Markdown
CollaboratorAuthor

Related https://maveniverse.eu/blog/2025/12/06/lockfiles/

@cstamas

cstamas commented Jan 20, 2026

Copy link
Copy Markdown
CollaboratorAuthor

Let's go baby steps :)
SHA512 for key deps (POMs and JARs) added but as is here, is fragile (fail if missing=false), this means if POM is modified and dependency changes to other GAV no sha512 will be validated. Other solution is failIfMissing=true and record whole build SHA512 checksums, but for that we need more for Maven build, at least make build reproducible....

@ianopolousianopolous left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@cstamas
cstamas merged commit 79d7990 into masterJan 20, 2026
1 of 2 checks passed
@cstamas
cstamas deleted the tidy-up branch January 20, 2026 15:33
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

@cstamas@ianopolous@manandbytes@odisseus