desruisseaux commented on PR #959:
URL: 
https://github.com/apache/maven-compiler-plugin/pull/959#issuecomment-3394128288

   I started to dig in the JAR plugin with 
https://github.com/apache/maven-jar-plugin/pull/481. Below are my remarks about 
the multiple JARs in one run:
   
   * (Reminder) For the Surefire plugin, it is not an issue. The `java` command 
takes all modules together as one entry on the module-path, except 
`META-INF/versions/` which is not supported anyway even with the classical 
layout (we need to setup class-path / module-path ourselves).
   * For the JAR plugin, we already have a code equivalent to the following:
   
   ```java
   ProducedArtifact artifact = session.createProducedArtifact(
           project.getGroupId(),
           project.getArtifactId(),
           project.getVersion(),
           classifier,
           null,
           getType());
   
   projectManager.attachArtifact(project, artifact, jarFile);
   ```
   
   This code would be invoked in a loop, with `artifactId` derived from the 
module name by default and the dependencies set to the intersection of 
`<dependencies>` and `module-info`.


-- 
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]

Reply via email to