diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties index fb18c86c8..23c7e5999 100644 --- a/.mvn/wrapper/maven-wrapper.properties +++ b/.mvn/wrapper/maven-wrapper.properties @@ -15,4 +15,5 @@ # specific language governing permissions and limitations # under the License. wrapperVersion=3.3.2 -distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.6/apache-maven-3.9.6-bin.zip +distributionType=only-script +distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.7/apache-maven-3.9.7-bin.zip diff --git a/agent/pom.xml b/agent/pom.xml index 636fff2a9..c40734ad4 100644 --- a/agent/pom.xml +++ b/agent/pom.xml @@ -31,12 +31,10 @@ <name>Maven Daemon - Agent</name> <dependencies> - <dependency> <groupId>org.javassist</groupId> <artifactId>javassist</artifactId> </dependency> - </dependencies> <build> diff --git a/build-plugin/pom.xml b/build-plugin/pom.xml index 922fbc353..854ba1664 100644 --- a/build-plugin/pom.xml +++ b/build-plugin/pom.xml @@ -30,31 +30,6 @@ <packaging>maven-plugin</packaging> <name>Maven Daemon - Documentation Maven Plugin</name> - <properties> - <maven.compiler.target>11</maven.compiler.target> - <maven.compiler.source>11</maven.compiler.source> - - <roaster.version>2.29.0.Final</roaster.version> - <maven.version>3.9.6</maven.version> - <maven.plugin-tools.version>3.13.0</maven.plugin-tools.version> - </properties> - - <dependencyManagement> - <dependencies> - <dependency> - <groupId>org.apache.maven</groupId> - <artifactId>maven-plugin-api</artifactId> - <version>${maven.version}</version> - </dependency> - <dependency> - <groupId>org.apache.maven.plugin-tools</groupId> - <artifactId>maven-plugin-annotations</artifactId> - <version>${maven.plugin-tools.version}</version> - </dependency> - - </dependencies> - </dependencyManagement> - <dependencies> <dependency> <groupId>org.apache.maven</groupId> @@ -70,9 +45,7 @@ <dependency> <groupId>org.jboss.forge.roaster</groupId> <artifactId>roaster-jdt</artifactId> - <version>${roaster.version}</version> </dependency> - </dependencies> <build> @@ -81,7 +54,6 @@ <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-plugin-plugin</artifactId> - <version>${maven.plugin-tools.version}</version> </plugin> </plugins> </pluginManagement> diff --git a/common/pom.xml b/common/pom.xml index fbc261d66..c16436d68 100644 --- a/common/pom.xml +++ b/common/pom.xml @@ -36,7 +36,6 @@ </properties> <dependencies> - <dependency> <groupId>org.jline</groupId> <artifactId>jline-terminal</artifactId> @@ -68,7 +67,6 @@ <plugin> <groupId>org.apache.maven.daemon</groupId> <artifactId>mvnd-build-maven-plugin</artifactId> - <version>${project.version}</version> <executions> <execution> <goals> @@ -78,6 +76,16 @@ </execution> </executions> </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <configuration> + <fork>true</fork> + <compilerArgs> + <arg>-XDignore.symbol.file</arg> + </compilerArgs> + </configuration> + </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-jar-plugin</artifactId> @@ -92,112 +100,4 @@ </plugins> </build> - <profiles> - <profile> - <id>jdk11-15</id> - <activation> - <jdk>[11,15)</jdk> - </activation> - <build> - <plugins> - <plugin> - <artifactId>maven-compiler-plugin</artifactId> - <executions> - <execution> - <id>default-compile</id> - <goals> - <goal>compile</goal> - </goals> - <configuration> - <fork>true</fork> - <compilerArgs> - <arg>-XDignore.symbol.file</arg> - </compilerArgs> - </configuration> - </execution> - <execution> - <id>jdk11</id> - <goals> - <goal>compile</goal> - </goals> - <configuration> - <fork>true</fork> - <compilerArgs> - <arg>-XDignore.symbol.file</arg> - </compilerArgs> - <release>11</release> - <multiReleaseOutput>true</multiReleaseOutput> - <compileSourceRoots> - <root>${project.basedir}/src/main/java11</root> - </compileSourceRoots> - </configuration> - </execution> - </executions> - </plugin> - </plugins> - </build> - </profile> - <profile> - <id>jdk16+</id> - <activation> - <jdk>[16,)</jdk> - </activation> - <build> - <plugins> - <plugin> - <artifactId>maven-compiler-plugin</artifactId> - <executions> - <execution> - <id>default-compile</id> - <goals> - <goal>compile</goal> - </goals> - <configuration> - <fork>true</fork> - <compilerArgs> - <arg>-XDignore.symbol.file</arg> - </compilerArgs> - </configuration> - </execution> - <execution> - <id>jdk11</id> - <goals> - <goal>compile</goal> - </goals> - <configuration> - <fork>true</fork> - <compilerArgs> - <arg>-XDignore.symbol.file</arg> - </compilerArgs> - <release>11</release> - <multiReleaseOutput>true</multiReleaseOutput> - <compileSourceRoots> - <root>${project.basedir}/src/main/java11</root> - </compileSourceRoots> - </configuration> - </execution> - <execution> - <id>jdk16</id> - <goals> - <goal>compile</goal> - </goals> - <configuration> - <fork>true</fork> - <compilerArgs> - <arg>-XDignore.symbol.file</arg> - </compilerArgs> - <release>16</release> - <multiReleaseOutput>true</multiReleaseOutput> - <compileSourceRoots> - <root>${project.basedir}/src/main/java16</root> - </compileSourceRoots> - </configuration> - </execution> - </executions> - </plugin> - </plugins> - </build> - </profile> - </profiles> - </project> diff --git a/common/src/main/java/org/mvndaemon/mvnd/common/InterpolationHelper.java b/common/src/main/java/org/mvndaemon/mvnd/common/InterpolationHelper.java index 138b0cbde..e8301a894 100644 --- a/common/src/main/java/org/mvndaemon/mvnd/common/InterpolationHelper.java +++ b/common/src/main/java/org/mvndaemon/mvnd/common/InterpolationHelper.java @@ -75,7 +75,7 @@ public static void performSubstitution( * <p> * This method performs property variable substitution on the * specified value. If the specified value contains the syntax - * <tt>${<prop-name>}</tt>, where <tt><prop-name></tt> + * {@code ${prop-name}}, where {@code prop-name} * refers to either a configuration property or a system property, * then the corresponding property value is substituted for the variable * placeholder. Multiple variable placeholders may exist in the diff --git a/common/src/main/java/org/mvndaemon/mvnd/common/OsUtils.java b/common/src/main/java/org/mvndaemon/mvnd/common/OsUtils.java index 0c591d676..460b9aa9e 100644 --- a/common/src/main/java/org/mvndaemon/mvnd/common/OsUtils.java +++ b/common/src/main/java/org/mvndaemon/mvnd/common/OsUtils.java @@ -138,7 +138,7 @@ private static void exec(String[] cmd, final List<String> output) { /** * A simple wrapper over {@link Process} that manages its destroying and offers Java 8-like - * {@link #waitFor(long, TimeUnit, String[])} with timeout. + * {@link #waitFor(long)} with timeout. */ public static class CommandProcess implements AutoCloseable { public static final int TIMEOUT_EXIT_CODE = Integer.MIN_VALUE + 42; diff --git a/common/src/main/java/org/mvndaemon/mvnd/common/ProcessHelper.java b/common/src/main/java/org/mvndaemon/mvnd/common/ProcessHelper.java index 97bbd7fa5..875bbda48 100644 --- a/common/src/main/java/org/mvndaemon/mvnd/common/ProcessHelper.java +++ b/common/src/main/java/org/mvndaemon/mvnd/common/ProcessHelper.java @@ -20,5 +20,7 @@ public class ProcessHelper { - public static void killChildrenProcesses() {} + public static void killChildrenProcesses() { + ProcessHandle.current().descendants().forEach(ProcessHandle::destroy); + } } diff --git a/common/src/main/java/org/mvndaemon/mvnd/common/SocketHelper.java b/common/src/main/java/org/mvndaemon/mvnd/common/SocketHelper.java index 96b1dbbcd..e5671f900 100644 --- a/common/src/main/java/org/mvndaemon/mvnd/common/SocketHelper.java +++ b/common/src/main/java/org/mvndaemon/mvnd/common/SocketHelper.java @@ -20,20 +20,22 @@ import java.io.IOException; import java.net.SocketAddress; +import java.net.StandardProtocolFamily; +import java.net.UnixDomainSocketAddress; import java.nio.channels.ServerSocketChannel; import java.nio.channels.SocketChannel; public class SocketHelper { public static SocketChannel openUnixSocket() throws IOException { - throw new UnsupportedOperationException("Unix sockets are supported only on JDK >= 16"); + return SocketChannel.open(StandardProtocolFamily.UNIX); } public static ServerSocketChannel openUnixServerSocket() throws IOException { - throw new UnsupportedOperationException("Unix sockets are supported only on JDK >= 16"); + return ServerSocketChannel.open(StandardProtocolFamily.UNIX).bind(null, 0); } public static SocketAddress unixSocketAddressOf(String s) { - throw new UnsupportedOperationException("Unix sockets are supported only on JDK >= 16"); + return UnixDomainSocketAddress.of(s); } } diff --git a/common/src/main/java11/org/mvndaemon/mvnd/common/ProcessHelper.java b/common/src/main/java11/org/mvndaemon/mvnd/common/ProcessHelper.java deleted file mode 100644 index 875bbda48..000000000 --- a/common/src/main/java11/org/mvndaemon/mvnd/common/ProcessHelper.java +++ /dev/null @@ -1,26 +0,0 @@ -/* - * 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.mvndaemon.mvnd.common; - -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 deleted file mode 100644 index e5671f900..000000000 --- a/common/src/main/java16/org/mvndaemon/mvnd/common/SocketHelper.java +++ /dev/null @@ -1,41 +0,0 @@ -/* - * 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.mvndaemon.mvnd.common; - -import java.io.IOException; -import java.net.SocketAddress; -import java.net.StandardProtocolFamily; -import java.net.UnixDomainSocketAddress; -import java.nio.channels.ServerSocketChannel; -import java.nio.channels.SocketChannel; - -public class SocketHelper { - - public static SocketChannel openUnixSocket() throws IOException { - return SocketChannel.open(StandardProtocolFamily.UNIX); - } - - public static ServerSocketChannel openUnixServerSocket() throws IOException { - return ServerSocketChannel.open(StandardProtocolFamily.UNIX).bind(null, 0); - } - - public static SocketAddress unixSocketAddressOf(String s) { - return UnixDomainSocketAddress.of(s); - } -} diff --git a/daemon/pom.xml b/daemon/pom.xml index 2575fd01a..122952490 100644 --- a/daemon/pom.xml +++ b/daemon/pom.xml @@ -94,14 +94,11 @@ <dependency> <groupId>org.eclipse.sisu</groupId> <artifactId>org.eclipse.sisu.inject</artifactId> - <version>${sisu.version}</version> - <scope>compile</scope> </dependency> <dependency> <groupId>com.google.inject</groupId> <artifactId>guice</artifactId> - <version>6.0.0</version> </dependency> <dependency> diff --git a/dist/pom.xml b/dist/pom.xml index cdf46b1cd..c88c3e5ee 100644 --- a/dist/pom.xml +++ b/dist/pom.xml @@ -59,7 +59,6 @@ <dependency> <groupId>com.google.inject</groupId> <artifactId>guice</artifactId> - <version>6.0.0</version> <scope>provided</scope> </dependency> </dependencies> diff --git a/integration-tests/pom.xml b/integration-tests/pom.xml index cec7352f4..e0d19b486 100644 --- a/integration-tests/pom.xml +++ b/integration-tests/pom.xml @@ -40,8 +40,6 @@ org/junit/platform/junit-platform-commons/${junit-platform-launcher.version} org/junit/jupiter/junit-jupiter/${junit.jupiter.version} org/junit/jupiter/junit-jupiter-api/${junit.jupiter.version}</preinstall.artifacts> - - <testcontainers.version>1.19.8</testcontainers.version> </properties> <dependencies> @@ -85,13 +83,11 @@ <dependency> <groupId>org.testcontainers</groupId> <artifactId>testcontainers</artifactId> - <version>${testcontainers.version}</version> <scope>test</scope> </dependency> <dependency> <groupId>org.testcontainers</groupId> <artifactId>junit-jupiter</artifactId> - <version>${testcontainers.version}</version> <scope>test</scope> </dependency> </dependencies> diff --git a/logging/pom.xml b/logging/pom.xml index ad76eed16..960153dfd 100644 --- a/logging/pom.xml +++ b/logging/pom.xml @@ -97,7 +97,6 @@ <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>build-helper-maven-plugin</artifactId> - <version>3.6.0</version> <executions> <execution> <id>add-unpacked-source-dir</id> diff --git a/native/pom.xml b/native/pom.xml index 63032e03a..cc7cd9589 100644 --- a/native/pom.xml +++ b/native/pom.xml @@ -28,10 +28,6 @@ <packaging>jar</packaging> <name>Maven Daemon - Native Library</name> - <properties> - <picocli.version>4.7.6</picocli.version> - </properties> - <dependencies> <dependency> <groupId>org.junit.jupiter</groupId> @@ -46,7 +42,6 @@ <dependency> <groupId>info.picocli</groupId> <artifactId>picocli-codegen</artifactId> - <version>${picocli.version}</version> <scope>test</scope> </dependency> </dependencies> diff --git a/pom.xml b/pom.xml index a6d42918d..9aa8d4433 100644 --- a/pom.xml +++ b/pom.xml @@ -90,6 +90,7 @@ <maven.resolver.version>2.0.0-alpha-11</maven.resolver.version> <slf4j.version>2.0.11</slf4j.version> <sisu.version>0.9.0.M2</sisu.version> + <maven.plugin-tools.version>3.13.1</maven.plugin-tools.version> <!-- plugin versions a..z --> <buildnumber-maven-plugin.version>3.2.0</buildnumber-maven-plugin.version> @@ -99,9 +100,12 @@ <takari-provisio.version>1.0.25</takari-provisio.version> <javassist.version>3.30.2-GA</javassist.version> - <xstream.version>1.4.20</xstream.version> + <picocli.version>4.7.6</picocli.version> <plexus-interactivity-api.version>1.3</plexus-interactivity-api.version> + <roaster.version>2.29.0.Final</roaster.version> <takari-smart-builder.version>0.6.6</takari-smart-builder.version> + <testcontainers.version>1.19.8</testcontainers.version> + <xstream.version>1.4.20</xstream.version> </properties> <dependencyManagement> @@ -148,6 +152,11 @@ <version>${jakarta.inject.version}</version> </dependency> + <dependency> + <groupId>org.apache.maven</groupId> + <artifactId>maven-plugin-api</artifactId> + <version>${maven.version}</version> + </dependency> <dependency> <groupId>org.apache.maven</groupId> <artifactId>maven-model</artifactId> @@ -175,6 +184,11 @@ <classifier>bin</classifier> <type>tar.gz</type> </dependency> + <dependency> + <groupId>org.apache.maven.plugin-tools</groupId> + <artifactId>maven-plugin-annotations</artifactId> + <version>${maven.plugin-tools.version}</version> + </dependency> <dependency> <groupId>org.apache.maven.resolver</groupId> @@ -262,11 +276,33 @@ <version>${project.version}</version> </dependency> + <dependency> + <groupId>io.takari.maven</groupId> + <artifactId>takari-smart-builder</artifactId> + <version>${takari-smart-builder.version}</version> + </dependency> + <dependency> <groupId>org.eclipse.sisu</groupId> <artifactId>org.eclipse.sisu.inject</artifactId> <version>${sisu.version}</version> </dependency> + <dependency> + <groupId>org.eclipse.sisu</groupId> + <artifactId>org.eclipse.sisu.plexus</artifactId> + <version>${sisu.version}</version> + </dependency> + <dependency> + <groupId>com.google.inject</groupId> + <artifactId>guice</artifactId> + <version>6.0.0</version> + </dependency> + <dependency> + <groupId>com.google.guava</groupId> + <artifactId>guava</artifactId> + <version>33.2.1-jre</version> + <scope>provided</scope> + </dependency> <dependency> <groupId>org.jline</groupId> @@ -289,6 +325,12 @@ <version>${jline.version}</version> </dependency> + <dependency> + <groupId>info.picocli</groupId> + <artifactId>picocli-codegen</artifactId> + <version>${picocli.version}</version> + </dependency> + <dependency> <groupId>org.slf4j</groupId> <artifactId>log4j-over-slf4j</artifactId> @@ -304,6 +346,11 @@ <artifactId>jul-to-slf4j</artifactId> <version>${slf4j.version}</version> </dependency> + <dependency> + <groupId>org.jboss.forge.roaster</groupId> + <artifactId>roaster-jdt</artifactId> + <version>${roaster.version}</version> + </dependency> <dependency> <groupId>org.javassist</groupId> @@ -323,15 +370,14 @@ </dependency> <dependency> - <groupId>io.takari.maven</groupId> - <artifactId>takari-smart-builder</artifactId> - <version>${takari-smart-builder.version}</version> + <groupId>org.testcontainers</groupId> + <artifactId>testcontainers</artifactId> + <version>${testcontainers.version}</version> </dependency> <dependency> - <groupId>com.google.guava</groupId> - <artifactId>guava</artifactId> - <version>33.2.0-jre</version> - <scope>provided</scope> + <groupId>org.testcontainers</groupId> + <artifactId>junit-jupiter</artifactId> + <version>${testcontainers.version}</version> </dependency> </dependencies> </dependencyManagement> @@ -339,6 +385,11 @@ <build> <pluginManagement> <plugins> + <plugin> + <groupId>org.apache.maven.daemon</groupId> + <artifactId>mvnd-build-maven-plugin</artifactId> + <version>${project.version}</version> + </plugin> <plugin> <groupId>com.diffplug.spotless</groupId> <artifactId>spotless-maven-plugin</artifactId> @@ -416,6 +467,26 @@ <artifactId>native-maven-plugin</artifactId> <version>${graalvm.plugin.version}</version> </plugin> + + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-dependency-plugin</artifactId> + <version>3.7.0</version> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-javadoc-plugin</artifactId> + <version>3.7.0</version> + <configuration> + <release>${maven-dist.required.jdk}</release> + <detectJavaApiLink>false</detectJavaApiLink> + </configuration> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-plugin-plugin</artifactId> + <version>${maven.plugin-tools.version}</version> + </plugin> <plugin> <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-release-plugin</artifactId> @@ -435,6 +506,12 @@ <artifactId>maven-wrapper-plugin</artifactId> <version>3.3.2</version> </plugin> + + <plugin> + <groupId>org.codehaus.mojo</groupId> + <artifactId>build-helper-maven-plugin</artifactId> + <version>3.6.0</version> + </plugin> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId>