Skip to content

Conversation

@cstamas
Copy link
Member

@cstamas cstamas commented Jan 31, 2026

This change relies on reusing existing API that can return proper URL (as set by user by ANY means in Maven config) to resolve from.

Moreover, if repo ID is made configurable as well, it could be used to pull (needs more code; for that you would need to pull exec req repo by ID, and use that instead, and not craft central RemoteRepository instance) reposes like ID "my-corpo-repo" from settings and use that instead.

@laeubi @yeikel

Am leaving this PR as draft and you can work it out based on this.

Fixes #396
Supersedes #397

This change relies on reusing existing API that
can return proper URL (as set by user by ANY means
in Maven config) to resolve from.

Moreover, if repo ID is made configurable as well,
it could be used to pull (needs more code) reposes
like ID "my-corpo-repo" from settings and use that
instead.
@cstamas cstamas mentioned this pull request Jan 31, 2026
8 tasks
/**
* Ctor for UT.
*/
public WrapperMojo(RepositorySystem system, RepositorySystemSession session) {
Copy link
Member

Choose a reason for hiding this comment

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

As we have a constructor we can inject all needed components ...

@yeikel
Copy link

yeikel commented Jan 31, 2026

Thank you for this, If this is better solution I am all for it.

Moreover, if repo ID is made configurable as well, it could be used to pull (needs more code; for that you would need to pull exec req repo by ID, and use that instead, and not craft central RemoteRepository instance) reposes like ID "my-corpo-repo" from settings and use that instead.

Sorry, I’m not familiar with this and I’m unsure what the next steps are or what you mean with this.

For what is worth, I built and tested this locally and it seems to fix my original bug report, so I'd be happy to have this as an starting solution

[INFO] --- wrapper:3.3.5-SNAPSHOT:wrapper (default-cli) @ simudyne-maven-java ---
[INFO] Unpacked only-script type wrapper distribution org.apache.maven.wrapper:maven-wrapper-distribution:zip:only-script:3.3.5-SNAPSHOT
[INFO] Determined repo URL to use as https://maven-central.storage.googleapis.com/maven2
[INFO] Configuring .mvn/wrapper/maven-wrapper.properties to use Maven 3.9.9 and download from https://maven-central.storage.googleapis.com/maven2

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.

Add support for the central mirror

3 participants