Copilot commented on code in PR #11880:
URL: https://github.com/apache/maven/pull/11880#discussion_r3044636978


##########
maven-embedder/src/main/resources/META-INF/maven/slf4j-configuration.properties:
##########
@@ -19,5 +19,6 @@
 # value = corresponding o.a.m.cli.logging.Slf4jConfiguration class
 org.slf4j.impl.SimpleLoggerFactory 
org.apache.maven.cli.logging.impl.Slf4jSimpleConfiguration

Review Comment:
   The SLF4J Simple logger factory class name changed in SLF4J 2.x (from 
`org.slf4j.impl.SimpleLoggerFactory` to 
`org.slf4j.simple.SimpleLoggerFactory`). Since `Slf4jConfigurationFactory` 
matches on `loggerFactory.getClass().getCanonicalName()`, the current entry for 
`org.slf4j.impl.SimpleLoggerFactory` will no longer match when running with 
slf4j-simple 2.x. Add a mapping for `org.slf4j.simple.SimpleLoggerFactory` (and 
consider removing/keeping the old `org.slf4j.impl.*` keys only if you still 
need 1.7 compatibility).
   ```suggestion
   org.slf4j.impl.SimpleLoggerFactory 
org.apache.maven.cli.logging.impl.Slf4jSimpleConfiguration
   org.slf4j.simple.SimpleLoggerFactory 
org.apache.maven.cli.logging.impl.Slf4jSimpleConfiguration
   ```



##########
maven-slf4j-provider/pom.xml:
##########
@@ -63,13 +63,12 @@ under the License.
             <artifactItem>
               <groupId>org.slf4j</groupId>
               <artifactId>slf4j-simple</artifactId>
-              <version>${slf4jVersion}</version>
               <type>jar</type>
               <classifier>sources</classifier>
               <overWrite>false</overWrite>
               
<outputDirectory>${project.build.directory}/generated-sources/slf4j-simple</outputDirectory>
-              <includes>org/slf4j/impl/*.java</includes>
-              <excludes>org/slf4j/impl/StaticLoggerBinder*</excludes>
+              <includes>org/slf4j/simple/*.java</includes>
+              <excludes>org/slf4j/simple/SimpleServiceProvider*</excludes>

Review Comment:
   The `maven-dependency-plugin` `unpack` configuration is missing the 
`version` for the `slf4j-simple` sources artifact. This module does not declare 
`slf4j-simple` as a dependency, so the plugin is unlikely to be able to resolve 
the artifact without an explicit version, which can break the build at 
generate-sources. Add `<version>${slf4jVersion}</version>` here (or add 
`slf4j-simple` as a dependency so the plugin can resolve it via the project’s 
dependency graph).



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