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

[Improvement] - Change dependency jar naming to 'groupId:artifactId:version' for maven projects #857

Closed
mamilic opened this issue Oct 3, 2024 · 10 comments
Labels
enhancement New feature or request
Milestone

Comments

@mamilic
Copy link
Contributor

mamilic commented Oct 3, 2024

As of now Referenced libraries are shown as list with jar names, and sometimes it is hard to guess what that is, for example we have core-3.4.0.jar, or context-2.3.2.jar, picture below.

image

Is it possible that to have something which intellij uses, to have groupId:artifactId:version?

image

@jdneo
Copy link
Member

jdneo commented Oct 8, 2024

Sounds a valid request

@jdneo jdneo added the enhancement New feature or request label Oct 8, 2024
@mamilic
Copy link
Contributor Author

mamilic commented Oct 9, 2024

@jdneo , is this perhaps good first issue?

@jdneo
Copy link
Member

jdneo commented Oct 10, 2024

@mamilic If we can easily get the group id, artifact id and version from the jar files, then this should be a good first issue.

I need to find some time to investigate it. It would be great if you are willing to have a try :)

@mamilic
Copy link
Contributor Author

mamilic commented Oct 10, 2024

@jdneo , I can try. But if you have any hints where to look, please let me know. Thanks!

@jdneo
Copy link
Member

jdneo commented Oct 12, 2024

I've a question actually. Does every maven jar contains this pom.properties?

Seems it's not in some cases:

Image

@mamilic
Copy link
Contributor Author

mamilic commented Oct 12, 2024

It seems that you are correct, however as I observed we would always have MANIFEST.MF. Could it be possible that JDTLS somehow proivides more info about the jars/dependencies? Also, I am wondering how may I run the extension in debug mode, when I try to launch it from VSCode it starts but then throws
rejected promise not handled within 1 second: Error: No delegateCommandHandler for java.resolvePath extensionHostProcess.js:162 stack trace: Error: No delegateCommandHandler for java.resolvePath at /home/mmilic/.vscode/extensions/redhat.java-1.35.1-linux-x64/dist/extension.js:2:1090351 at re (/home/mmilic/.vscode/extensions/redhat.java-1.35.1-linux-x64/dist/extension.js:2:1090645) at /home/mmilic/.vscode/extensions/redhat.java-1.35.1-linux-x64/dist/extension.js:2:1085429 at Immediate.<anonymous> (/home/mmilic/.vscode/extensions/redhat.java-1.35.1-linux-x64/dist/extension.js:2:1085449) at process.processImmediate (node:internal/timers:483:21) at process.callbackTrampoline (node:internal/async_hooks:130:17)

Do I need to do some presteps in order to run it?

@jdneo
Copy link
Member

jdneo commented Oct 14, 2024

Oh, sorry the contributing doc is missing for this repo.

You need to run npm run build-server to build the required jar.

If you want to debug java code in https://github.com/microsoft/vscode-java-dependency/tree/main/jdtls.ext/com.microsoft.jdtls.ext.core/src, you need to install https://marketplace.visualstudio.com/items?itemName=yaozheng.vscode-pde. And reload your vscode after the installation.

Then when you debugging the extension, run Image
after it's activated.

The code to get the jar files is at:

private static List<PackageNode> getContainerChildren(PackageParams query, IProgressMonitor pm) {

@mamilic
Copy link
Contributor Author

mamilic commented Oct 14, 2024

@jdneo , thanks for guidance!

I've managed to get the Java Projects show Maven Dependecies in format groupId:artifactId:version, however they are not sorted alphabetically. What would be your approach for this?

Image

@jdneo
Copy link
Member

jdneo commented Oct 15, 2024

I guess you can add a sort logic at

protected createChildNodeList(): ExplorerNode[] {

@jdneo jdneo added this to the 0.24.1 milestone Oct 31, 2024
@jdneo jdneo changed the title [Improvement] - Referenced Libraries naming [Improvement] - Change dependency jar naming to 'groupId:artifactId:version' for maven projects Oct 31, 2024
@jdneo
Copy link
Member

jdneo commented Oct 31, 2024

Fixed by #859

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants