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

"Add Folder to Java Source Path" for Maven and Gradle projects #1954

Open
blithefeng opened this issue Nov 27, 2021 · 4 comments
Open

"Add Folder to Java Source Path" for Maven and Gradle projects #1954

blithefeng opened this issue Nov 27, 2021 · 4 comments

Comments

@blithefeng
Copy link

I have a big maven project, and there are five modules in it. In my project, one module named "common" is required by the other modules.
In "common" module, I have to compile the rpc code and use these codes in other modules. But when using eclipse.jdt.ls in neovim, I couldn't find the definition of the Variable defined in generated-sources. I got response like:

// Failed to get sources. Instead, stub sources have been generated by the disassembler.
 // Implementation of methods is unavailable.
package my.proto;
@snjeza
Copy link
Contributor

snjeza commented Nov 27, 2021

@blithefeng You may want to take a look at redhat-developer/vscode-java#177

@blithefeng
Copy link
Author

@snjeza Thanks! I tried to configure build-helper-maven-plugin and it works after compiling the dependent module.

But some projects don't use build-helper-maven-plugin, does eclipse.jdt.sl consider to provide a method like "add to project source"?

@rgrunber
Copy link
Contributor

There seems to be a context menu item from the explorer menu to Add Folder to Java Source Path but it looks like we don't currently support it if the project is Maven or Gradle :

Unsupported operation. Please use pom.xml file to manage the source directories of maven project.

I'll mark this as a nice enhancement but not sure how high it would be in priorities. If m2e and buildship provide API for these it might be pretty easy to do.

@rgrunber rgrunber changed the title generated-sources as java source path "Add Folder to Java Source Path" for Maven and Gradle projects Jan 21, 2022
@rgrunber
Copy link
Contributor

#964 (comment)

As mentioned, would be best if m2e/buildship synced the changes back into the build files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants