Skip to content

Migrate MavenDownloaderImpl to use MIMA (Minimal Maven)#21450

Draft
gnodet wants to merge 1 commit intoapache:mainfrom
gnodet:CAMEL-migrate-maven-downloader-to-mima
Draft

Migrate MavenDownloaderImpl to use MIMA (Minimal Maven)#21450
gnodet wants to merge 1 commit intoapache:mainfrom
gnodet:CAMEL-migrate-maven-downloader-to-mima

Conversation

@gnodet
Copy link
Contributor

@gnodet gnodet commented Feb 13, 2026

Migrates MavenDownloaderImpl from manual Maven Resolver setup to MIMA (Minimal Maven) 2.4.39, significantly simplifying the codebase while preserving all functionality.

@gnodet gnodet requested a review from grgrzybek February 13, 2026 16:18
@gnodet gnodet force-pushed the CAMEL-migrate-maven-downloader-to-mima branch from f98da5f to 890e7f3 Compare February 13, 2026 16:27
@grgrzybek
Copy link
Contributor

great! I trust your PR - I can look on Monday at how did you do it ;)

- Replace manual Maven Resolver setup with MIMA library
- Remove DIRegistry and manual DI configuration (~650 lines)
- Reduce MavenDownloaderImpl from 1,240 to 649 lines (48% reduction)
- Add MIMA dependencies (context, embedded-maven, standalone-static)
- Remove individual maven-resolver-* dependencies
- Preserve all existing functionality:
  - Dual mode operation (embedded Maven plugin + standalone)
  - Repository configuration (Maven Central, Apache Snapshots, custom repos)
  - Settings.xml and settings-security.xml processing
  - Offline mode, fresh mode, repository resolver
  - Download listeners and custom timeout configuration
- Update MavenVersionManager and ValidateMojo to use new constructor
- Delete obsolete DIRegistry, DIRegistryTest, and MavenResolverTest
@gnodet gnodet force-pushed the CAMEL-migrate-maven-downloader-to-mima branch from 890e7f3 to 6265db7 Compare February 13, 2026 16:29
@grgrzybek
Copy link
Contributor

Just out of curiosity - did you generate these MD files using AI or did you write these to control AI?

@gnodet
Copy link
Contributor Author

gnodet commented Feb 13, 2026

Just out of curiosity - did you generate these MD files using AI or did you write these to control AI?

They were AI generated, but shouldn't have been integrated in the PR, I removed those.

@davsclaus
Copy link
Contributor

this is good to be based on that mina project - jbang have switched over as well.

The hardcoded version should be a placeholder from parent/pom.xml

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.

4 participants