-
Couldn't load subscription status.
- Fork 95
Description
Describe the bug
VS Code extensions Maven is unable to download any artifact (Java or otherwise) from our internal Artifactory server, which uses custom CA certificate and http proxies. This happens regardless of the project type or structure.
Downloading artifacts works fine from command-line and in Eclipse so the problem is specific to VS Code.
Key facts:
- Command-line Maven works perfectly and downloads from Artifactory without issue. Unfortunately, Maven in VS Code sometimes downloads different versions of artifacts to the
.m2directory than the command-line, so running from command-line does not solve the issue. - The JDK used by VS Code is configured with the correct version and correct custom truststore
cacertsfile. - VS Code is started from a terminal with all required proxy and environment variables.
- There are no errors in the Output panel.
- Running
mvnin VS Code’s integrated terminal works fine. - Eclipse is able to download from Artifactory using the configured
cacerts - Other developers experience the same issue, regardless of JDK version.
- There is nothing of relevance in
settings.json
To Reproduce
Steps to reproduce the behavior:
- Clean up the
.m2repository - Ensure that
cacertsis correctly linked in the selected Java installation /usr/lib/jvm/java-17-openjdk-17.0.7.0.7-3.el8.x86_64/lib/security - Open code from the command-line
- Open a project that requires artifacts - typically a Java project
- The build fails because no artifacts are found
- Build from command-line or Eclipse
- Now all errors pertaining to the artifacts that were successfully dowloaded work in VS Code
- Sometimes, VS Code resolves artifact versions differently than command-line or Eclipse, and since these cannot be downloaded, there are still errors
Expected behavior
VS Code fails to download from Artifactory even though the configuration works fine in other environments and when mvn is executed directly from within VS Code terminal window.
Environments (please complete the following information as much as possible):
- OS: AlmaLinux release 8.8
- VS Code version: 1.103.0
- Extension version: Maven for Java v0.44.0
- Extension version: Language support for Java by Red Hat v1.44.0
Additional information
It may be that there is some simple solution, but in that case there some guidance missing in the outputs. GitHub Copilot was unable to resolve the issue and recommended posting here.