In its simplest terms I am trying to install the example plugin in ZKMAction2.zip to the local .m2 repository.
That is an empty project with a plugin in buildSrc
that even says in the description “It is in buildSrc
for sake of a simple example but should be extracted.”. So what you have there seems to just be a showcase and not something that is ready-to-use.
With earlier versions of Gradle I could simply say “gradle build install”. That no longer works with Gradle 8.
That’s not correct. With ancient version of Gradle you had to apply the maven
plugin and if you are not happy with the defaults configure it, then were able to use the install
task.
With current versions you apply the maven-publish
plugin and if you are not happy with the defaults configure it, then are able to use the publishToMavenLocal
task.
And as I said, in the default configuration there is no publication defined, so there is nothing to publish.
Just have a look at the documentation at Maven Publish Plugin.
But even then, again, that is an empty project there is nothing that you could configure to be published like it is.
Firstly, is publishToMavenLocal
task the appropriate way of installing a plugin to the local repository or is there a better way?
Scratch “a plugin” and replace it by “something” and it is correct, yes. That is the way to publish all defined publications to maven local. Once there are multiple publications, there are also tasks for only publishing a specific publication and publishToMavenLocal
just depends on all of those as described in the docs.
There do not seem to be any version 8, end to end full detail examples available on the Internet.
???
Practically any build that is published somewhere is a complete end-to-end example.
Just to be clear, I did not create the plugin that I am now trying to install. It was given to me by members of the Gradle development team
Maybe you should contact those people then to learn how you should use what you were given? 
as the recommended way of preventing Gradle from instrumenting a local JAR that is referenced by a plugin.
That sample project from a cursory look just seems to demonstrate how to use the worker API and does not seem to be a ready-to-use end product.