resilience: prove spring-boot-starter-aop was renamed to spring-boot-starter-aspectj, not removed
Maven Central's maven-metadata.xml for both artifact IDs, read together, shows aop's last release is 4.0.0-M2 and aspectj's first release is 4.0.0-M3 -- a rename at a milestone boundary, not a drop. The renamed starter's own published POM depends on exactly spring-aop + aspectjweaver, the two jars this pom.xml's dependency comment already claimed were needed; this commit adds the reproducible build-break proof, the metadata/POM evidence, and a new doc chapter, and backs the corrected companion-repo links from the resilience4j- circuit-breaker-spring-boot post.
This commit is contained in:
@@ -0,0 +1,59 @@
|
||||
← [What is left for Resilience4j](06-what-is-left-for-resilience4j.md) | [Migrating from spring-retry](07-migrating-from-spring-retry.md) →
|
||||
|
||||
# `spring-boot-starter-aop` was renamed, not removed
|
||||
|
||||
Every pre-Boot-4 AOP or Resilience4j guide tells you to add `spring-boot-starter-aop` when an
|
||||
annotation (`@Retryable`, `@ConcurrencyLimit`, Resilience4j's `@CircuitBreaker`, plain `@Aspect`
|
||||
beans, anything proxy-based) needs AspectJ on the classpath. On Boot 4.1, adding that dependency
|
||||
breaks the build before the application ever starts:
|
||||
|
||||
```
|
||||
[ERROR] 'dependencies.dependency.version' for org.springframework.boot:spring-boot-starter-aop:jar is missing.
|
||||
```
|
||||
|
||||
Captured by [`scripts/reproduce-starter-aop-break.sh`](../scripts/reproduce-starter-aop-break.sh)
|
||||
against the minimal [`broken-example/pom.xml`](../broken-example/pom.xml), which adds only that
|
||||
one dependency: [`00a-starter-aop-build-error.txt`](output/00a-starter-aop-build-error.txt).
|
||||
|
||||
## It was renamed, not dropped
|
||||
|
||||
It is tempting to read that error as "the starter is gone, assemble `spring-aop` and
|
||||
`aspectjweaver` by hand instead" -- an earlier version of the sibling post this repo also serves
|
||||
said exactly that. It is half right and half wrong. Maven Central's `maven-metadata.xml` for both
|
||||
artifact IDs, read together, settles it:
|
||||
[`00b-starter-aspectj-metadata-timeline.txt`](output/00b-starter-aspectj-metadata-timeline.txt).
|
||||
|
||||
`spring-boot-starter-aop`'s last-ever published version is `4.0.0-M2`. `spring-boot-starter-aspectj`'s
|
||||
first-ever published version is `4.0.0-M3` -- the very next milestone in the same 4.0 line, and it
|
||||
carries straight through to the 4.0.0 GA and every 4.1.x release since. That is a rename at a
|
||||
specific milestone boundary, not an unrelated new artifact and not a starter dropped with nothing
|
||||
replacing it.
|
||||
|
||||
The renamed starter's own published POM confirms it bundles exactly the two jars this module's
|
||||
`pom.xml` needs:
|
||||
[`00c-starter-aspectj-pom-dependencies.txt`](output/00c-starter-aspectj-pom-dependencies.txt).
|
||||
|
||||
```xml
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-aspectj</artifactId>
|
||||
</dependency>
|
||||
```
|
||||
|
||||
is all this module adds (see [`pom.xml`](../pom.xml)) -- one line, version-managed by the parent
|
||||
POM like any other starter, resolving to `spring-aop` + `aspectjweaver` underneath. Assembling
|
||||
those two dependencies by hand still works and behaves identically, since it's what the starter
|
||||
does anyway, but there's no longer a reason to: the starter has the same name shape as every
|
||||
other Boot starter, it's just spelled `aspectj` instead of `aop` from the 4.0 line onward.
|
||||
|
||||
<blockquote>If you're on a build that still references <code>spring-boot-starter-aop</code> after
|
||||
upgrading to Boot 4, the fix is a rename in your <code>pom.xml</code>, not a rewrite: swap the
|
||||
<code>artifactId</code> to <code>spring-boot-starter-aspectj</code> and nothing else changes.</blockquote>
|
||||
|
||||
## Going deeper
|
||||
|
||||
- [`pom.xml`](../pom.xml) -- this module's own dependency, with the corrected comment
|
||||
- Maven Central: [`spring-boot-starter-aop/maven-metadata.xml`](https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-starter-aop/maven-metadata.xml) and [`spring-boot-starter-aspectj/maven-metadata.xml`](https://repo1.maven.org/maven2/org/springframework/boot/spring-boot-starter-aspectj/maven-metadata.xml) -- rel="nofollow"
|
||||
- [Resilience4j Circuit Breaker in Spring Boot 4.1: What It's Still For](https://ankurm.com/resilience4j-circuit-breaker-spring-boot/) -- the sibling post this same correction applies to
|
||||
|
||||
← [What is left for Resilience4j](06-what-is-left-for-resilience4j.md) | [Migrating from spring-retry](07-migrating-from-spring-retry.md) →
|
||||
Reference in New Issue
Block a user