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
pull/12960/head
Stephane Nicoll 7 years ago
parent c9f04c3977
commit 55ef9e6dc9

@ -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<Exclude> excludes) {
@ -83,6 +85,7 @@ public abstract class AbstractDependencyFilterMojo extends AbstractMojo {
this.excludeGroupIds = excludeGroupIds;
}
@Deprecated
protected void setExcludeArtifactIds(String excludeArtifactIds) {
this.excludeArtifactIds = excludeArtifactIds;
}

@ -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 <<<groupId>>> and <<<artifactId>>>
(optionally with a <<<classifier>>> if needed)
* Exclude any artifact matching a given <<<artifactId>>>
* Exclude any artifact belonging to a given <<<groupId>>>
[]
@ -57,34 +55,7 @@
</project>
---
This example excludes any artifacts having the <<<my-lib>>> or <<<another-lib>>>
artifact identifiers
---
<project>
...
<build>
...
<plugins>
...
<plugin>
<groupId>${project.groupId}</groupId>
<artifactId>${project.artifactId}</artifactId>
<version>${project.version}</version>
<configuration>
<excludeArtifactIds>my-lib,another-lib</excludeArtifactIds>
</configuration>
...
</plugin>
...
</plugins>
...
</build>
...
</project>
---
Finally this example excludes any artifact belonging to the <<<com.foo>>> group
This example excludes any artifact belonging to the <<<com.foo>>> group
---

Loading…
Cancel
Save