jdneo / vscode-checkstyle

Checkstyle extension for VS Code
https://marketplace.visualstudio.com/items?itemName=shengchen.vscode-checkstyle
GNU Lesser General Public License v3.0
68 stars 16 forks source link

Unable to build extension #351

Closed sbreakey closed 1 year ago

sbreakey commented 1 year ago

Following the steps listed in the contributing readme doc, I get an error when I run:

  1. Build the Java modules: npm run build-plugin

The error is:

[INFO] Scanning for projects...
[INFO] Resolving target definition file:/Users/stephenb/personal/vscode-checkstyle/jdtls.ext/com.shengchen.checkstyle.target/target.target for environments=[linux/gtk/x86_64, win32/win32/x86_64, macosx/cocoa/x86_64], include source mode=honor, execution environment=StandardEEResolutionHints [executionEnvironment=OSGi profile 'JavaSE-17' { source level: 17, target level: 17}], remote p2 repository options=org.eclipse.tycho.p2.remote.RemoteAgent@f59da34...
SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.
[ERROR] Cannot resolve target definition:
[ERROR]   Software being installed: org.eclipse.jdt.ls.core 1.29.0.202310051703
[ERROR]   Missing requirement: org.eclipse.jdt.ls.core 1.29.0.202310051703 requires 'osgi.bundle; org.eclipse.lsp4j [0.21.0.0,0.22.0)' but it could not be found
[ERROR] 
[ERROR] Failed to resolve target definition file:/Users/stephenb/personal/vscode-checkstyle/jdtls.ext/com.shengchen.checkstyle.target/target.target: See log for details -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MavenExecutionException

Googling for the error I noticed you seem to have fixed this here: https://github.com/microsoft/vscode-java-test/pull/1507

I tried to apply that fix, but am a true beginner so didn't get very far.

jdneo commented 1 year ago

Hi @sbreakey,

Thank you for reporting this. Since this extension contains a plugin of JDT.LS, usually such error will happen when the definition of the target platform does not match the definition used by JDT.LS: https://github.com/eclipse-jdtls/eclipse.jdt.ls/blob/master/org.eclipse.jdt.ls.target/org.eclipse.jdt.ls.tp.target.

I updated the out-of-date entries in #352. Things should work after that :)

sbreakey commented 1 year ago

That fixed it! Thanks for the quick turnaround!