Elasticsearch 8.5.1 Won't Build. Failed to Apply SpotlessPlugin

I am trying to build an instance of elasticsearch 8.5.1 in a linux environment. I have had to modify the gradle files to point to my company's artifact repositories. When I try to run any ./gradlew commands, I get the error below.

Build file '../elasticsearch-8.5.1/build-tools/build.gradle' line: 17

* What went wrong:
An exception occurred applying plugin request [id: 'elasticsearch.formatting']
> Failed to apply plugin class 'com.diffplug.gradle.spotless.SpotlessPlugin'.
   > Could not create an instance of type com.diffplug.gradle.spotless.SpotlessExtensionImpl.
      > Could not generate a decorated class for type SpotlessExtensionImpl.
         > com/diffplug/spotless/LineEnding

I've checked that spotless-plugin-gradle-6.7.2 is available in the repositories. Not sure why it is failing. Any help in figuring this out would be appreciated.

The only file I have modified are the settings.gradle files in the root diretory, build-tools, and build-conventions and the build.gradle files in build-tools, build-tools-internal, and build-conventions. I only pointed the repositories to my internal maven repositories. I haven't changed anything else.

The problem was that I had set the metadata source as artifact for one of the repositories that I shouldn't have. Removing that fixed the issue.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.