Idea does not download maven sources

已回答

Hi!

 

I want to download sources for .m2\repository\com\oracle\database\jdbc\ojdbc8\19.12.0.0\ojdbc8-19.12.0.0.jar!\oracle\jdbc\OracleDatabaseException.class

When I click download sources button then nothing happens.

 

I dont wnat to run

mvn dependency:sources

because this downloads sources for for everything and then debugging is very slow.

What do I have to write in command line to download sources only for that specific class that I mentioned above? I want to test command line to see if it works.

I also tried

#com.intellij.util.io.HttpRequests
#com.intellij.util.proxy.CommonProxy

that was suggested at

https://intellij-support.jetbrains.com/hc/en-us/community/posts/360010214460-Intellij-can-not-download-Sources-and-Documentation

But then still only thing that appears in idea.log is:

2023-04-17 13:49:57,061 [4991422]   INFO - #o.j.i.m.p.MavenProjectsProcessor - [maven import] MavenProjectsProcessorArtifactsDownloadingTask took 15ms
1

Hello!

Have you tried clearing your cache in IntelliJ IDEA? Sometimes this can fix issues related to downloading sources. You can do this by going to ЭFile > Invalidate Caches / Restart" and selecting "Invalidate and Restart".

If that doesn't work, you can try manually downloading the sources using the command line. To do this, navigate to the directory containing the .jar file and run the following command:

"mvn dependency:sources -DincludeArtifactIds=ojdbc8 -DincludeClassifiers=sources"

This will only download the sources for the ojdbc8 artifact, which includes the class you mentioned.

-1

 To do this, navigate to the directory containing the .jar

Are you sure it's that way?

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.8:sources (default-cli): Goal requires a project to execute but there is no POM in this directory (C:\Users\rain\.m2\repository\com\oracle\database\jdbc\ojdbc8\19.12.0.0). Please verify you invoked Maven from the correct directory. -> [Help 1]


Running it from my project directory where pom.xml is seems to work - or at least it says BUILD SUCCES but idea still shows me decompiled .class instead. Invalidating cache did not help either.

0

Sorry, mistyped. Actually I meant .pom file.

Is it reproducible with new sample project? Could you please attach one for investigation?

-1

请先登录再写评论。