maveniverse / mima

Minimal Maven reusable one-stop shop library
Eclipse Public License 2.0
30 stars 2 forks source link

Make MIMA Java module friendly #71

Closed cstamas closed 4 months ago

neilcsmith-net commented 8 months ago

:+1: MIMA looks like it might be a good fit for something I'm working on, but working on module path is a requirement (ideally in an upstream supported way).

cstamas commented 8 months ago

I have to admit, I don't have quite much knowledge in JPMS/jigsaw area, so originally I envisioned this as an "exercise to learn it" :smile: but simply cannot get to it.

Moreover, as I was looking, the Eclipse SISU (JSR DI Maven uses natively) may be somewhat in contradiction to JPMS requirements, but I'd be fine if we could modularize the "static" runtime only...

neilcsmith-net commented 3 months ago

Thanks for adding the automatic module names. Just been playing with running the Classpath demo with everything on the module path. Which seems to work OK so far, with a bit of tweaking - need to use the uber jar at compile time and exclude duplication. This make sense? Now to see if I can get this working in the context of the actual application in mind. :smile:

POM

    <dependency>
      <groupId>eu.maveniverse.maven.mima</groupId>
      <artifactId>context</artifactId>
      <version>2.4.15</version>
      <exclusions>
        <exclusion>
          <groupId>org.apache.maven.resolver</groupId>
          <artifactId>maven-resolver-api</artifactId>
        </exclusion>
        <exclusion>
          <groupId>org.apache.maven.resolver</groupId>
          <artifactId>maven-resolver-util</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
    <dependency>
      <groupId>eu.maveniverse.maven.mima.runtime</groupId>
      <artifactId>standalone-static-uber</artifactId>
      <version>2.4.15</version>
    </dependency>

module-info

module com.codelerity.test.mima {
    requires org.slf4j;
    requires eu.maveniverse.maven.mima.context;
    requires eu.maveniverse.maven.mima.runtime.standalonestatic;
}

Will there be a JDK 11+ uber jar with mima v3 - without Apache http?