elharo commented on code in PR #1041:
URL: https://github.com/apache/maven/pull/1041#discussion_r1129424545


##########
maven-embedder/pom.xml:
##########
@@ -140,6 +140,12 @@ under the License.
       <artifactId>slf4j-simple</artifactId>
       <optional>true</optional>
     </dependency>
+    <dependency>
+      <groupId>org.slf4j</groupId>
+      <artifactId>slf4j-jdk14</artifactId>

Review Comment:
   Does this introduce JDK 9+ byte code into the classpath? That would be a 
deal breaker for now.



##########
maven-embedder/src/main/java/org/apache/maven/cli/logging/impl/NoopConfiguration.java:
##########
@@ -0,0 +1,39 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.maven.cli.logging.impl;
+
+import org.apache.maven.cli.logging.BaseSlf4jConfiguration;
+
+/**
+ * Configuration available for users setting a custom binding and not using 
--fail-on-severity to avoid warnings.
+ * This is basically a no-op implementation not issuing any warning.
+ * To use it add to maven classpath (m2.conf) a folder/jar with a 
META-INF/maven/slf4j-configuration.properties
+ * containing {@code loggerClass = 
org.apache.maven.cli.logging.impl.NoopConfiguration}.
+ */
+public class NoopConfiguration extends BaseSlf4jConfiguration {

Review Comment:
   I thought the point of log frameworks was that this sort of thing could be 
done in client projects without requiring support from projects doing the 
logging.



##########
maven-embedder/src/main/java/org/apache/maven/cli/logging/impl/JDKConfiguration.java:
##########
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.maven.cli.logging.impl;
+
+import java.util.logging.Logger;
+
+import org.apache.maven.cli.logging.BaseSlf4jConfiguration;
+
+/**
+ * Configuration for slf4j-jdk14.
+ */
+public class JDKConfiguration extends BaseSlf4jConfiguration {

Review Comment:
   This is additional API I'd rather not carry around. I need to understand the 
root issue better, but it still seems to me either warning is correct, in which 
case we should do nothing, or we should remove the log message completely. I 
don't like half measures and work arounds for misconfigured builds. 



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