This is an automated email from the ASF dual-hosted git repository. gnodet pushed a commit to branch mvnd-0.9.x in repository https://gitbox.apache.org/repos/asf/maven-mvnd.git
commit d1ce733c3b485474e28e917a9370d8e3fd5f9b17 Author: Guillaume Nodet <gno...@gmail.com> AuthorDate: Tue Jan 10 18:39:29 2023 +0100 Fix spotless config to include all java files (#768) # Conflicts: # client/src/main/java-fallback/org/mvndaemon/mvnd/client/DefaultClient.java --- .../org/mvndaemon/mvnd/client/DefaultClient.java | 30 ++++++++++++---------- .../org/mvndaemon/mvnd/client/DefaultClient.java | 5 ++-- .../org/mvndaemon/mvnd/common/ProcessHelper.java | 26 ++++++++++--------- .../org/mvndaemon/mvnd/common/SocketHelper.java | 25 ++++++++++-------- .../mvnd/logging/internal/SimpleAppender.java | 4 +-- pom.xml | 16 ++++++++++++ 6 files changed, 65 insertions(+), 41 deletions(-) diff --git a/client/src/main/java-fallback/org/mvndaemon/mvnd/client/DefaultClient.java b/client/src/main/java-fallback/org/mvndaemon/mvnd/client/DefaultClient.java index f50419aa..ddc55b56 100644 --- a/client/src/main/java-fallback/org/mvndaemon/mvnd/client/DefaultClient.java +++ b/client/src/main/java-fallback/org/mvndaemon/mvnd/client/DefaultClient.java @@ -1,17 +1,20 @@ /* - * Copyright 2019 the original author or authors. + * 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 * - * Licensed 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 * - * 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. + * 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.mvndaemon.mvnd.client; @@ -19,7 +22,6 @@ import org.apache.maven.cli.MavenCli; import org.slf4j.Logger; import org.slf4j.LoggerFactory; - public class DefaultClient { public static void main(String[] argv) throws Exception { final String logbackConfFallback = System.getProperty("logback.configurationFile.fallback"); @@ -29,8 +31,8 @@ public class DefaultClient { } final Logger LOGGER = LoggerFactory.getLogger(DefaultClient.class); - LOGGER.warn("Found old JDK, fallback to the embedded maven!"); - LOGGER.warn("Use JDK 11+ to run maven-mvnd client!"); + LOGGER.warn("Found old JDK, fallback to the embedded maven!"); + LOGGER.warn("Use JDK 11+ to run maven-mvnd client!"); MavenCli.main(argv); } diff --git a/client/src/main/java-mvnd/org/mvndaemon/mvnd/client/DefaultClient.java b/client/src/main/java-mvnd/org/mvndaemon/mvnd/client/DefaultClient.java index 2792652e..2089b5a0 100644 --- a/client/src/main/java-mvnd/org/mvndaemon/mvnd/client/DefaultClient.java +++ b/client/src/main/java-mvnd/org/mvndaemon/mvnd/client/DefaultClient.java @@ -18,8 +18,6 @@ */ package org.mvndaemon.mvnd.client; -import static org.mvndaemon.mvnd.client.DaemonParameters.LOG_EXTENSION; - import java.io.IOException; import java.io.PrintWriter; import java.nio.file.Files; @@ -42,6 +40,7 @@ import java.util.Optional; import java.util.concurrent.atomic.AtomicReference; import java.util.stream.Collectors; import java.util.stream.Stream; + import org.fusesource.jansi.Ansi; import org.fusesource.jansi.internal.CLibrary; import org.jline.utils.AttributedString; @@ -61,6 +60,8 @@ import org.mvndaemon.mvnd.common.logging.TerminalOutput; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import static org.mvndaemon.mvnd.client.DaemonParameters.LOG_EXTENSION; + public class DefaultClient implements Client { private static final Logger LOGGER = LoggerFactory.getLogger(DefaultClient.class); diff --git a/common/src/main/java11/org/mvndaemon/mvnd/common/ProcessHelper.java b/common/src/main/java11/org/mvndaemon/mvnd/common/ProcessHelper.java index 46a53bf8..875bbda4 100644 --- a/common/src/main/java11/org/mvndaemon/mvnd/common/ProcessHelper.java +++ b/common/src/main/java11/org/mvndaemon/mvnd/common/ProcessHelper.java @@ -1,17 +1,20 @@ /* - * Copyright 2021 the original author or authors. + * 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 * - * Licensed 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 * - * 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. + * 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.mvndaemon.mvnd.common; @@ -20,5 +23,4 @@ public class ProcessHelper { public static void killChildrenProcesses() { ProcessHandle.current().descendants().forEach(ProcessHandle::destroy); } - } diff --git a/common/src/main/java16/org/mvndaemon/mvnd/common/SocketHelper.java b/common/src/main/java16/org/mvndaemon/mvnd/common/SocketHelper.java index f0ce0f6c..e5671f90 100644 --- a/common/src/main/java16/org/mvndaemon/mvnd/common/SocketHelper.java +++ b/common/src/main/java16/org/mvndaemon/mvnd/common/SocketHelper.java @@ -1,17 +1,20 @@ /* - * Copyright 2021 the original author or authors. + * 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 * - * Licensed 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 * - * 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. + * 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.mvndaemon.mvnd.common; diff --git a/daemon/src/main/java-fallback/org/mvndaemon/mvnd/logging/internal/SimpleAppender.java b/daemon/src/main/java-fallback/org/mvndaemon/mvnd/logging/internal/SimpleAppender.java index 1a848275..24b4f686 100644 --- a/daemon/src/main/java-fallback/org/mvndaemon/mvnd/logging/internal/SimpleAppender.java +++ b/daemon/src/main/java-fallback/org/mvndaemon/mvnd/logging/internal/SimpleAppender.java @@ -18,8 +18,6 @@ */ package org.mvndaemon.mvnd.logging.internal; -import static org.apache.maven.shared.utils.logging.MessageUtils.level; - import ch.qos.logback.classic.Level; import ch.qos.logback.classic.spi.ILoggingEvent; import ch.qos.logback.classic.spi.IThrowableProxy; @@ -27,6 +25,8 @@ import ch.qos.logback.classic.spi.ThrowableProxyUtil; import ch.qos.logback.core.AppenderBase; import ch.qos.logback.core.CoreConstants; +import static org.apache.maven.shared.utils.logging.MessageUtils.level; + /** * This appender acts like the slf4j simple logger. * It's used diff --git a/pom.xml b/pom.xml index c4a0201e..4082c6c7 100644 --- a/pom.xml +++ b/pom.xml @@ -321,6 +321,22 @@ <build> <pluginManagement> <plugins> + <plugin> + <groupId>com.diffplug.spotless</groupId> + <artifactId>spotless-maven-plugin</artifactId> + <configuration> + <java> + <includes> + <include>src/main/java/**/*.java</include> + <include>src/main/java-fallback/**/*.java</include> + <include>src/main/java-mvnd/**/*.java</include> + <include>src/main/java11/**/*.java</include> + <include>src/main/java16/**/*.java</include> + <include>src/test/java/**/*.java</include> + </includes> + </java> + </configuration> + </plugin> <plugin> <groupId>org.apache.rat</groupId> <artifactId>apache-rat-plugin</artifactId>