Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update to Maven4 and Resolver2 #28

Open
wants to merge 43 commits into
base: main
Choose a base branch
from
Open

Update to Maven4 and Resolver2 #28

wants to merge 43 commits into from

Conversation

cstamas
Copy link
Member

@cstamas cstamas commented Oct 15, 2023

This branch contains beginnings of MIMA 3.x that is Maven4 + Resolver2. Note: as Maven4 went Java 17, the maven libraries used here are in Java 17 bytecode, hence MIMA 3.x becomes Java 17 as well.

For compatibility, see #65 (in short, MIMA 2 works with Maven 3 and Maven 4, but MIMA 3 works with Maven 4 ONLY).

This is WIP and CI will fail as it uses snapshots.
@cstamas cstamas self-assigned this Oct 15, 2023
@grgrzybek
Copy link

@cstamas will there be two MiMas? (Maven4 + Resolver2 and Maven3.9 + Resolver1.9)? Or may I use single MiMa and override the version of Maven+Resolver?

@cstamas
Copy link
Member Author

cstamas commented Nov 29, 2023

Will do probably "parallel versions": current MIMA 2.x goes with Maven 3.9 and Resolver 1.x, and MIMA 3.x goes with Maven 4.x + Resolver 2.x... (and they should be "source compatible" as much as possible)

Given Maven 3.x (and hence Resolver 1.x) are slowly going into "bug fix maintenance only" mode, not much more to expect from there (upcoming 3.9.6 may be last Maven 3), MIMA 2.x branch may also go slowly into "bug fix maintenance only" mode as well.

@cstamas
Copy link
Member Author

cstamas commented Dec 9, 2023

@grgrzybek See https://github.com/maveniverse/mima/releases/tag/release-3.0.0-alpha-1

It is Java11+ only... or just build from this PR, as it has issues fixed and MIMA built from this PR will work now from Java8+ (using apache, on 11+ jdk transport takes over).

Parent POM 8
CI Maven versions
Wrapper Maven version
Fixes #74

Changes:
* default cmd is now REPL, and it dumps just minimal headers (not 3 pages of properties), to see all invoke `dump -v` in REPL
* when directly command invoked (like `list` or `classpath` it executes and CLI exits)
* removed all the redundant outputs, numberings
* hence, direct invocations produce merely needed output (scriptable)
* removed INFO prefix
@cstamas
Copy link
Member Author

cstamas commented Jul 2, 2024

This PR now offers Resolver 2.0 (staged) APIs with following constratins:

  • cannot work embedded in Maven 3 (as maven3 carries resolver 1 APIs, so cannot provide Resolver 2 APIs), only in Maven4 (see demo).
  • in standalone modes all should work

Note: MIMA in standalone mode still "complements" Resolver with Maven 3.9.8 classes, so this MIMA cannot run on special FileSystems like JIMFS is (that will need Maven4 modelsl)

@cstamas
Copy link
Member Author

cstamas commented Jul 2, 2024

Dropped MIMA CLI, it was already deprecated and replaced with https://github.com/maveniverse/toolbox

@cstamas
Copy link
Member Author

cstamas commented Jul 2, 2024

Scratch that: this PR is now Maven 4 + Resolver 2 😄

@cstamas
Copy link
Member Author

cstamas commented Jul 2, 2024

With this PR this thing as shown in Resolver PR becomes possible: running resolver on custom NIO FileSystem:
apache/maven-resolver#526

@cstamas
Copy link
Member Author

cstamas commented Jul 2, 2024

Am thinking... I could do something along these lines:

  • Resolver 1.x (Java 8) + Maven 3.x (Java 8) = MIMA 2.x (Java 8) - already exists on master

but, this PR at one moment had

  • Resolver 2.x (Java 8) + Maven 3.x (Java 8) = MIMA X (Java 8) -- at some point this PR

and now this PR has

  • Resolver 2.x (Java 8) + Maven 4.x (Java 17) = MIMA 3.x (Java 17, due Maven 4) -- tip of this PR

My point: MIMA X could still remain Java 8, but have all the benefits of Resolver 2,x sans the Google JIMFS-feature (as Maven3 models.stuff still use java.io.File and not java.nio.files).

And consequence would be (if we neglect the "embedded" case, when MIMA runs embedded in Maven, and can provide only stuff that Maven in which it runs provides), it would make sense for MIMA user to "choose"... like R2/M3 or R2/M4, but these "runtimes" would be Java 8 or Java 17 in this order.

OTOH, I'd really just drop history and make a leap toward Maven 4 (and Resolver 2).... these "choices" may just confuse end users...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants