kordamp / pomchecker

🦉 Maven POM syntax checker
Apache License 2.0
65 stars 11 forks source link

Use latest Mima and MMR extension #27

Open cstamas opened 2 months ago

cstamas commented 2 months ago

As pomchecker does way way too much for what it really needs. Building MavenProject just to get effective model is.... brrr, since Maven 3.1 there is ModelBuilder for that! Nevertheless, Mima MMR is made exactly for this use case (and is used in Toolbox as well).

Help needed: tame Gradle as it seems is not picking up new class from core?

cstamas commented 2 months ago

@aalmiray @gastaldi please take a peek

gastaldi commented 2 months ago

@cstamas interesting, does it solve #24 or is it just an upgrade that also fixes #22?

cstamas commented 2 months ago

Solves both, but of course you STILL need to add that "staging directory" or whatever as RemoteRepository. All the POMs (like parents etc, that are staged and inter-connected) must be resolvable by Resolver....

gastaldi commented 2 months ago

Solves both, but of course you STILL need to add that "staging directory" or whatever as RemoteRepository. All the POMs (like parents etc, that are staged and inter-connected) must be resolvable by Resolver....

+1, regardless of the solution adopted, it should somehow have a way to add the staging directory as a remote repository (via a system property perhaps?)

cstamas commented 2 months ago

Updated stuff with latest MIMA.

Anyone any idea why gradle build fails with

/home/cstamas/Worx/kordamp/pomchecker/pomchecker-gradle-plugin/src/main/groovy/org/kordamp/gradle/plugin/checker/internal/PomParser.java:26: error: cannot find symbol
import eu.maveniverse.maven.mima.extensions.mmr.ModelRequest;
cstamas commented 2 months ago

os-maven-plugin "simulation" left in, but am unsure why that one plugin needs special treatment, or in other words any other why not? This seems too "narrowly tailored" to something... but what?

cstamas commented 2 months ago

Also created separate mvnw PR, but this build seems to adjust enforcer to maven dependency (why?), so mvnw is here, but once other Pr is merged, irrelevant changes will be gone.

aalmiray commented 2 months ago

Enforcer is to to validate the correct version of Maven is used regardless of if the wrapper is used or not.