From 55ef9e6dc9c7af64db4f5b90ddd10ba7a7aa5c19 Mon Sep 17 00:00:00 2001 From: Stephane Nicoll Date: Tue, 24 Apr 2018 13:25:58 +0200 Subject: [PATCH] Deprecate excludeArtifactIds While being able to exclude all artifacts of a given group is a handy feature, excluding all artifacts with a given artifactId does not make much sense as it should refer to a single artifact anyway. Also the general "exclude" mechanism is meant to do the exact same thing. Closes gh-12885 --- .../maven/AbstractDependencyFilterMojo.java | 5 ++- .../apt/examples/exclude-dependency.apt.vm | 33 ++----------------- 2 files changed, 6 insertions(+), 32 deletions(-) diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/AbstractDependencyFilterMojo.java b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/AbstractDependencyFilterMojo.java index 8fdfff237c..e4576c112d 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/AbstractDependencyFilterMojo.java +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/main/java/org/springframework/boot/maven/AbstractDependencyFilterMojo.java @@ -1,5 +1,5 @@ /* - * Copyright 2012-2017 the original author or authors. + * Copyright 2012-2018 the original author or authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -67,8 +67,10 @@ public abstract class AbstractDependencyFilterMojo extends AbstractMojo { /** * Comma separated list of artifact names to exclude (exact match). * @since 1.1 + * @deprecated as of 2.0.2 in favour of {@code excludes} */ @Parameter(property = "spring-boot.excludeArtifactIds", defaultValue = "") + @Deprecated private String excludeArtifactIds; protected void setExcludes(List excludes) { @@ -83,6 +85,7 @@ public abstract class AbstractDependencyFilterMojo extends AbstractMojo { this.excludeGroupIds = excludeGroupIds; } + @Deprecated protected void setExcludeArtifactIds(String excludeArtifactIds) { this.excludeArtifactIds = excludeArtifactIds; } diff --git a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/site/apt/examples/exclude-dependency.apt.vm b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/site/apt/examples/exclude-dependency.apt.vm index b3f339449f..a992836991 100644 --- a/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/site/apt/examples/exclude-dependency.apt.vm +++ b/spring-boot-project/spring-boot-tools/spring-boot-maven-plugin/src/site/apt/examples/exclude-dependency.apt.vm @@ -15,13 +15,11 @@ executable jar. For consistency, they should not be present either when running the application. - There are three ways one can exclude a dependency from being packaged/used at runtime + There are two ways one can exclude a dependency from being packaged/used at runtime * Exclude a specific artifact identified by <<>> and <<>> (optionally with a <<>> if needed) - * Exclude any artifact matching a given <<>> - * Exclude any artifact belonging to a given <<>> [] @@ -57,34 +55,7 @@ --- - This example excludes any artifacts having the <<>> or <<>> - artifact identifiers - ---- - - ... - - ... - - ... - - ${project.groupId} - ${project.artifactId} - ${project.version} - - my-lib,another-lib - - ... - - ... - - ... - - ... - ---- - - Finally this example excludes any artifact belonging to the <<>> group + This example excludes any artifact belonging to the <<>> group ---