From 8a9c244a9829b6040655fe3750579902cf563a60 Mon Sep 17 00:00:00 2001 From: Guillaume Nodet Date: Wed, 15 Jan 2025 19:51:29 +0100 Subject: [PATCH] [MNG-8522] Deprecate maven-builder-support artifact and its classes (#2043) --- compat/maven-builder-support/pom.xml | 7 ++++++- .../java/org/apache/maven/building/DefaultProblem.java | 2 ++ .../org/apache/maven/building/DefaultProblemCollector.java | 2 ++ .../main/java/org/apache/maven/building/FileSource.java | 2 ++ .../src/main/java/org/apache/maven/building/Problem.java | 2 ++ .../java/org/apache/maven/building/ProblemCollector.java | 2 ++ .../org/apache/maven/building/ProblemCollectorFactory.java | 2 ++ .../src/main/java/org/apache/maven/building/Source.java | 2 ++ .../main/java/org/apache/maven/building/StringSource.java | 2 ++ .../src/main/java/org/apache/maven/building/UrlSource.java | 2 ++ 10 files changed, 24 insertions(+), 1 deletion(-) diff --git a/compat/maven-builder-support/pom.xml b/compat/maven-builder-support/pom.xml index f7e9308aff14..7d3dc20a26b5 100644 --- a/compat/maven-builder-support/pom.xml +++ b/compat/maven-builder-support/pom.xml @@ -30,10 +30,15 @@ under the License. maven-builder-support - Maven Builder Support + Maven Builder Support (deprecated) Support for descriptor builders (model, setting, toolchains) + + org.apache.maven + maven-api-core + provided + org.junit.jupiter junit-jupiter-api diff --git a/compat/maven-builder-support/src/main/java/org/apache/maven/building/DefaultProblem.java b/compat/maven-builder-support/src/main/java/org/apache/maven/building/DefaultProblem.java index 4710c8e4cb15..19beeb576e3b 100644 --- a/compat/maven-builder-support/src/main/java/org/apache/maven/building/DefaultProblem.java +++ b/compat/maven-builder-support/src/main/java/org/apache/maven/building/DefaultProblem.java @@ -23,7 +23,9 @@ * thrown or a simple string message. In addition, a problem carries a hint about its source, e.g. the settings file * that exhibits the problem. * + * @deprecated since 4.0.0, use {@link org.apache.maven.api.services} instead */ +@Deprecated(since = "4.0.0") class DefaultProblem implements Problem { private final String source; diff --git a/compat/maven-builder-support/src/main/java/org/apache/maven/building/DefaultProblemCollector.java b/compat/maven-builder-support/src/main/java/org/apache/maven/building/DefaultProblemCollector.java index 181c58e6606d..b545bc1c4df8 100644 --- a/compat/maven-builder-support/src/main/java/org/apache/maven/building/DefaultProblemCollector.java +++ b/compat/maven-builder-support/src/main/java/org/apache/maven/building/DefaultProblemCollector.java @@ -24,7 +24,9 @@ /** * Collects problems that are encountered during settings building. * + * @deprecated since 4.0.0, use {@link org.apache.maven.api.services} instead */ +@Deprecated(since = "4.0.0") class DefaultProblemCollector implements ProblemCollector { private final List problems; diff --git a/compat/maven-builder-support/src/main/java/org/apache/maven/building/FileSource.java b/compat/maven-builder-support/src/main/java/org/apache/maven/building/FileSource.java index bc6aa6381580..6074ba312d5b 100644 --- a/compat/maven-builder-support/src/main/java/org/apache/maven/building/FileSource.java +++ b/compat/maven-builder-support/src/main/java/org/apache/maven/building/FileSource.java @@ -28,7 +28,9 @@ /** * Wraps an ordinary {@link File} as a source. * + * @deprecated since 4.0.0, use {@link org.apache.maven.api.services} instead */ +@Deprecated(since = "4.0.0") public class FileSource implements Source { private final Path path; diff --git a/compat/maven-builder-support/src/main/java/org/apache/maven/building/Problem.java b/compat/maven-builder-support/src/main/java/org/apache/maven/building/Problem.java index 7e315862e525..40c87f14fd0e 100644 --- a/compat/maven-builder-support/src/main/java/org/apache/maven/building/Problem.java +++ b/compat/maven-builder-support/src/main/java/org/apache/maven/building/Problem.java @@ -23,7 +23,9 @@ * thrown or a simple string message. In addition, a problem carries a hint about its source, e.g. the settings file * that exhibits the problem. * + * @deprecated since 4.0.0, use {@link org.apache.maven.api.services} instead */ +@Deprecated(since = "4.0.0") public interface Problem { /** diff --git a/compat/maven-builder-support/src/main/java/org/apache/maven/building/ProblemCollector.java b/compat/maven-builder-support/src/main/java/org/apache/maven/building/ProblemCollector.java index 89cee194f5f2..1e0b5473a5ac 100644 --- a/compat/maven-builder-support/src/main/java/org/apache/maven/building/ProblemCollector.java +++ b/compat/maven-builder-support/src/main/java/org/apache/maven/building/ProblemCollector.java @@ -23,7 +23,9 @@ /** * Collects problems that are encountered during settings building. * + * @deprecated since 4.0.0, use {@link org.apache.maven.api.services} instead */ +@Deprecated(since = "4.0.0") public interface ProblemCollector { /** diff --git a/compat/maven-builder-support/src/main/java/org/apache/maven/building/ProblemCollectorFactory.java b/compat/maven-builder-support/src/main/java/org/apache/maven/building/ProblemCollectorFactory.java index f169b5b2e95e..bbae68915c67 100644 --- a/compat/maven-builder-support/src/main/java/org/apache/maven/building/ProblemCollectorFactory.java +++ b/compat/maven-builder-support/src/main/java/org/apache/maven/building/ProblemCollectorFactory.java @@ -23,7 +23,9 @@ /** * * @since 3.3.0 + * @deprecated since 4.0.0, use {@link org.apache.maven.api.services} instead */ +@Deprecated(since = "4.0.0") public class ProblemCollectorFactory { /** diff --git a/compat/maven-builder-support/src/main/java/org/apache/maven/building/Source.java b/compat/maven-builder-support/src/main/java/org/apache/maven/building/Source.java index ed1a38c53e6d..b46973e43427 100644 --- a/compat/maven-builder-support/src/main/java/org/apache/maven/building/Source.java +++ b/compat/maven-builder-support/src/main/java/org/apache/maven/building/Source.java @@ -24,7 +24,9 @@ /** * Provides access to the contents of a source independently of the backing store (e.g. file system, database, memory). * + * @deprecated since 4.0.0, use {@link org.apache.maven.api.services} instead */ +@Deprecated(since = "4.0.0") public interface Source { /** diff --git a/compat/maven-builder-support/src/main/java/org/apache/maven/building/StringSource.java b/compat/maven-builder-support/src/main/java/org/apache/maven/building/StringSource.java index 12e6488ffb24..6574df593a67 100644 --- a/compat/maven-builder-support/src/main/java/org/apache/maven/building/StringSource.java +++ b/compat/maven-builder-support/src/main/java/org/apache/maven/building/StringSource.java @@ -26,7 +26,9 @@ /** * Wraps an ordinary {@link CharSequence} as a source. * + * @deprecated since 4.0.0, use {@link org.apache.maven.api.services} instead */ +@Deprecated(since = "4.0.0") public class StringSource implements Source { private final String content; diff --git a/compat/maven-builder-support/src/main/java/org/apache/maven/building/UrlSource.java b/compat/maven-builder-support/src/main/java/org/apache/maven/building/UrlSource.java index 0a2b3dc6c342..19f160485b08 100644 --- a/compat/maven-builder-support/src/main/java/org/apache/maven/building/UrlSource.java +++ b/compat/maven-builder-support/src/main/java/org/apache/maven/building/UrlSource.java @@ -26,7 +26,9 @@ /** * Wraps an ordinary {@link URL} as a source. * + * @deprecated since 4.0.0, use {@link org.apache.maven.api.services} instead */ +@Deprecated(since = "4.0.0") public class UrlSource implements Source { private final URL url;