Skip to content

maven: find the repository behind retired scm URLs - #1920

Open
msuozzo wants to merge 5 commits into
google:mainfrom
msuozzo:push-kwqsotyqmrrz
Open

msuozzo wants to merge 5 commits into
google:mainfrom
msuozzo:push-kwqsotyqmrrz

Conversation

@msuozzo

@msuozzo msuozzo commented Nov 3, 2026 •

Copy link
Copy Markdown
Member

Repository inference read only scm>url, which in older POMs is often a
web viewer or a retired host while the connection names the git
repository. Try the connections too, expand ${...} properties, and map
Apache git and Subversion URLs to the project's GitHub mirror when the
mirror exists.

Parents: #1918

Enqueue derives a target's artifact from its version, and Maven had no
derivation, so every Maven version was skipped.
Inference kept only the major of a recorded JDK unless the exact key
existed, so Build-Jdk 1.8.0_181 built with the latest 8 update. Javac
output differs between releases, so pick the same release, or the nearest
update of the same major. Build-Jdk now outranks the coarser
Build-Jdk-Spec, and a jar tool's Created-By counts as a JDK version. JDK 8
stands in for older releases, which none of the downloads cover.

forge-parent: tovwoyqwzpqz
Builds used Debian's Maven, whose default plugin versions differ from the
publisher's release and decide much of the output (compiler flags, jar
attributes, module-info packages), and fail on old projects outright
(antrun 'tasks', source 1.5). Install the release from Maven Central: the
one a Maven wrapper pins, else the one a pre-3.x maven-archiver named in
the manifest, else the newest out at the ref's commit time. Its global
settings mirror Central to HTTPS, which Maven before 3.2.3 does not use.
Strategies that name no release get 3.9.9 from Central, the version Debian
13's package had.

Export a UTF-8 locale for the JDK, since javac otherwise reads sources and
writes class names as ASCII. Check out with CRLF when upstream's copied
pom.xml has CRLF and the repository's does not.

forge-parent: qttotpppltol
The first build file found at the shallowest depth decided the build tool,
so a package.json beside the root pom.xml (log4j) made the release an
unsupported npm build depending on file order. Rank the tools at equal
depth.

forge-parent: tnluwzkxpnmy
Repository inference read only scm>url, which in older POMs is often a
web viewer or a retired host while the connection names the git
repository. Try the connections too, expand ${...} properties, and map
Apache git and Subversion URLs to the project's GitHub mirror when the
mirror exists.

forge-parent: swsnksxtkxmp
@msuozzo
msuozzo requested a review from pohlarized November 3, 2026 00:35
Comment thread pkg/rebuild/maven/infer.go Resolved
Comment thread pkg/rebuild/maven/infer.go Resolved
Comment thread pkg/rebuild/maven/infer.go Resolved

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants