gnodet commented on PR #11549: URL: https://github.com/apache/maven/pull/11549#issuecomment-3657870527
> > The jar plugin will attach the artifacts and the poms when building a modular project > > uh, attaching the pom? I see how a plugin can attach a consumer pom to a Maven Project that provides the build pom: but we still miss the Maven Project that provides the build pom I don't understand. You can attach any kind of artifact to a project, it can be a jar, a pom, or whatever. From the install/deployment POV, there's no difference between a main pom, a consumer pom, or the jar produced. Those are all artifacts (groupId, artifactId, version, extension, classifier) that point to file on the filesystem. Then, if we talk about semantics, I'm not sure yet how to produce those poms, but I think the overall idea is to create something similar to the consumer POM for the project, with small modifications to follow the rules of a specific JPMS module (not a maven module). > > The [](https://maven.apache.org/ref/4.0.0-rc-5/api/maven-api-model/apidocs/org/apache/maven/api/model/Source.html) element in POM 4.1.0 is more flexible than the element in POM 4.0.0. This is where all the modular information is stored. > > I'm still not convinced `<source>` can replace what we configure with plugins in a sub-project I don't think that's a goal. We're not talking about subprojects here, just JPMS modules that are created from a single POM file. Maybe you're thinking about plugins that would generate other kind of resources ? For example a plugin that would read the class files and generate something to be included in the jar ? That would definitely not work without adapting the plugin to support this JPMS module layout. Or you could configure multiple executions, each one pointing to the specific output directory of the module. For example with the [modular project IT](https://github.com/apache/maven-compiler-plugin/tree/master/src/it/modular-sources), we'll have `target/classes/org.bar` and `target/classes/org.foo`, so either the plugin supports this new layout and it will figure it out, or you can create two executions explicitly pointing to those directories. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
