{"schemaVersion":"1.0","record":{"label":"Spring Cloud Contract","description":"Archived Spring contract-testing project with generated provider tests and consumer stubs.","aliases":[],"kind":"software","website":"https://spring.io/projects/spring-cloud-contract","overview":"Spring Cloud Contract is the archived Spring project for consumer- and producer-driven contract testing of HTTP and message interactions. Its definitions generate verification tests and reusable stubs; Spring transferred maintenance and ownership to the Stubborn project in July 2026.","license":"Apache-2.0","lifecycle":"discontinued","example":false,"features":[{"name":"Generated provider tests","status":"supported","detail":"Contract definitions produce verification tests requiring application-specific base setup.","useCase":"Legacy JVM contract verification","platforms":["JVM","Maven","Gradle"],"region":"Version, plan and platform requirements apply","evidence":[{"url":"https://docs.spring.io/spring-cloud-contract/reference/getting-started/first-application.html","locator":"DSL definitions, generated tests and required base class","retrievedAt":"2026-10-07T11:15:09Z","kind":"vendor"}]},{"name":"In-progress contract stubs","status":"limited","detail":"Stubs can exist before corresponding producer tests are generated or passing.","useCase":"Legacy JVM contract verification","platforms":["JVM","Maven","Gradle"],"region":"Version, plan and platform requirements apply","evidence":[{"url":"https://docs.spring.io/spring-cloud-contract/reference/project-features-stubrunner/stub-runner-generate-stubs-at-runtime.html","locator":"In-progress contracts and unverified generated stubs","retrievedAt":"2026-10-07T11:14:19Z","kind":"vendor"}]},{"name":"Spring-maintained updates","status":"unsupported","detail":"Spring ended maintenance and transferred the project to Stubborn.","useCase":"Legacy JVM contract verification","platforms":["JVM","Maven","Gradle"],"region":"Version, plan and platform requirements apply","evidence":[{"url":"https://spring.io/blog/2026/07/06/spring-cloud-contract-transition-to-stubbornsh/","locator":"End of Spring maintenance and release-train removal","retrievedAt":"2026-10-07T11:15:09Z","kind":"vendor"}]}],"alternatives":[],"slug":"spring-cloud-contract","draftAlternatives":[{"targetSlug":"pact-js","status":"limited","detail":"Limited legacy JVM alternative for interface verification through defined contracts and generated tests; not interchangeable JavaScript contracts and no ongoing Spring maintenance.","useCase":"Legacy JVM contract verification","platforms":["JVM","Maven","Gradle"],"region":"Version, plan and platform requirements apply","evidence":[{"url":"https://docs.spring.io/spring-cloud-contract/reference/getting-started/first-application.html","locator":"DSL definitions, generated tests and required base class","retrievedAt":"2026-10-07T11:15:09Z","kind":"vendor"},{"url":"https://spring.io/blog/2026/07/06/spring-cloud-contract-transition-to-stubbornsh/","locator":"End of Spring maintenance and release-train removal","retrievedAt":"2026-10-07T11:15:09Z","kind":"vendor"},{"url":"https://github.com/pact-foundation/pact-js/blob/master/README.md","locator":"JavaScript contract testing and framework integration","retrievedAt":"2026-10-07T11:14:26Z","kind":"vendor"}]}],"evidence":[{"url":"https://docs.spring.io/spring-cloud-contract/reference/index.html","locator":"Consumer/provider contract scope","retrievedAt":"2026-10-07T11:14:49Z","kind":"vendor"},{"url":"https://github.com/spring-attic/spring-cloud-contract","locator":"Archive notice, maintenance transfer and Apache-2.0","retrievedAt":"2026-10-07T11:14:58Z","kind":"vendor"},{"url":"https://spring.io/blog/2026/07/06/spring-cloud-contract-transition-to-stubbornsh/","locator":"End of Spring maintenance and release-train removal","retrievedAt":"2026-10-07T11:15:09Z","kind":"vendor"}],"document":{"version":1,"references":[{"url":"https://github.com/spring-attic/spring-cloud-contract","locator":"Archive notice, maintenance transfer and Apache-2.0","retrievedAt":"2026-10-07T11:14:58Z","id":"spring-contract-archive","title":"Spring Cloud Contract archived repository","kind":"vendor"},{"url":"https://docs.spring.io/spring-cloud-contract/reference/index.html","locator":"Consumer/provider contract scope","retrievedAt":"2026-10-07T11:14:49Z","id":"spring-contract-intro","title":"Spring Cloud Contract reference","kind":"vendor"},{"url":"https://spring.io/blog/2026/07/06/spring-cloud-contract-transition-to-stubbornsh/","locator":"End of Spring maintenance and release-train removal","retrievedAt":"2026-10-07T11:15:09Z","id":"spring-contract-transition","title":"Spring announces Stubborn transition","kind":"vendor"},{"url":"https://docs.spring.io/spring-cloud-contract/reference/getting-started/first-application.html","locator":"DSL definitions, generated tests and required base class","retrievedAt":"2026-10-07T11:15:09Z","id":"spring-contract-first","title":"First Spring Cloud Contract application","kind":"vendor"},{"url":"https://docs.spring.io/spring-cloud-contract/reference/project-features-stubrunner/stub-runner-generate-stubs-at-runtime.html","locator":"In-progress contracts and unverified generated stubs","retrievedAt":"2026-10-07T11:14:19Z","id":"spring-contract-runtime","title":"Generating stubs at runtime","kind":"vendor"},{"url":"https://docs.stubborn.sh/contract/migration/from-spring-cloud-contract","locator":"Coordinates, DSL imports, JUnit and legacy-property/stub compatibility","retrievedAt":"2026-10-07T11:15:17Z","id":"stubborn-migration","title":"Migrating to Stubborn Contract","kind":"vendor"},{"url":"https://docs.pact.io/","locator":"Consumer-driven contracts by example","retrievedAt":"2026-10-07T11:14:10Z","id":"pact-intro","title":"Pact introduction","kind":"vendor"},{"url":"https://github.com/pact-foundation/pact-js/blob/master/README.md","locator":"JavaScript contract testing and framework integration","retrievedAt":"2026-10-07T11:14:26Z","id":"pact-js-readme","title":"Pact JS repository","kind":"vendor"}],"overviewCitations":["spring-contract-intro","spring-contract-archive","spring-contract-transition"],"licenseCitations":["spring-contract-archive"],"sections":[{"id":"generation","heading":"Contracts and generated verification","paragraphs":[{"id":"generation-detail","content":[{"text":"The documented workflow adds Contract Verifier and its build plugin, then defines expected HTTP or messaging interactions in contract files such as Groovy DSL or YAML. The build generates tests that check whether the application satisfies those definitions. Generated tests need a suitable base class to configure controllers, messaging infrastructure or other test context; writing the contract does not by itself supply a working application implementation."}],"citations":["spring-contract-first"]}]},{"id":"stubs","heading":"Consumer fixtures and incomplete contracts","paragraphs":[{"id":"stubs-detail","content":[{"text":"Generated stubs allow consumers to work against defined behavior. The runtime-stub documentation distinguishes normal producer verification from contracts marked in progress: those can produce stubs without generating the corresponding producer tests. Consumers can also request fresh stub generation from contract definitions. Such a fixture can unblock development, but its availability should not be treated as evidence that the producer has already passed verification."}],"citations":["spring-contract-runtime"]}]},{"id":"lifecycle","heading":"End of Spring maintenance","paragraphs":[{"id":"lifecycle-detail","content":[{"text":"Spring announced the ownership and support transfer on July 6, 2026, stating that the project would leave future Spring Cloud release trains and stop receiving Spring maintenance in existing active trains. The repository was subsequently archived. Its Apache-2.0 code and documentation remain available, but the Spring-branded project is a legacy dependency rather than an actively maintained new adoption target."}],"citations":["spring-contract-transition","spring-contract-archive"]}]},{"id":"successor","heading":"Moving to the continuation","paragraphs":[{"id":"successor-detail","content":[{"text":"The official continuation is "},{"text":"Stubborn Contract","targetSlug":"stubborn-contract"},{"text":". Its migration documentation preserves YAML contract structure and supports existing generated WireMock stubs, while changing build coordinates, Java package names and configuration prefixes. Groovy and Kotlin contracts need import updates, and JUnit 4 rule usage must move to JUnit 5 extensions. This is a documented migration path, not a claim that every build works unchanged merely by replacing a version number."}],"citations":["stubborn-migration"]}]},{"id":"fit","heading":"Substitution scope","paragraphs":[{"id":"fit-detail","content":[{"text":"For an existing JVM test suite, Spring Cloud Contract can fulfill some of the interface-verification tasks addressed by "},{"text":"Pact JS","targetSlug":"pact-js"},{"text":", using defined contracts and generated tests instead of JavaScript consumer tests. The overlap does not imply interchangeable artifacts or equal test coverage. Given the maintenance transfer, continued use should be assessed as legacy retention; the successor is the more direct migration route for established Spring Cloud Contract assets."}],"citations":["spring-contract-first","spring-contract-transition","pact-intro","pact-js-readme"]}]}]},"id":"Q878","revision":926,"updatedAt":"2026-10-13T13:31:24Z","sourceUrl":"https://substitutefor.net/entities/Q878?revision=926"}}