mirror of
https://github.com/apache/maven-mvnd.git
synced 2026-01-13 07:04:14 +08:00
Fix spotless config to include all java files (#768)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
16
pom.xml
16
pom.xml
@@ -322,6 +322,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>
|
||||
|
||||
Reference in New Issue
Block a user