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

Sources from available source JARs not usable #311

Open
mgoellnitz opened this issue Jan 8, 2017 · 11 comments
Open

Sources from available source JARs not usable #311

mgoellnitz opened this issue Jan 8, 2017 · 11 comments

Comments

@mgoellnitz
Copy link

When showing the "generated source file" I try to use the "Attach Sources..." button.

After pressing "download", the sources get downloaded to the Maven local repository (not the gradle module cache, where the original JARs reside) and the source don't get shown after pressing Ok.

Since the path of the downloaded source is shown when re-opening the dialog, there seems to be a "certain link" between the binaries and the sources, but the source view still shows the generated sources.

Anything I can do about this?

@kelemen
Copy link
Owner

kelemen commented Jan 8, 2017

You should right click on the dependencies node and select "Dowload Sources" instead.

@mgoellnitz
Copy link
Author

That doesn't even load any sources-archives.

(Just wiped the few already downloaded ones to discover that.)

@kelemen
Copy link
Owner

kelemen commented Jan 8, 2017

It should unless you have the 'idea' plugin applied and download sources turned off. Do you have a project with which I can reproduce your issue (the issue where "download sources" does not download anything)?

@mgoellnitz
Copy link
Author

I don't use idea and don't integrate that plugin in any project. The recent test was done with the very small

https://github.com/mgoellnitz/dinistiq

which is not even a multi-module case. Originally I ran into that problem with the buildSrc of https://github.com/mgoellnitz/tangram.

@kelemen
Copy link
Owner

kelemen commented Jan 8, 2017

The sources of which dependencies do you not see? Though I haven't checked each of them, I'm able to see all what I have tried.

Unrelated to this issue: You can use compileOnly configuration since Gradle 2.12 instead of your optional.

@mgoellnitz
Copy link
Author

So there must be some other issue on my side... No idea what that could be since this only happens for gradle based projects. Any idea what could get broken? Any (netbeans) plugin known to break things?

Thanks for the hint. May be I re-think the reason why I chose not to go for compileOnly.

@kelemen
Copy link
Owner

kelemen commented Jan 8, 2017

To be honest, I can't even come up with a (reasonable) theoretical scenario where you can download the dependencies and not the sources given that project. Can you not download any of the sources?

@mgoellnitz
Copy link
Author

You mean, anything except downloading the manually... No. I'm thinking of a re-install of Netbeans but this is a rather fresh install, so I'm not sure if it's worth it.

@kelemen
Copy link
Owner

kelemen commented Jan 8, 2017

So you mean, that none of the sources of your dependencies got downloaded? If so, that is indeed very strange. However, I find impossible that reinstalling NB helps because NB has nothing to do with downloading the sources for Gradle project. It is Gradle itself which downloads it (currently, I'm using its idea plugin).

@mgoellnitz
Copy link
Author

None of my dependencies got downloaded. Only - as mentioned before - they get downloaded (but not shown) when starting the download from the source code pane. But then, they get downloaded to the maven local repository not the gradle cache. Where should the sources get downloaded to? maven local or gradle cache?

@kelemen
Copy link
Owner

kelemen commented Jan 9, 2017

If you click the "download sources" on the dependencies node (in the project view), then into the Gradle cache. Otherwise, I don't know: I do not do anything explicitly with "Attach Sources".

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

No branches or pull requests

2 participants