I have a project Project C which has a dependency on the Maven's Bill of Materials (BOM) parent project Project P. The parent project Project P contains some of the code styles.
I do not which to apply these code styles to my child project Project C due to which when I run the mvn clean install on the child project Project C, I get the error:
[ERROR] Failed to execute goal com.cosium.code:git-code-format-maven-plugin:3.4:validate-code-format (validate-code-format) on project project-c: Execution validate-code-format of goal com.cosium.code:git-code-format-maven-plugin:3.4:validate-code-format failed:
An API incompatibility was encountered while executing com.cosium.code:git-code-format-maven-plugin:3.4:validate-code-format: java.lang.IllegalAccessError: class com.google.googlejavaformat.java.JavaInput (in unnamed module @0x4a320414)
cannot access class com.sun.tools.javac.parser.Tokens$TokenKind (in module jdk.compiler) because module jdk.compiler does not export com.sun.tools.javac.parser to unnamed module @0x4a320414
I would like to turn off the checkstyle option in maven and would like to build the project. How to achieve this?
I looked at some answers like:
<skip>${skipFormatCode}</skip>
but nothing seems to work and getting the same error. Please suggest some work-arounds to this issue.