Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failure on executing the goal check on spotless-maven-plugin (fail to to load eclipse groovy formatter) #1787

Closed
mmakieh opened this issue Aug 22, 2023 · 2 comments

Comments

@mmakieh
Copy link

mmakieh commented Aug 22, 2023

If you are submitting a bug, please include the following:

  • summary of problem:
    Our Jenkins pipeline builds are ending-up with error due to a failure on executing the goal check on spotless-maven-plugin. It looks like spotless is failing to load eclipse groovy formatter that we use to format the JenkinsFile of our projects.

  • apache maven version:
    3.9

  • spotless version:
    2.38.0

  • operating system and version:
    rhel 9

  • copy-paste your full Spotless configuration block(s), and a link to a public git repo that reproduces the problem if possible:
    <plugin> <groupId>com.diffplug.spotless</groupId> <artifactId>spotless-maven-plugin</artifactId> <version>${spotless-maven-plugin.version}</version> <configuration> <lineEndings>UNIX</lineEndings> <!-- define a language-specific format --> <java> <!-- apply a specific flavor of google-java-format --> <googleJavaFormat> <version>1.17.0</version> <style>GOOGLE</style> </googleJavaFormat> </java> <groovy> <includes> <include>Jenkinsfile*</include> </includes> <importOrder /> <greclipse> <version>4.26</version> </greclipse> </groovy> <pom> <sortPom /> </pom> <sql> <includes> <include>**/auto-formatted-sql/*.sql</include> </includes> <dbeaver /> </sql> <markdown> <includes> <include>**/*.md</include> </includes> <flexmark /> </markdown> <json> <includes> <include>**/*.json</include> </includes> <gson> <indentSpaces>2</indentSpaces> <sortByKeys>false</sortByKeys> <escapeHtml>false</escapeHtml> <version>2.10.1</version> </gson> </json> </configuration> </plugin>

  • copy-paste the full content of any console errors emitted by gradlew spotless[Apply/Check] --stacktrace:

    Example of console output of jenkins build of our project:

    [INFO] --- spotless:2.38.0:check (default-cli) @ farexplorer ---
    [INFO] ------------------------------------------------------------------------
    [INFO] BUILD FAILURE
    [INFO] ------------------------------------------------------------------------
    [INFO] Total time: 03:48 min (Wall Clock)
    [INFO] Finished at: 2023-08-22T13:15:24Z
    [INFO] ------------------------------------------------------------------------

    [ERROR] Failed to execute goal com.diffplug.spotless:spotless-maven-plugin:2.38.0:check (default-cli) on project farexplorer: Execution default-cli of goal com.diffplug.spotless:spotless-maven-plugin:2.38.0:check failed: java.io.IOException: Failed to load eclipse groovy formatter: java.lang.RuntimeException: java.net.ProtocolException: unexpected end of stream -> [Help 1]

@Jiehong
Copy link

Jiehong commented Aug 23, 2023

Experiencing the same, and the formatter seems to wait for a very long time at spotless:check maven plugin step until this exception is raised.

It seems to happen mostly during CI/CD for some reason

@nedtwigg
Copy link
Member

nedtwigg commented Dec 6, 2023

This is likely a dupe of #1658

@nedtwigg nedtwigg closed this as completed Dec 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants