From 3e5637eef8c384b88857bb2c358750e98d785b50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Kautler?= Date: Sat, 19 Apr 2025 22:48:24 +0200 Subject: [PATCH 1/2] Update release notes regarding removal of Ant code and potential replacements --- docs/release_notes.adoc | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/docs/release_notes.adoc b/docs/release_notes.adoc index d8a444b309..6cb039f6d9 100644 --- a/docs/release_notes.adoc +++ b/docs/release_notes.adoc @@ -664,9 +664,16 @@ It can be set back to the old pre Spock 2.0 behaviour by setting will be thrown at runtime. // tag::breaking-change-removed-ant-support[] -==== Ant support removed -`SpecClassFileSelector` was removed, which was the only class that required `ant`. -If you are still using spock with `ant`, then you can just copy the class from the spock source code into your build. +==== Ant custom selector removed +The class `SpecClassFileSelector` that could be used to only select actual Spock specification classes when testing +and creating a test report was removed. It was the only class that required `ant` and was basically just a one-line +forward to the `SpecClassFileFinder` which is still available. + +If you are still using Spock with `ant`, then you can just copy the class from the spock source code into your build, +or you simply use a `` that does this forwarding as shown in the `spock-example` project. + +Alternatively, you can also use a naming convention to find the classes that are actual specifications and not helper +or base classes, or you live with a bit of wasted time and some meaningless entries in the test reports. // end::breaking-change-removed-ant-support[] === Misc From 1e2f16ab10bea14e7090f9296336f247c7208e51 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Kautler?= Date: Fri, 25 Apr 2025 23:25:46 +0200 Subject: [PATCH 2/2] Review Feedback Vol. 1 --- docs/getting_started.adoc | 7 +++---- docs/include.adoc | 2 ++ docs/release_notes.adoc | 12 +++++++----- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/docs/getting_started.adoc b/docs/getting_started.adoc index bf8db363d5..273347fa64 100644 --- a/docs/getting_started.adoc +++ b/docs/getting_started.adoc @@ -11,7 +11,6 @@ So why not run https://groovyconsole.dev/?g=groovy_4_0&codez=eNpdizEKg0AQRfs9xU8 == Spock Example Project -To try Spock in your local environment, clone or download/unzip the -https://github.com/spockframework/spock-example[Spock Example Project]. It comes with fully working Ant, Gradle, and -Maven builds that require no further setup. The Gradle build even bootstraps Gradle itself and gets you up and -running in Eclipse or IDEA with a single command. See the README for detailed instructions. +To try Spock in your local environment, clone or download/unzip the {spock-example-project}[Spock Example Project]. +It comes with fully working Ant, Gradle, and Maven builds that require no further setup. The Gradle build even bootstraps +Gradle itself and gets you up and running in Eclipse or IDEA with a single command. See the README for detailed instructions. diff --git a/docs/include.adoc b/docs/include.adoc index 713bcaf665..cace620776 100644 --- a/docs/include.adoc +++ b/docs/include.adoc @@ -34,3 +34,5 @@ :base-sourcedir-spring-boot: spock-spring/boot2-test/src/test/groovy/org/spockframework/boot2 :sourcedir-spring-boot: ../{base-sourcedir-spring-boot} :github-sourcedir-spring-boot: {github-blob-base}/{commit-ish}/{base-sourcedir-spring-boot} +// Common Includes +:spock-example-project: https://github.com/spockframework/spock-example diff --git a/docs/release_notes.adoc b/docs/release_notes.adoc index 6cb039f6d9..6e6d154338 100644 --- a/docs/release_notes.adoc +++ b/docs/release_notes.adoc @@ -1,7 +1,8 @@ [[release-notes]] = Release Notes - include::include.adoc[] +:SpecClassFileSelector: https://github.com/spockframework/spock/blob/03818ed010f4b4ca1136a292e214f79d518c4abe/spock-core/src/main/java/org/spockframework/buildsupport/ant/SpecClassFileSelector.java +:scriptselector: {spock-example-project}/blob/963fd34d1609b7025ba92502483ce31b2c6d9d0a/build.xml#L167-L176 == 2.4 (tbd) @@ -669,8 +670,9 @@ The class `SpecClassFileSelector` that could be used to only select actual Spock and creating a test report was removed. It was the only class that required `ant` and was basically just a one-line forward to the `SpecClassFileFinder` which is still available. -If you are still using Spock with `ant`, then you can just copy the class from the spock source code into your build, -or you simply use a `` that does this forwarding as shown in the `spock-example` project. +If you are still using Spock with `ant`, then you can just copy {SpecClassFileSelector}[the class from the spock source code] +into your build, or you simply use a {scriptselector}[``] that does this forwarding as shown in the +{spock-example-project}[Spock Example Project]. Alternatively, you can also use a naming convention to find the classes that are actual specifications and not helper or base classes, or you live with a bit of wasted time and some meaningless entries in the test reports. @@ -1229,7 +1231,7 @@ Howard M. Lewis Ship, Ken Sipe, Venkat Subramaniam, Russel Winder. * Improved and restyled reference documentation at https://docs.spockframework.org. Generated with https://asciidoctor.org/[Asciidoctor] (what else?). * Maven plugin removed. Just let Maven Surefire run your Spock specs like your JUnit tests - (see https://examples.spockframework.org[spock-example] project). + (see {spock-example-project}[spock-example] project). * Official support for Java 1.8, Groovy 2.3 and Groovy 2.4. Make sure to pick the `groovy-2.0` binaries for Groovy 2.0/2.1/2.2, `groovy-2.3` binaries for Groovy 2.3, and `groovy-2.4` binaries for Groovy 2.4 and higher. * Improved infrastructure to allow for easier community involvement: Switch to @@ -1787,7 +1789,7 @@ their types inferred from the values in the table (!). === GitHub Repository All source code has moved to https://github.spockframework.org/. The https://github.spockframework.org/spock-grails[Grails Spock plugin], -https://github.spockframework.org/spock-example[Spock Example] project, and +{spock-example-project}[Spock Example] project, and https://github.spockframework.org/spockwebconsole[Spock Web Console] now have their own GitHub projects. Also available are slides and code for various Spock presentations (such as https://github.spockframework.org/smarter-testing-with-spock[this one]).