-
Notifications
You must be signed in to change notification settings - Fork 440
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
Java language server seems to fail to start due to not finding the parent project specified in pom.xml #702
Comments
We'll fix it. Could you attach a set of sample projects reproducing the bug? That'll help |
Coming over from #712 |
@dlee005c can you share a set of sample maven projects reproducing this issue? |
That's a little tricky. I can't expose my company's internal repository. Do you know of any publicly available internal maven repositories that contain unique artifacts? I'll try to find one. |
@dlee005c What do you mean by unique artifacts? unique by name? having a single version? Does your project build normally in Eclipse? |
i mean artifacts that aren't in the central repo. |
have you tried calling the |
Yes. Does not change anything. |
what's your Maven settings.xml configuration? (you can obfuscate any sensitive data) |
<?xml version="1.0" encoding="UTF-8"?>
<settings
xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<mirrors>
<mirror>
<!-- This sends everything else to /public -->
<id>nexus</id>
<mirrorOf>*</mirrorOf>
<url>http://my.nexus:8081/and/its/path</url>
</mirror>
</mirrors>
<profiles>
<profile>
<id>nexus</id>
<!-- Enable snapshots for the built in central repo to direct -->
<!-- all requests to nexus via the mirror -->
<repositories>
<repository>
<id>central</id>
<url>http://central</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<id>central</id>
<url>http://central</url>
<releases>
<enabled>true</enabled>
</releases>
<snapshots>
<enabled>true</enabled>
</snapshots>
</pluginRepository>
</pluginRepositories>
</profile>
</profiles>
<activeProfiles>
<!-- make the profile active all the time -->
<activeProfile>nexus</activeProfile>
</activeProfiles>
<pluginGroups>
<!-- define the sonatype plugin group, so the nexus plugins will work without typing the groupId -->
<pluginGroup>org.sonatype.plugins</pluginGroup>
</pluginGroups>
</settings> |
@fbricon is there a release slated any time soon? |
@tristan957 probably this Friday. but it should be light in features and bug fixes |
As long as it includes this fix, I would be extremely happy |
Otherwise the waiting game continues haha |
@dlee005c Could you try to remove the java.configuration.maven.userSettings property or use an absolute path (("java.configuration.maven.userSettings": "/home/<your_username>/.m2/settings.xml", for instance)? |
Took out my configuration and it works like a charm now. Thank you both for taking the time to help me sort through this. I'm very happy to being going back to this instead of eclipse. |
@snjeza would be nice if the server understood |
Was this supposed to have been fixed in 0.34? |
It is not for me. Running VSCode 1.29.1, extension version 0.34. Maybe I misreported my issue, but in the
In the output
|
Please open another ticket for the NPE, this is an orthogonal issue. The non-resolvable parent issue should have been fixed. @snjeza? |
I have fixed eclipse-jdtls/eclipse.jdt.ls#839. #723 is a separate issue. |
@snjeza I am having an issue where any dependencies that are stored in my personal Artifactory will not resolve. Anything in maven central resolves just fine. It appears that the plugin isn't referencing my local .m2/repository... I have set the variable in the configuration file, and I am using the latest version.
Is there something I am missing? |
@danmikita since "~/.m2/settings.xml" is the default location, you don't need to add it to your settings. See if removing it helps. |
@fbricon Unfortunately, that did not fix the problem. How does this work. Does it only reference the settings.xml and pull down all new artifacts? Or does it also use the local artifact repository? Oddly - If I build the master branch of the language server directly and run against it, it works great! |
try the |
Sorry for the delay in response... I wanted to validate a few things before responding. That did not work. 😞 It is literally only dependencies from our local repository that fail to resolve. Is it possible the language server hasn't been updated to v0.28.0 of eclipse.jdt.ls? I'm not sure where to look for that... |
@danmikita could you try to use an absolute path - #702 (comment)? |
@snjeza I just tried the absolute path as you suggested and still a no-go. 😢 To try to debug this issue a bit, I saw that this extension pulls down a tar.gz from http://download.eclipse.org/jdtls/snapshots/jdt-language-server-latest.tar.gz I wanted to find where that was being downloaded to so I could replace it manually with my copy of the language server to narrow down the problem a bit. I know my copy of the lsp has your commit which added maven user settings - which DOES work. Unfortunately, I couldn't track down the install location for the lsp that this extension pulls down. Do you have any other ideas I can run with? |
@snjeza @fbricon I was able to copy my locally compiled server to the correct location and use it with the plugin. I get the same results - aka, local maven dependencies do not resolve. So I have narrowed it down to being a problem in the vscode-java extension. Just an update. I'll see if I can dig into the extension a bit and try to find the problem. Let me know if you have any pointers for me. |
So I have come back with more info about my parent POM file. I should be able to get a minimal project going in a few hours to post here. The parent section looks like so
That relative path does not exist on my system, due to some weird way this product gets deployed. If I had to guess, somewhere within either the extension or JLS, it is throwing a I understand why the error exists. I think there may be development strategies that aren't necessarily thought of as valid cases. |
My work has this really funky setup for projects where there is this overarching Maven project called microservice-parent. Now the git repo contains a maven submodule of that project called dp-ms-demand-automation-parent, and that contains a maven submodule called dp-ms-demand-automation-server.
Folder structure looks like this
As you can see there is a ghost Maven project for microservice-parent.
The following error is shown in both pom files.
Is it possible to have the language server still start even though this error exists?
Environment
Steps To Reproduce
Log
Current Result
No language server start up
Expected Result
Language server to start even though it is missing parent module. Fairly certain IntelliJ handles this case gracefully
The text was updated successfully, but these errors were encountered: