Library sources are automatically downloaded

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
23 messages Options
12
Reply | Threaded
Open this post in threaded view
|

Library sources are automatically downloaded

taher
Hi Everyone,

One of the very nice things I discovered a while back is that Gradle
automatically downloads The Source libraries for the jar dependencies for
almost all of the libraries.

This means that you can ctrl-click with your IDE to navigate the source
code of these external libraries which I find very helpful for debugging.

So just wanted to share that for anyone who might want to take advantage of
this

Taher Alkhateeb
Reply | Threaded
Open this post in threaded view
|

Re: Library sources are automatically downloaded

Jacopo Cappellato-5
This is very useful for development, thanks for sharing the tip Taher.
However, it would be nice if we could configure this behavior in order to
download only the required jars when a release is built: we should explore
this option as well.

Jacopo

On Thu, Jul 21, 2016 at 8:05 AM, Taher Alkhateeb <[hidden email]
> wrote:

> Hi Everyone,
>
> One of the very nice things I discovered a while back is that Gradle
> automatically downloads The Source libraries for the jar dependencies for
> almost all of the libraries.
>
> This means that you can ctrl-click with your IDE to navigate the source
> code of these external libraries which I find very helpful for debugging.
>
> So just wanted to share that for anyone who might want to take advantage of
> this
>
> Taher Alkhateeb
>
Reply | Threaded
Open this post in threaded view
|

Re: Library sources are automatically downloaded

taher
Hi Jacopo,

Sure we can do a little bit of research on that. What is there reason to
limit downloads on releases? Efficiency?

Regards,

Taher Alkhateeb

On Jul 21, 2016 9:17 AM, "Jacopo Cappellato" <
[hidden email]> wrote:

This is very useful for development, thanks for sharing the tip Taher.
However, it would be nice if we could configure this behavior in order to
download only the required jars when a release is built: we should explore
this option as well.

Jacopo

On Thu, Jul 21, 2016 at 8:05 AM, Taher Alkhateeb <[hidden email]
> wrote:

> Hi Everyone,
>
> One of the very nice things I discovered a while back is that Gradle
> automatically downloads The Source libraries for the jar dependencies for
> almost all of the libraries.
>
> This means that you can ctrl-click with your IDE to navigate the source
> code of these external libraries which I find very helpful for debugging.
>
> So just wanted to share that for anyone who might want to take advantage
of
> this
>
> Taher Alkhateeb
>
Reply | Threaded
Open this post in threaded view
|

Re: Library sources are automatically downloaded

Jacopo Cappellato-5
Yeah, the only reason would be to limit download time (and space) required.

Jacopo

On Thu, Jul 21, 2016 at 8:35 AM, Taher Alkhateeb <[hidden email]
> wrote:

> Hi Jacopo,
>
> Sure we can do a little bit of research on that. What is there reason to
> limit downloads on releases? Efficiency?
>
> Regards,
>
> Taher Alkhateeb
>
> On Jul 21, 2016 9:17 AM, "Jacopo Cappellato" <
> [hidden email]> wrote:
>
> This is very useful for development, thanks for sharing the tip Taher.
> However, it would be nice if we could configure this behavior in order to
> download only the required jars when a release is built: we should explore
> this option as well.
>
> Jacopo
>
> On Thu, Jul 21, 2016 at 8:05 AM, Taher Alkhateeb <
> [hidden email]
> > wrote:
>
> > Hi Everyone,
> >
> > One of the very nice things I discovered a while back is that Gradle
> > automatically downloads The Source libraries for the jar dependencies for
> > almost all of the libraries.
> >
> > This means that you can ctrl-click with your IDE to navigate the source
> > code of these external libraries which I find very helpful for debugging.
> >
> > So just wanted to share that for anyone who might want to take advantage
> of
> > this
> >
> > Taher Alkhateeb
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: Library sources are automatically downloaded

Pierre Smits
In reply to this post by Jacopo Cappellato-5
Jacopo,

Are we talking binary releases (the convenient downloads) for our adopters?

Because, according to conventions of the ASF, external libraries are not
allowed in our source release branches. And that is why we use the Gradle
solution and have download definitions. So that we don't have that
(external libraries) when we cut a release.

Best regards,.

Pierre Smits

ORRTIZ.COM <http://www.orrtiz.com>
OFBiz based solutions & services

OFBiz Extensions Marketplace
http://oem.ofbizci.net/oci-2/

On Thu, Jul 21, 2016 at 8:17 AM, Jacopo Cappellato <
[hidden email]> wrote:

> This is very useful for development, thanks for sharing the tip Taher.
> However, it would be nice if we could configure this behavior in order to
> download only the required jars when a release is built: we should explore
> this option as well.
>
> Jacopo
>
> On Thu, Jul 21, 2016 at 8:05 AM, Taher Alkhateeb <
> [hidden email]
> > wrote:
>
> > Hi Everyone,
> >
> > One of the very nice things I discovered a while back is that Gradle
> > automatically downloads The Source libraries for the jar dependencies for
> > almost all of the libraries.
> >
> > This means that you can ctrl-click with your IDE to navigate the source
> > code of these external libraries which I find very helpful for debugging.
> >
> > So just wanted to share that for anyone who might want to take advantage
> of
> > this
> >
> > Taher Alkhateeb
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: Library sources are automatically downloaded

Jacopo Cappellato-5
Hi Pierre,

this is not what I said, please read what I wrote carefully: the release
package (a source release) will not contain binary jars; the required jars
(external dependencies) will be downloaded at build time by the user; in
this process source files for the external dependencies are not required.

Jacopo

On Thu, Jul 21, 2016 at 9:05 AM, Pierre Smits <[hidden email]>
wrote:

> Jacopo,
>
> Are we talking binary releases (the convenient downloads) for our adopters?
>
> Because, according to conventions of the ASF, external libraries are not
> allowed in our source release branches. And that is why we use the Gradle
> solution and have download definitions. So that we don't have that
> (external libraries) when we cut a release.
>
> Best regards,.
>
> Pierre Smits
>
> ORRTIZ.COM <http://www.orrtiz.com>
> OFBiz based solutions & services
>
> OFBiz Extensions Marketplace
> http://oem.ofbizci.net/oci-2/
>
> On Thu, Jul 21, 2016 at 8:17 AM, Jacopo Cappellato <
> [hidden email]> wrote:
>
> > This is very useful for development, thanks for sharing the tip Taher.
> > However, it would be nice if we could configure this behavior in order to
> > download only the required jars when a release is built: we should
> explore
> > this option as well.
> >
> > Jacopo
> >
> > On Thu, Jul 21, 2016 at 8:05 AM, Taher Alkhateeb <
> > [hidden email]
> > > wrote:
> >
> > > Hi Everyone,
> > >
> > > One of the very nice things I discovered a while back is that Gradle
> > > automatically downloads The Source libraries for the jar dependencies
> for
> > > almost all of the libraries.
> > >
> > > This means that you can ctrl-click with your IDE to navigate the source
> > > code of these external libraries which I find very helpful for
> debugging.
> > >
> > > So just wanted to share that for anyone who might want to take
> advantage
> > of
> > > this
> > >
> > > Taher Alkhateeb
> > >
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: Library sources are automatically downloaded

Pierre Smits
Hi Jacopo,

It appears that I misunderstood what you meant, as you wrote:

'However, it would be nice if we could configure this behavior in order to
download only the required jars when a release is built'.

Best regards,


Pierre Smits

ORRTIZ.COM <http://www.orrtiz.com>
OFBiz based solutions & services

OFBiz Extensions Marketplace
http://oem.ofbizci.net/oci-2/

On Thu, Jul 21, 2016 at 9:48 AM, Jacopo Cappellato <
[hidden email]> wrote:

> Hi Pierre,
>
> this is not what I said, please read what I wrote carefully: the release
> package (a source release) will not contain binary jars; the required jars
> (external dependencies) will be downloaded at build time by the user; in
> this process source files for the external dependencies are not required.
>
> Jacopo
>
> On Thu, Jul 21, 2016 at 9:05 AM, Pierre Smits <[hidden email]>
> wrote:
>
> > Jacopo,
> >
> > Are we talking binary releases (the convenient downloads) for our
> adopters?
> >
> > Because, according to conventions of the ASF, external libraries are not
> > allowed in our source release branches. And that is why we use the Gradle
> > solution and have download definitions. So that we don't have that
> > (external libraries) when we cut a release.
> >
> > Best regards,.
> >
> > Pierre Smits
> >
> > ORRTIZ.COM <http://www.orrtiz.com>
> > OFBiz based solutions & services
> >
> > OFBiz Extensions Marketplace
> > http://oem.ofbizci.net/oci-2/
> >
> > On Thu, Jul 21, 2016 at 8:17 AM, Jacopo Cappellato <
> > [hidden email]> wrote:
> >
> > > This is very useful for development, thanks for sharing the tip Taher.
> > > However, it would be nice if we could configure this behavior in order
> to
> > > download only the required jars when a release is built: we should
> > explore
> > > this option as well.
> > >
> > > Jacopo
> > >
> > > On Thu, Jul 21, 2016 at 8:05 AM, Taher Alkhateeb <
> > > [hidden email]
> > > > wrote:
> > >
> > > > Hi Everyone,
> > > >
> > > > One of the very nice things I discovered a while back is that Gradle
> > > > automatically downloads The Source libraries for the jar dependencies
> > for
> > > > almost all of the libraries.
> > > >
> > > > This means that you can ctrl-click with your IDE to navigate the
> source
> > > > code of these external libraries which I find very helpful for
> > debugging.
> > > >
> > > > So just wanted to share that for anyone who might want to take
> > advantage
> > > of
> > > > this
> > > >
> > > > Taher Alkhateeb
> > > >
> > >
> >
>
Reply | Threaded
Open this post in threaded view
|

Re: Library sources are automatically downloaded

Jacques Le Roux
Administrator
In reply to this post by taher
Thanks Taher,

I guess you spoke about Eclipse. BTW should we not add " downloadSources=true"
https://stackoverflow.com/questions/10156847/how-to-tell-gradle-to-download-all-the-source-jars#answer-10655347 ?

For IntelliJ it's here https://stackoverflow.com/questions/12718753/how-to-download-dependency-sources-for-gradle-project-in-idea

We will put that, with other things, in the "Gradle to And" wiki page ASAP

Jacques


Le 21/07/2016 à 08:05, Taher Alkhateeb a écrit :

> Hi Everyone,
>
> One of the very nice things I discovered a while back is that Gradle
> automatically downloads The Source libraries for the jar dependencies for
> almost all of the libraries.
>
> This means that you can ctrl-click with your IDE to navigate the source
> code of these external libraries which I find very helpful for debugging.
>
> So just wanted to share that for anyone who might want to take advantage of
> this
>
> Taher Alkhateeb
>

Reply | Threaded
Open this post in threaded view
|

Re: Library sources are automatically downloaded

taher
Nice work okay we have the answer on how to stop downloading the sources :)

On Jul 21, 2016 3:35 PM, "Jacques Le Roux" <[hidden email]>
wrote:

> Thanks Taher,
>
> I guess you spoke about Eclipse. BTW should we not add "
> downloadSources=true"
> https://stackoverflow.com/questions/10156847/how-to-tell-gradle-to-download-all-the-source-jars#answer-10655347
> ?
>
> For IntelliJ it's here
> https://stackoverflow.com/questions/12718753/how-to-download-dependency-sources-for-gradle-project-in-idea
>
> We will put that, with other things, in the "Gradle to And" wiki page ASAP
>
> Jacques
>
>
> Le 21/07/2016 à 08:05, Taher Alkhateeb a écrit :
>
>> Hi Everyone,
>>
>> One of the very nice things I discovered a while back is that Gradle
>> automatically downloads The Source libraries for the jar dependencies for
>> almost all of the libraries.
>>
>> This means that you can ctrl-click with your IDE to navigate the source
>> code of these external libraries which I find very helpful for debugging.
>>
>> So just wanted to share that for anyone who might want to take advantage
>> of
>> this
>>
>> Taher Alkhateeb
>>
>>
>
Reply | Threaded
Open this post in threaded view
|

Re: Library sources are automatically downloaded

Jacques Le Roux
Administrator
I think a Jira is appropriate. I believe it should be a subtask of OFBIZ-7534. I like them because it's easy to spot the state (advance of work done,
and especially remaining issue to work on). I'll handle the wiki side when I'll get a chance...

Thanks

Jacques


Le 21/07/2016 à 14:39, Taher Alkhateeb a écrit :

> Nice work okay we have the answer on how to stop downloading the sources :)
>
> On Jul 21, 2016 3:35 PM, "Jacques Le Roux" <[hidden email]>
> wrote:
>
>> Thanks Taher,
>>
>> I guess you spoke about Eclipse. BTW should we not add "
>> downloadSources=true"
>> https://stackoverflow.com/questions/10156847/how-to-tell-gradle-to-download-all-the-source-jars#answer-10655347
>> ?
>>
>> For IntelliJ it's here
>> https://stackoverflow.com/questions/12718753/how-to-download-dependency-sources-for-gradle-project-in-idea
>>
>> We will put that, with other things, in the "Gradle to And" wiki page ASAP
>>
>> Jacques
>>
>>
>> Le 21/07/2016 à 08:05, Taher Alkhateeb a écrit :
>>
>>> Hi Everyone,
>>>
>>> One of the very nice things I discovered a while back is that Gradle
>>> automatically downloads The Source libraries for the jar dependencies for
>>> almost all of the libraries.
>>>
>>> This means that you can ctrl-click with your IDE to navigate the source
>>> code of these external libraries which I find very helpful for debugging.
>>>
>>> So just wanted to share that for anyone who might want to take advantage
>>> of
>>> this
>>>
>>> Taher Alkhateeb
>>>
>>>

Reply | Threaded
Open this post in threaded view
|

Re: Library sources are automatically downloaded

taher
Hi Jacques,

Sure. I have an idea in mind for how to make this very trivial so that
minimal code is needed to prepare for a release. Whenever you issue the
jira I'll attach a patch for a convenient solution.

Regards,

Taher Alkhateeb

On Jul 22, 2016 11:04 PM, "Jacques Le Roux" <[hidden email]>
wrote:

I think a Jira is appropriate. I believe it should be a subtask of
OFBIZ-7534. I like them because it's easy to spot the state (advance of
work done, and especially remaining issue to work on). I'll handle the wiki
side when I'll get a chance...

Thanks

Jacques



Le 21/07/2016 à 14:39, Taher Alkhateeb a écrit :

> Nice work okay we have the answer on how to stop downloading the sources :)
>
> On Jul 21, 2016 3:35 PM, "Jacques Le Roux" <[hidden email]>
> wrote:
>
> Thanks Taher,
>>
>> I guess you spoke about Eclipse. BTW should we not add "
>> downloadSources=true"
>>
>> https://stackoverflow.com/questions/10156847/how-to-tell-gradle-to-download-all-the-source-jars#answer-10655347
>> ?
>>
>> For IntelliJ it's here
>>
>> https://stackoverflow.com/questions/12718753/how-to-download-dependency-sources-for-gradle-project-in-idea
>>
>> We will put that, with other things, in the "Gradle to And" wiki page ASAP
>>
>> Jacques
>>
>>
>> Le 21/07/2016 à 08:05, Taher Alkhateeb a écrit :
>>
>> Hi Everyone,
>>>
>>> One of the very nice things I discovered a while back is that Gradle
>>> automatically downloads The Source libraries for the jar dependencies for
>>> almost all of the libraries.
>>>
>>> This means that you can ctrl-click with your IDE to navigate the source
>>> code of these external libraries which I find very helpful for debugging.
>>>
>>> So just wanted to share that for anyone who might want to take advantage
>>> of
>>> this
>>>
>>> Taher Alkhateeb
>>>
>>>
>>>
Reply | Threaded
Open this post in threaded view
|

Re: Library sources are automatically downloaded

taher
Hi All,

After a bit of investigation I believe Gradle will _not_ download source
libraries _unless_ someone calls the "eclipse" task. So I think no need to
do any changes for releases.

Cheers,

Taher Alkhateeb

On Fri, Jul 22, 2016 at 11:08 PM, Taher Alkhateeb <
[hidden email]> wrote:

> Hi Jacques,
>
> Sure. I have an idea in mind for how to make this very trivial so that
> minimal code is needed to prepare for a release. Whenever you issue the
> jira I'll attach a patch for a convenient solution.
>
> Regards,
>
> Taher Alkhateeb
>
> On Jul 22, 2016 11:04 PM, "Jacques Le Roux" <[hidden email]>
> wrote:
>
> I think a Jira is appropriate. I believe it should be a subtask of
> OFBIZ-7534. I like them because it's easy to spot the state (advance of
> work done, and especially remaining issue to work on). I'll handle the wiki
> side when I'll get a chance...
>
> Thanks
>
> Jacques
>
>
>
> Le 21/07/2016 à 14:39, Taher Alkhateeb a écrit :
>
>> Nice work okay we have the answer on how to stop downloading the sources
>> :)
>>
>> On Jul 21, 2016 3:35 PM, "Jacques Le Roux" <[hidden email]>
>> wrote:
>>
>> Thanks Taher,
>>>
>>> I guess you spoke about Eclipse. BTW should we not add "
>>> downloadSources=true"
>>>
>>> https://stackoverflow.com/questions/10156847/how-to-tell-gradle-to-download-all-the-source-jars#answer-10655347
>>> ?
>>>
>>> For IntelliJ it's here
>>>
>>> https://stackoverflow.com/questions/12718753/how-to-download-dependency-sources-for-gradle-project-in-idea
>>>
>>> We will put that, with other things, in the "Gradle to And" wiki page
>>> ASAP
>>>
>>> Jacques
>>>
>>>
>>> Le 21/07/2016 à 08:05, Taher Alkhateeb a écrit :
>>>
>>> Hi Everyone,
>>>>
>>>> One of the very nice things I discovered a while back is that Gradle
>>>> automatically downloads The Source libraries for the jar dependencies
>>>> for
>>>> almost all of the libraries.
>>>>
>>>> This means that you can ctrl-click with your IDE to navigate the source
>>>> code of these external libraries which I find very helpful for
>>>> debugging.
>>>>
>>>> So just wanted to share that for anyone who might want to take advantage
>>>> of
>>>> this
>>>>
>>>> Taher Alkhateeb
>>>>
>>>>
>>>>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: Library sources are automatically downloaded

Jacques Le Roux
Administrator
Does this mean that you used

downloadSources=true"

In you local Eclipse task?
Because you said you had the sources easily available. Beside, where did you find the sources exactly?

Thanks

Jacques


Le 24/07/2016 à 17:54, Taher Alkhateeb a écrit :

> Hi All,
>
> After a bit of investigation I believe Gradle will _not_ download source
> libraries _unless_ someone calls the "eclipse" task. So I think no need to
> do any changes for releases.
>
> Cheers,
>
> Taher Alkhateeb
>
> On Fri, Jul 22, 2016 at 11:08 PM, Taher Alkhateeb <
> [hidden email]> wrote:
>
>> Hi Jacques,
>>
>> Sure. I have an idea in mind for how to make this very trivial so that
>> minimal code is needed to prepare for a release. Whenever you issue the
>> jira I'll attach a patch for a convenient solution.
>>
>> Regards,
>>
>> Taher Alkhateeb
>>
>> On Jul 22, 2016 11:04 PM, "Jacques Le Roux" <[hidden email]>
>> wrote:
>>
>> I think a Jira is appropriate. I believe it should be a subtask of
>> OFBIZ-7534. I like them because it's easy to spot the state (advance of
>> work done, and especially remaining issue to work on). I'll handle the wiki
>> side when I'll get a chance...
>>
>> Thanks
>>
>> Jacques
>>
>>
>>
>> Le 21/07/2016 à 14:39, Taher Alkhateeb a écrit :
>>
>>> Nice work okay we have the answer on how to stop downloading the sources
>>> :)
>>>
>>> On Jul 21, 2016 3:35 PM, "Jacques Le Roux" <[hidden email]>
>>> wrote:
>>>
>>> Thanks Taher,
>>>> I guess you spoke about Eclipse. BTW should we not add "
>>>> downloadSources=true"
>>>>
>>>> https://stackoverflow.com/questions/10156847/how-to-tell-gradle-to-download-all-the-source-jars#answer-10655347
>>>> ?
>>>>
>>>> For IntelliJ it's here
>>>>
>>>> https://stackoverflow.com/questions/12718753/how-to-download-dependency-sources-for-gradle-project-in-idea
>>>>
>>>> We will put that, with other things, in the "Gradle to And" wiki page
>>>> ASAP
>>>>
>>>> Jacques
>>>>
>>>>
>>>> Le 21/07/2016 à 08:05, Taher Alkhateeb a écrit :
>>>>
>>>> Hi Everyone,
>>>>> One of the very nice things I discovered a while back is that Gradle
>>>>> automatically downloads The Source libraries for the jar dependencies
>>>>> for
>>>>> almost all of the libraries.
>>>>>
>>>>> This means that you can ctrl-click with your IDE to navigate the source
>>>>> code of these external libraries which I find very helpful for
>>>>> debugging.
>>>>>
>>>>> So just wanted to share that for anyone who might want to take advantage
>>>>> of
>>>>> this
>>>>>
>>>>> Taher Alkhateeb
>>>>>
>>>>>
>>>>>
>>

Reply | Threaded
Open this post in threaded view
|

Re: Library sources are automatically downloaded

taher
Oh, allow me to explain:

./gradlew cleanAll loadDefault -> This would download the dependencies and
load your data
./gradlew cleanAll build eclipse loadDefault -> this would be same as above
but would additionally download the source Jars.

So if you avoid calling the eclipse tasks, then no source jars will
download. I can double check exactly how this happens if you like, but I
think we are safe as a general idea.

On Tue, Jul 26, 2016 at 12:43 PM, Jacques Le Roux <
[hidden email]> wrote:

> Does this mean that you used
>
> downloadSources=true"
>
> In you local Eclipse task?
> Because you said you had the sources easily available. Beside, where did
> you find the sources exactly?
>
> Thanks
>
> Jacques
>
>
>
> Le 24/07/2016 à 17:54, Taher Alkhateeb a écrit :
>
>> Hi All,
>>
>> After a bit of investigation I believe Gradle will _not_ download source
>> libraries _unless_ someone calls the "eclipse" task. So I think no need to
>> do any changes for releases.
>>
>> Cheers,
>>
>> Taher Alkhateeb
>>
>> On Fri, Jul 22, 2016 at 11:08 PM, Taher Alkhateeb <
>> [hidden email]> wrote:
>>
>> Hi Jacques,
>>>
>>> Sure. I have an idea in mind for how to make this very trivial so that
>>> minimal code is needed to prepare for a release. Whenever you issue the
>>> jira I'll attach a patch for a convenient solution.
>>>
>>> Regards,
>>>
>>> Taher Alkhateeb
>>>
>>> On Jul 22, 2016 11:04 PM, "Jacques Le Roux" <
>>> [hidden email]>
>>> wrote:
>>>
>>> I think a Jira is appropriate. I believe it should be a subtask of
>>> OFBIZ-7534. I like them because it's easy to spot the state (advance of
>>> work done, and especially remaining issue to work on). I'll handle the
>>> wiki
>>> side when I'll get a chance...
>>>
>>> Thanks
>>>
>>> Jacques
>>>
>>>
>>>
>>> Le 21/07/2016 à 14:39, Taher Alkhateeb a écrit :
>>>
>>> Nice work okay we have the answer on how to stop downloading the sources
>>>> :)
>>>>
>>>> On Jul 21, 2016 3:35 PM, "Jacques Le Roux" <
>>>> [hidden email]>
>>>> wrote:
>>>>
>>>> Thanks Taher,
>>>>
>>>>> I guess you spoke about Eclipse. BTW should we not add "
>>>>> downloadSources=true"
>>>>>
>>>>>
>>>>> https://stackoverflow.com/questions/10156847/how-to-tell-gradle-to-download-all-the-source-jars#answer-10655347
>>>>> ?
>>>>>
>>>>> For IntelliJ it's here
>>>>>
>>>>>
>>>>> https://stackoverflow.com/questions/12718753/how-to-download-dependency-sources-for-gradle-project-in-idea
>>>>>
>>>>> We will put that, with other things, in the "Gradle to And" wiki page
>>>>> ASAP
>>>>>
>>>>> Jacques
>>>>>
>>>>>
>>>>> Le 21/07/2016 à 08:05, Taher Alkhateeb a écrit :
>>>>>
>>>>> Hi Everyone,
>>>>>
>>>>>> One of the very nice things I discovered a while back is that Gradle
>>>>>> automatically downloads The Source libraries for the jar dependencies
>>>>>> for
>>>>>> almost all of the libraries.
>>>>>>
>>>>>> This means that you can ctrl-click with your IDE to navigate the
>>>>>> source
>>>>>> code of these external libraries which I find very helpful for
>>>>>> debugging.
>>>>>>
>>>>>> So just wanted to share that for anyone who might want to take
>>>>>> advantage
>>>>>> of
>>>>>> this
>>>>>>
>>>>>> Taher Alkhateeb
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>
>
Reply | Threaded
Open this post in threaded view
|

Re: Library sources are automatically downloaded

Jacques Le Roux
Administrator
Oh I have no problems with the eclipse task, this is for local usage. I use it of course, else Eclipse is lost with the OFBiz project.

I was more asking where are the Java sources available, in the Gradle cache? And if it's there, where exactly?

Also, from your answer I understand that you use the OOTB eclipse task w/o the <<downloadSources=true">> stuff that I found in a Stackoverflow answer
linked below

Thanks

Jacques


Le 26/07/2016 à 11:47, Taher Alkhateeb a écrit :

> Oh, allow me to explain:
>
> ./gradlew cleanAll loadDefault -> This would download the dependencies and
> load your data
> ./gradlew cleanAll build eclipse loadDefault -> this would be same as above
> but would additionally download the source Jars.
>
> So if you avoid calling the eclipse tasks, then no source jars will
> download. I can double check exactly how this happens if you like, but I
> think we are safe as a general idea.
>
> On Tue, Jul 26, 2016 at 12:43 PM, Jacques Le Roux <
> [hidden email]> wrote:
>
>> Does this mean that you used
>>
>> downloadSources=true"
>>
>> In you local Eclipse task?
>> Because you said you had the sources easily available. Beside, where did
>> you find the sources exactly?
>>
>> Thanks
>>
>> Jacques
>>
>>
>>
>> Le 24/07/2016 à 17:54, Taher Alkhateeb a écrit :
>>
>>> Hi All,
>>>
>>> After a bit of investigation I believe Gradle will _not_ download source
>>> libraries _unless_ someone calls the "eclipse" task. So I think no need to
>>> do any changes for releases.
>>>
>>> Cheers,
>>>
>>> Taher Alkhateeb
>>>
>>> On Fri, Jul 22, 2016 at 11:08 PM, Taher Alkhateeb <
>>> [hidden email]> wrote:
>>>
>>> Hi Jacques,
>>>> Sure. I have an idea in mind for how to make this very trivial so that
>>>> minimal code is needed to prepare for a release. Whenever you issue the
>>>> jira I'll attach a patch for a convenient solution.
>>>>
>>>> Regards,
>>>>
>>>> Taher Alkhateeb
>>>>
>>>> On Jul 22, 2016 11:04 PM, "Jacques Le Roux" <
>>>> [hidden email]>
>>>> wrote:
>>>>
>>>> I think a Jira is appropriate. I believe it should be a subtask of
>>>> OFBIZ-7534. I like them because it's easy to spot the state (advance of
>>>> work done, and especially remaining issue to work on). I'll handle the
>>>> wiki
>>>> side when I'll get a chance...
>>>>
>>>> Thanks
>>>>
>>>> Jacques
>>>>
>>>>
>>>>
>>>> Le 21/07/2016 à 14:39, Taher Alkhateeb a écrit :
>>>>
>>>> Nice work okay we have the answer on how to stop downloading the sources
>>>>> :)
>>>>>
>>>>> On Jul 21, 2016 3:35 PM, "Jacques Le Roux" <
>>>>> [hidden email]>
>>>>> wrote:
>>>>>
>>>>> Thanks Taher,
>>>>>
>>>>>> I guess you spoke about Eclipse. BTW should we not add "
>>>>>> downloadSources=true"
>>>>>>
>>>>>>
>>>>>> https://stackoverflow.com/questions/10156847/how-to-tell-gradle-to-download-all-the-source-jars#answer-10655347
>>>>>> ?
>>>>>>
>>>>>> For IntelliJ it's here
>>>>>>
>>>>>>
>>>>>> https://stackoverflow.com/questions/12718753/how-to-download-dependency-sources-for-gradle-project-in-idea
>>>>>>
>>>>>> We will put that, with other things, in the "Gradle to And" wiki page
>>>>>> ASAP
>>>>>>
>>>>>> Jacques
>>>>>>
>>>>>>
>>>>>> Le 21/07/2016 à 08:05, Taher Alkhateeb a écrit :
>>>>>>
>>>>>> Hi Everyone,
>>>>>>
>>>>>>> One of the very nice things I discovered a while back is that Gradle
>>>>>>> automatically downloads The Source libraries for the jar dependencies
>>>>>>> for
>>>>>>> almost all of the libraries.
>>>>>>>
>>>>>>> This means that you can ctrl-click with your IDE to navigate the
>>>>>>> source
>>>>>>> code of these external libraries which I find very helpful for
>>>>>>> debugging.
>>>>>>>
>>>>>>> So just wanted to share that for anyone who might want to take
>>>>>>> advantage
>>>>>>> of
>>>>>>> this
>>>>>>>
>>>>>>> Taher Alkhateeb
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>

Reply | Threaded
Open this post in threaded view
|

Re: Library sources are automatically downloaded

taher
Hi Jacques,

I believe that in JCenter (and I think MavenCenteral also) most Jars
declare their sources. If you call the eclipse task, then it will download
those sources to the gradle cache along with the binaries. Very few
exceptions are there. For example, javolution sources didn't download which
would've made refactoring EntitySaxReaders.java easier (off topic).

Also with regards to the downloadSources=true I think yes we should not
worry about because if I'm in a production server I won't call eclipse
tasks either way and hence won't download the sources.

Did I tackle your question correctly? Sorry if I shifted.

Regards,

Taher Alkhateeb

On Tue, Jul 26, 2016 at 1:47 PM, Jacques Le Roux <
[hidden email]> wrote:

> Oh I have no problems with the eclipse task, this is for local usage. I
> use it of course, else Eclipse is lost with the OFBiz project.
>
> I was more asking where are the Java sources available, in the Gradle
> cache? And if it's there, where exactly?
>
> Also, from your answer I understand that you use the OOTB eclipse task w/o
> the <<downloadSources=true">> stuff that I found in a Stackoverflow answer
> linked below
>
> Thanks
>
> Jacques
>
>
>
> Le 26/07/2016 à 11:47, Taher Alkhateeb a écrit :
>
>> Oh, allow me to explain:
>>
>> ./gradlew cleanAll loadDefault -> This would download the dependencies and
>> load your data
>> ./gradlew cleanAll build eclipse loadDefault -> this would be same as
>> above
>> but would additionally download the source Jars.
>>
>> So if you avoid calling the eclipse tasks, then no source jars will
>> download. I can double check exactly how this happens if you like, but I
>> think we are safe as a general idea.
>>
>> On Tue, Jul 26, 2016 at 12:43 PM, Jacques Le Roux <
>> [hidden email]> wrote:
>>
>> Does this mean that you used
>>>
>>> downloadSources=true"
>>>
>>> In you local Eclipse task?
>>> Because you said you had the sources easily available. Beside, where did
>>> you find the sources exactly?
>>>
>>> Thanks
>>>
>>> Jacques
>>>
>>>
>>>
>>> Le 24/07/2016 à 17:54, Taher Alkhateeb a écrit :
>>>
>>> Hi All,
>>>>
>>>> After a bit of investigation I believe Gradle will _not_ download source
>>>> libraries _unless_ someone calls the "eclipse" task. So I think no need
>>>> to
>>>> do any changes for releases.
>>>>
>>>> Cheers,
>>>>
>>>> Taher Alkhateeb
>>>>
>>>> On Fri, Jul 22, 2016 at 11:08 PM, Taher Alkhateeb <
>>>> [hidden email]> wrote:
>>>>
>>>> Hi Jacques,
>>>>
>>>>> Sure. I have an idea in mind for how to make this very trivial so that
>>>>> minimal code is needed to prepare for a release. Whenever you issue the
>>>>> jira I'll attach a patch for a convenient solution.
>>>>>
>>>>> Regards,
>>>>>
>>>>> Taher Alkhateeb
>>>>>
>>>>> On Jul 22, 2016 11:04 PM, "Jacques Le Roux" <
>>>>> [hidden email]>
>>>>> wrote:
>>>>>
>>>>> I think a Jira is appropriate. I believe it should be a subtask of
>>>>> OFBIZ-7534. I like them because it's easy to spot the state (advance of
>>>>> work done, and especially remaining issue to work on). I'll handle the
>>>>> wiki
>>>>> side when I'll get a chance...
>>>>>
>>>>> Thanks
>>>>>
>>>>> Jacques
>>>>>
>>>>>
>>>>>
>>>>> Le 21/07/2016 à 14:39, Taher Alkhateeb a écrit :
>>>>>
>>>>> Nice work okay we have the answer on how to stop downloading the
>>>>> sources
>>>>>
>>>>>> :)
>>>>>>
>>>>>> On Jul 21, 2016 3:35 PM, "Jacques Le Roux" <
>>>>>> [hidden email]>
>>>>>> wrote:
>>>>>>
>>>>>> Thanks Taher,
>>>>>>
>>>>>> I guess you spoke about Eclipse. BTW should we not add "
>>>>>>> downloadSources=true"
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> https://stackoverflow.com/questions/10156847/how-to-tell-gradle-to-download-all-the-source-jars#answer-10655347
>>>>>>> ?
>>>>>>>
>>>>>>> For IntelliJ it's here
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> https://stackoverflow.com/questions/12718753/how-to-download-dependency-sources-for-gradle-project-in-idea
>>>>>>>
>>>>>>> We will put that, with other things, in the "Gradle to And" wiki page
>>>>>>> ASAP
>>>>>>>
>>>>>>> Jacques
>>>>>>>
>>>>>>>
>>>>>>> Le 21/07/2016 à 08:05, Taher Alkhateeb a écrit :
>>>>>>>
>>>>>>> Hi Everyone,
>>>>>>>
>>>>>>> One of the very nice things I discovered a while back is that Gradle
>>>>>>>> automatically downloads The Source libraries for the jar
>>>>>>>> dependencies
>>>>>>>> for
>>>>>>>> almost all of the libraries.
>>>>>>>>
>>>>>>>> This means that you can ctrl-click with your IDE to navigate the
>>>>>>>> source
>>>>>>>> code of these external libraries which I find very helpful for
>>>>>>>> debugging.
>>>>>>>>
>>>>>>>> So just wanted to share that for anyone who might want to take
>>>>>>>> advantage
>>>>>>>> of
>>>>>>>> this
>>>>>>>>
>>>>>>>> Taher Alkhateeb
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>>
>
Reply | Threaded
Open this post in threaded view
|

Re: Library sources are automatically downloaded

Jacques Le Roux
Administrator
Thanks Taher,

I did not read the Stackoverflow thread sufficiently it's there:
https://docs.gradle.org/current/dsl/org.gradle.plugins.ide.eclipse.model.EclipseClasspath.html#org.gradle.plugins.ide.eclipse.model.EclipseClasspath:downloadSources 
so downloadSources=true is default in v2

But I did not find where the sources are, it seems from the Stackoverflow thread answers that it's automatically done, and you seems to imply that. I
will try more jars to see how it goes..

Jacques


Le 26/07/2016 à 13:05, Taher Alkhateeb a écrit :

> Hi Jacques,
>
> I believe that in JCenter (and I think MavenCenteral also) most Jars
> declare their sources. If you call the eclipse task, then it will download
> those sources to the gradle cache along with the binaries. Very few
> exceptions are there. For example, javolution sources didn't download which
> would've made refactoring EntitySaxReaders.java easier (off topic).
>
> Also with regards to the downloadSources=true I think yes we should not
> worry about because if I'm in a production server I won't call eclipse
> tasks either way and hence won't download the sources.
>
> Did I tackle your question correctly? Sorry if I shifted.
>
> Regards,
>
> Taher Alkhateeb
>
> On Tue, Jul 26, 2016 at 1:47 PM, Jacques Le Roux <
> [hidden email]> wrote:
>
>> Oh I have no problems with the eclipse task, this is for local usage. I
>> use it of course, else Eclipse is lost with the OFBiz project.
>>
>> I was more asking where are the Java sources available, in the Gradle
>> cache? And if it's there, where exactly?
>>
>> Also, from your answer I understand that you use the OOTB eclipse task w/o
>> the <<downloadSources=true">> stuff that I found in a Stackoverflow answer
>> linked below
>>
>> Thanks
>>
>> Jacques
>>
>>
>>
>> Le 26/07/2016 à 11:47, Taher Alkhateeb a écrit :
>>
>>> Oh, allow me to explain:
>>>
>>> ./gradlew cleanAll loadDefault -> This would download the dependencies and
>>> load your data
>>> ./gradlew cleanAll build eclipse loadDefault -> this would be same as
>>> above
>>> but would additionally download the source Jars.
>>>
>>> So if you avoid calling the eclipse tasks, then no source jars will
>>> download. I can double check exactly how this happens if you like, but I
>>> think we are safe as a general idea.
>>>
>>> On Tue, Jul 26, 2016 at 12:43 PM, Jacques Le Roux <
>>> [hidden email]> wrote:
>>>
>>> Does this mean that you used
>>>> downloadSources=true"
>>>>
>>>> In you local Eclipse task?
>>>> Because you said you had the sources easily available. Beside, where did
>>>> you find the sources exactly?
>>>>
>>>> Thanks
>>>>
>>>> Jacques
>>>>
>>>>
>>>>
>>>> Le 24/07/2016 à 17:54, Taher Alkhateeb a écrit :
>>>>
>>>> Hi All,
>>>>> After a bit of investigation I believe Gradle will _not_ download source
>>>>> libraries _unless_ someone calls the "eclipse" task. So I think no need
>>>>> to
>>>>> do any changes for releases.
>>>>>
>>>>> Cheers,
>>>>>
>>>>> Taher Alkhateeb
>>>>>
>>>>> On Fri, Jul 22, 2016 at 11:08 PM, Taher Alkhateeb <
>>>>> [hidden email]> wrote:
>>>>>
>>>>> Hi Jacques,
>>>>>
>>>>>> Sure. I have an idea in mind for how to make this very trivial so that
>>>>>> minimal code is needed to prepare for a release. Whenever you issue the
>>>>>> jira I'll attach a patch for a convenient solution.
>>>>>>
>>>>>> Regards,
>>>>>>
>>>>>> Taher Alkhateeb
>>>>>>
>>>>>> On Jul 22, 2016 11:04 PM, "Jacques Le Roux" <
>>>>>> [hidden email]>
>>>>>> wrote:
>>>>>>
>>>>>> I think a Jira is appropriate. I believe it should be a subtask of
>>>>>> OFBIZ-7534. I like them because it's easy to spot the state (advance of
>>>>>> work done, and especially remaining issue to work on). I'll handle the
>>>>>> wiki
>>>>>> side when I'll get a chance...
>>>>>>
>>>>>> Thanks
>>>>>>
>>>>>> Jacques
>>>>>>
>>>>>>
>>>>>>
>>>>>> Le 21/07/2016 à 14:39, Taher Alkhateeb a écrit :
>>>>>>
>>>>>> Nice work okay we have the answer on how to stop downloading the
>>>>>> sources
>>>>>>
>>>>>>> :)
>>>>>>>
>>>>>>> On Jul 21, 2016 3:35 PM, "Jacques Le Roux" <
>>>>>>> [hidden email]>
>>>>>>> wrote:
>>>>>>>
>>>>>>> Thanks Taher,
>>>>>>>
>>>>>>> I guess you spoke about Eclipse. BTW should we not add "
>>>>>>>> downloadSources=true"
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> https://stackoverflow.com/questions/10156847/how-to-tell-gradle-to-download-all-the-source-jars#answer-10655347
>>>>>>>> ?
>>>>>>>>
>>>>>>>> For IntelliJ it's here
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> https://stackoverflow.com/questions/12718753/how-to-download-dependency-sources-for-gradle-project-in-idea
>>>>>>>>
>>>>>>>> We will put that, with other things, in the "Gradle to And" wiki page
>>>>>>>> ASAP
>>>>>>>>
>>>>>>>> Jacques
>>>>>>>>
>>>>>>>>
>>>>>>>> Le 21/07/2016 à 08:05, Taher Alkhateeb a écrit :
>>>>>>>>
>>>>>>>> Hi Everyone,
>>>>>>>>
>>>>>>>> One of the very nice things I discovered a while back is that Gradle
>>>>>>>>> automatically downloads The Source libraries for the jar
>>>>>>>>> dependencies
>>>>>>>>> for
>>>>>>>>> almost all of the libraries.
>>>>>>>>>
>>>>>>>>> This means that you can ctrl-click with your IDE to navigate the
>>>>>>>>> source
>>>>>>>>> code of these external libraries which I find very helpful for
>>>>>>>>> debugging.
>>>>>>>>>
>>>>>>>>> So just wanted to share that for anyone who might want to take
>>>>>>>>> advantage
>>>>>>>>> of
>>>>>>>>> this
>>>>>>>>>
>>>>>>>>> Taher Alkhateeb
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>

Reply | Threaded
Open this post in threaded view
|

Re: Library sources are automatically downloaded

taher
Hi Jacques,

As I mentioned above, the sources reside in your Gradle cache.

For example. looking at the commons-cli library, on my computer it is found
in :

$HOME/.gradle/caches/modules-2/files-2.1/commons-cli/commons-cli/1.3.1/1303efbc4b181e5a58bf2e967dc156a3132b97c0/commons-cli-1.3.1.jar
$HOME/.gradle/caches/modules-2/files-2.1/commons-cli/commons-cli/1.3.1/12ec02d8cb9fbb33bd05506109a4fc8bcc3578/commons-cli-1.3.1-sources.jar

Is that what you were searching for?

Taher Alkhateeb

On Tue, Jul 26, 2016 at 5:04 PM, Jacques Le Roux <
[hidden email]> wrote:

> Thanks Taher,
>
> I did not read the Stackoverflow thread sufficiently it's there:
> https://docs.gradle.org/current/dsl/org.gradle.plugins.ide.eclipse.model.EclipseClasspath.html#org.gradle.plugins.ide.eclipse.model.EclipseClasspath:downloadSources
> so downloadSources=true is default in v2
>
> But I did not find where the sources are, it seems from the Stackoverflow
> thread answers that it's automatically done, and you seems to imply that. I
> will try more jars to see how it goes..
>
> Jacques
>
>
>
> Le 26/07/2016 à 13:05, Taher Alkhateeb a écrit :
>
>> Hi Jacques,
>>
>> I believe that in JCenter (and I think MavenCenteral also) most Jars
>> declare their sources. If you call the eclipse task, then it will download
>> those sources to the gradle cache along with the binaries. Very few
>> exceptions are there. For example, javolution sources didn't download
>> which
>> would've made refactoring EntitySaxReaders.java easier (off topic).
>>
>> Also with regards to the downloadSources=true I think yes we should not
>> worry about because if I'm in a production server I won't call eclipse
>> tasks either way and hence won't download the sources.
>>
>> Did I tackle your question correctly? Sorry if I shifted.
>>
>> Regards,
>>
>> Taher Alkhateeb
>>
>> On Tue, Jul 26, 2016 at 1:47 PM, Jacques Le Roux <
>> [hidden email]> wrote:
>>
>> Oh I have no problems with the eclipse task, this is for local usage. I
>>> use it of course, else Eclipse is lost with the OFBiz project.
>>>
>>> I was more asking where are the Java sources available, in the Gradle
>>> cache? And if it's there, where exactly?
>>>
>>> Also, from your answer I understand that you use the OOTB eclipse task
>>> w/o
>>> the <<downloadSources=true">> stuff that I found in a Stackoverflow
>>> answer
>>> linked below
>>>
>>> Thanks
>>>
>>> Jacques
>>>
>>>
>>>
>>> Le 26/07/2016 à 11:47, Taher Alkhateeb a écrit :
>>>
>>> Oh, allow me to explain:
>>>>
>>>> ./gradlew cleanAll loadDefault -> This would download the dependencies
>>>> and
>>>> load your data
>>>> ./gradlew cleanAll build eclipse loadDefault -> this would be same as
>>>> above
>>>> but would additionally download the source Jars.
>>>>
>>>> So if you avoid calling the eclipse tasks, then no source jars will
>>>> download. I can double check exactly how this happens if you like, but I
>>>> think we are safe as a general idea.
>>>>
>>>> On Tue, Jul 26, 2016 at 12:43 PM, Jacques Le Roux <
>>>> [hidden email]> wrote:
>>>>
>>>> Does this mean that you used
>>>>
>>>>> downloadSources=true"
>>>>>
>>>>> In you local Eclipse task?
>>>>> Because you said you had the sources easily available. Beside, where
>>>>> did
>>>>> you find the sources exactly?
>>>>>
>>>>> Thanks
>>>>>
>>>>> Jacques
>>>>>
>>>>>
>>>>>
>>>>> Le 24/07/2016 à 17:54, Taher Alkhateeb a écrit :
>>>>>
>>>>> Hi All,
>>>>>
>>>>>> After a bit of investigation I believe Gradle will _not_ download
>>>>>> source
>>>>>> libraries _unless_ someone calls the "eclipse" task. So I think no
>>>>>> need
>>>>>> to
>>>>>> do any changes for releases.
>>>>>>
>>>>>> Cheers,
>>>>>>
>>>>>> Taher Alkhateeb
>>>>>>
>>>>>> On Fri, Jul 22, 2016 at 11:08 PM, Taher Alkhateeb <
>>>>>> [hidden email]> wrote:
>>>>>>
>>>>>> Hi Jacques,
>>>>>>
>>>>>> Sure. I have an idea in mind for how to make this very trivial so that
>>>>>>> minimal code is needed to prepare for a release. Whenever you issue
>>>>>>> the
>>>>>>> jira I'll attach a patch for a convenient solution.
>>>>>>>
>>>>>>> Regards,
>>>>>>>
>>>>>>> Taher Alkhateeb
>>>>>>>
>>>>>>> On Jul 22, 2016 11:04 PM, "Jacques Le Roux" <
>>>>>>> [hidden email]>
>>>>>>> wrote:
>>>>>>>
>>>>>>> I think a Jira is appropriate. I believe it should be a subtask of
>>>>>>> OFBIZ-7534. I like them because it's easy to spot the state (advance
>>>>>>> of
>>>>>>> work done, and especially remaining issue to work on). I'll handle
>>>>>>> the
>>>>>>> wiki
>>>>>>> side when I'll get a chance...
>>>>>>>
>>>>>>> Thanks
>>>>>>>
>>>>>>> Jacques
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Le 21/07/2016 à 14:39, Taher Alkhateeb a écrit :
>>>>>>>
>>>>>>> Nice work okay we have the answer on how to stop downloading the
>>>>>>> sources
>>>>>>>
>>>>>>> :)
>>>>>>>>
>>>>>>>> On Jul 21, 2016 3:35 PM, "Jacques Le Roux" <
>>>>>>>> [hidden email]>
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>> Thanks Taher,
>>>>>>>>
>>>>>>>> I guess you spoke about Eclipse. BTW should we not add "
>>>>>>>>
>>>>>>>>> downloadSources=true"
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> https://stackoverflow.com/questions/10156847/how-to-tell-gradle-to-download-all-the-source-jars#answer-10655347
>>>>>>>>> ?
>>>>>>>>>
>>>>>>>>> For IntelliJ it's here
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> https://stackoverflow.com/questions/12718753/how-to-download-dependency-sources-for-gradle-project-in-idea
>>>>>>>>>
>>>>>>>>> We will put that, with other things, in the "Gradle to And" wiki
>>>>>>>>> page
>>>>>>>>> ASAP
>>>>>>>>>
>>>>>>>>> Jacques
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Le 21/07/2016 à 08:05, Taher Alkhateeb a écrit :
>>>>>>>>>
>>>>>>>>> Hi Everyone,
>>>>>>>>>
>>>>>>>>> One of the very nice things I discovered a while back is that
>>>>>>>>> Gradle
>>>>>>>>>
>>>>>>>>>> automatically downloads The Source libraries for the jar
>>>>>>>>>> dependencies
>>>>>>>>>> for
>>>>>>>>>> almost all of the libraries.
>>>>>>>>>>
>>>>>>>>>> This means that you can ctrl-click with your IDE to navigate the
>>>>>>>>>> source
>>>>>>>>>> code of these external libraries which I find very helpful for
>>>>>>>>>> debugging.
>>>>>>>>>>
>>>>>>>>>> So just wanted to share that for anyone who might want to take
>>>>>>>>>> advantage
>>>>>>>>>> of
>>>>>>>>>> this
>>>>>>>>>>
>>>>>>>>>> Taher Alkhateeb
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>
Reply | Threaded
Open this post in threaded view
|

Re: Library sources are automatically downloaded

Jacques Le Roux
Administrator
Thanks Taher,

I found that but I thought from answers in the Stackoverflow thread that Eclipse would automatically link the jars with the sources if they exist.

Or do you have to link them all manually :-o ?

Jacques


Le 26/07/2016 à 16:18, Taher Alkhateeb a écrit :

> Hi Jacques,
>
> As I mentioned above, the sources reside in your Gradle cache.
>
> For example. looking at the commons-cli library, on my computer it is found
> in :
>
> $HOME/.gradle/caches/modules-2/files-2.1/commons-cli/commons-cli/1.3.1/1303efbc4b181e5a58bf2e967dc156a3132b97c0/commons-cli-1.3.1.jar
> $HOME/.gradle/caches/modules-2/files-2.1/commons-cli/commons-cli/1.3.1/12ec02d8cb9fbb33bd05506109a4fc8bcc3578/commons-cli-1.3.1-sources.jar
>
> Is that what you were searching for?
>
> Taher Alkhateeb
>
> On Tue, Jul 26, 2016 at 5:04 PM, Jacques Le Roux <
> [hidden email]> wrote:
>
>> Thanks Taher,
>>
>> I did not read the Stackoverflow thread sufficiently it's there:
>> https://docs.gradle.org/current/dsl/org.gradle.plugins.ide.eclipse.model.EclipseClasspath.html#org.gradle.plugins.ide.eclipse.model.EclipseClasspath:downloadSources
>> so downloadSources=true is default in v2
>>
>> But I did not find where the sources are, it seems from the Stackoverflow
>> thread answers that it's automatically done, and you seems to imply that. I
>> will try more jars to see how it goes..
>>
>> Jacques
>>
>>
>>
>> Le 26/07/2016 à 13:05, Taher Alkhateeb a écrit :
>>
>>> Hi Jacques,
>>>
>>> I believe that in JCenter (and I think MavenCenteral also) most Jars
>>> declare their sources. If you call the eclipse task, then it will download
>>> those sources to the gradle cache along with the binaries. Very few
>>> exceptions are there. For example, javolution sources didn't download
>>> which
>>> would've made refactoring EntitySaxReaders.java easier (off topic).
>>>
>>> Also with regards to the downloadSources=true I think yes we should not
>>> worry about because if I'm in a production server I won't call eclipse
>>> tasks either way and hence won't download the sources.
>>>
>>> Did I tackle your question correctly? Sorry if I shifted.
>>>
>>> Regards,
>>>
>>> Taher Alkhateeb
>>>
>>> On Tue, Jul 26, 2016 at 1:47 PM, Jacques Le Roux <
>>> [hidden email]> wrote:
>>>
>>> Oh I have no problems with the eclipse task, this is for local usage. I
>>>> use it of course, else Eclipse is lost with the OFBiz project.
>>>>
>>>> I was more asking where are the Java sources available, in the Gradle
>>>> cache? And if it's there, where exactly?
>>>>
>>>> Also, from your answer I understand that you use the OOTB eclipse task
>>>> w/o
>>>> the <<downloadSources=true">> stuff that I found in a Stackoverflow
>>>> answer
>>>> linked below
>>>>
>>>> Thanks
>>>>
>>>> Jacques
>>>>
>>>>
>>>>
>>>> Le 26/07/2016 à 11:47, Taher Alkhateeb a écrit :
>>>>
>>>> Oh, allow me to explain:
>>>>> ./gradlew cleanAll loadDefault -> This would download the dependencies
>>>>> and
>>>>> load your data
>>>>> ./gradlew cleanAll build eclipse loadDefault -> this would be same as
>>>>> above
>>>>> but would additionally download the source Jars.
>>>>>
>>>>> So if you avoid calling the eclipse tasks, then no source jars will
>>>>> download. I can double check exactly how this happens if you like, but I
>>>>> think we are safe as a general idea.
>>>>>
>>>>> On Tue, Jul 26, 2016 at 12:43 PM, Jacques Le Roux <
>>>>> [hidden email]> wrote:
>>>>>
>>>>> Does this mean that you used
>>>>>
>>>>>> downloadSources=true"
>>>>>>
>>>>>> In you local Eclipse task?
>>>>>> Because you said you had the sources easily available. Beside, where
>>>>>> did
>>>>>> you find the sources exactly?
>>>>>>
>>>>>> Thanks
>>>>>>
>>>>>> Jacques
>>>>>>
>>>>>>
>>>>>>
>>>>>> Le 24/07/2016 à 17:54, Taher Alkhateeb a écrit :
>>>>>>
>>>>>> Hi All,
>>>>>>
>>>>>>> After a bit of investigation I believe Gradle will _not_ download
>>>>>>> source
>>>>>>> libraries _unless_ someone calls the "eclipse" task. So I think no
>>>>>>> need
>>>>>>> to
>>>>>>> do any changes for releases.
>>>>>>>
>>>>>>> Cheers,
>>>>>>>
>>>>>>> Taher Alkhateeb
>>>>>>>
>>>>>>> On Fri, Jul 22, 2016 at 11:08 PM, Taher Alkhateeb <
>>>>>>> [hidden email]> wrote:
>>>>>>>
>>>>>>> Hi Jacques,
>>>>>>>
>>>>>>> Sure. I have an idea in mind for how to make this very trivial so that
>>>>>>>> minimal code is needed to prepare for a release. Whenever you issue
>>>>>>>> the
>>>>>>>> jira I'll attach a patch for a convenient solution.
>>>>>>>>
>>>>>>>> Regards,
>>>>>>>>
>>>>>>>> Taher Alkhateeb
>>>>>>>>
>>>>>>>> On Jul 22, 2016 11:04 PM, "Jacques Le Roux" <
>>>>>>>> [hidden email]>
>>>>>>>> wrote:
>>>>>>>>
>>>>>>>> I think a Jira is appropriate. I believe it should be a subtask of
>>>>>>>> OFBIZ-7534. I like them because it's easy to spot the state (advance
>>>>>>>> of
>>>>>>>> work done, and especially remaining issue to work on). I'll handle
>>>>>>>> the
>>>>>>>> wiki
>>>>>>>> side when I'll get a chance...
>>>>>>>>
>>>>>>>> Thanks
>>>>>>>>
>>>>>>>> Jacques
>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> Le 21/07/2016 à 14:39, Taher Alkhateeb a écrit :
>>>>>>>>
>>>>>>>> Nice work okay we have the answer on how to stop downloading the
>>>>>>>> sources
>>>>>>>>
>>>>>>>> :)
>>>>>>>>> On Jul 21, 2016 3:35 PM, "Jacques Le Roux" <
>>>>>>>>> [hidden email]>
>>>>>>>>> wrote:
>>>>>>>>>
>>>>>>>>> Thanks Taher,
>>>>>>>>>
>>>>>>>>> I guess you spoke about Eclipse. BTW should we not add "
>>>>>>>>>
>>>>>>>>>> downloadSources=true"
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> https://stackoverflow.com/questions/10156847/how-to-tell-gradle-to-download-all-the-source-jars#answer-10655347
>>>>>>>>>> ?
>>>>>>>>>>
>>>>>>>>>> For IntelliJ it's here
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> https://stackoverflow.com/questions/12718753/how-to-download-dependency-sources-for-gradle-project-in-idea
>>>>>>>>>>
>>>>>>>>>> We will put that, with other things, in the "Gradle to And" wiki
>>>>>>>>>> page
>>>>>>>>>> ASAP
>>>>>>>>>>
>>>>>>>>>> Jacques
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> Le 21/07/2016 à 08:05, Taher Alkhateeb a écrit :
>>>>>>>>>>
>>>>>>>>>> Hi Everyone,
>>>>>>>>>>
>>>>>>>>>> One of the very nice things I discovered a while back is that
>>>>>>>>>> Gradle
>>>>>>>>>>
>>>>>>>>>>> automatically downloads The Source libraries for the jar
>>>>>>>>>>> dependencies
>>>>>>>>>>> for
>>>>>>>>>>> almost all of the libraries.
>>>>>>>>>>>
>>>>>>>>>>> This means that you can ctrl-click with your IDE to navigate the
>>>>>>>>>>> source
>>>>>>>>>>> code of these external libraries which I find very helpful for
>>>>>>>>>>> debugging.
>>>>>>>>>>>
>>>>>>>>>>> So just wanted to share that for anyone who might want to take
>>>>>>>>>>> advantage
>>>>>>>>>>> of
>>>>>>>>>>> this
>>>>>>>>>>>
>>>>>>>>>>> Taher Alkhateeb
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>

Reply | Threaded
Open this post in threaded view
|

Re: Library sources are automatically downloaded

taher
Hi Jacques,

They are linked automatically here. I'm beginning to get worried that this
might be a windows thing again. Are the sources not linked on your PC?

Taher Alkhateeb.

On Jul 26, 2016 9:01 PM, "Jacques Le Roux" <[hidden email]>
wrote:

> Thanks Taher,
>
> I found that but I thought from answers in the Stackoverflow thread that
> Eclipse would automatically link the jars with the sources if they exist.
>
> Or do you have to link them all manually :-o ?
>
> Jacques
>
>
> Le 26/07/2016 à 16:18, Taher Alkhateeb a écrit :
>
>> Hi Jacques,
>>
>> As I mentioned above, the sources reside in your Gradle cache.
>>
>> For example. looking at the commons-cli library, on my computer it is
>> found
>> in :
>>
>>
>> $HOME/.gradle/caches/modules-2/files-2.1/commons-cli/commons-cli/1.3.1/1303efbc4b181e5a58bf2e967dc156a3132b97c0/commons-cli-1.3.1.jar
>>
>> $HOME/.gradle/caches/modules-2/files-2.1/commons-cli/commons-cli/1.3.1/12ec02d8cb9fbb33bd05506109a4fc8bcc3578/commons-cli-1.3.1-sources.jar
>>
>> Is that what you were searching for?
>>
>> Taher Alkhateeb
>>
>> On Tue, Jul 26, 2016 at 5:04 PM, Jacques Le Roux <
>> [hidden email]> wrote:
>>
>> Thanks Taher,
>>>
>>> I did not read the Stackoverflow thread sufficiently it's there:
>>>
>>> https://docs.gradle.org/current/dsl/org.gradle.plugins.ide.eclipse.model.EclipseClasspath.html#org.gradle.plugins.ide.eclipse.model.EclipseClasspath:downloadSources
>>> so downloadSources=true is default in v2
>>>
>>> But I did not find where the sources are, it seems from the Stackoverflow
>>> thread answers that it's automatically done, and you seems to imply
>>> that. I
>>> will try more jars to see how it goes..
>>>
>>> Jacques
>>>
>>>
>>>
>>> Le 26/07/2016 à 13:05, Taher Alkhateeb a écrit :
>>>
>>> Hi Jacques,
>>>>
>>>> I believe that in JCenter (and I think MavenCenteral also) most Jars
>>>> declare their sources. If you call the eclipse task, then it will
>>>> download
>>>> those sources to the gradle cache along with the binaries. Very few
>>>> exceptions are there. For example, javolution sources didn't download
>>>> which
>>>> would've made refactoring EntitySaxReaders.java easier (off topic).
>>>>
>>>> Also with regards to the downloadSources=true I think yes we should not
>>>> worry about because if I'm in a production server I won't call eclipse
>>>> tasks either way and hence won't download the sources.
>>>>
>>>> Did I tackle your question correctly? Sorry if I shifted.
>>>>
>>>> Regards,
>>>>
>>>> Taher Alkhateeb
>>>>
>>>> On Tue, Jul 26, 2016 at 1:47 PM, Jacques Le Roux <
>>>> [hidden email]> wrote:
>>>>
>>>> Oh I have no problems with the eclipse task, this is for local usage. I
>>>>
>>>>> use it of course, else Eclipse is lost with the OFBiz project.
>>>>>
>>>>> I was more asking where are the Java sources available, in the Gradle
>>>>> cache? And if it's there, where exactly?
>>>>>
>>>>> Also, from your answer I understand that you use the OOTB eclipse task
>>>>> w/o
>>>>> the <<downloadSources=true">> stuff that I found in a Stackoverflow
>>>>> answer
>>>>> linked below
>>>>>
>>>>> Thanks
>>>>>
>>>>> Jacques
>>>>>
>>>>>
>>>>>
>>>>> Le 26/07/2016 à 11:47, Taher Alkhateeb a écrit :
>>>>>
>>>>> Oh, allow me to explain:
>>>>>
>>>>>> ./gradlew cleanAll loadDefault -> This would download the dependencies
>>>>>> and
>>>>>> load your data
>>>>>> ./gradlew cleanAll build eclipse loadDefault -> this would be same as
>>>>>> above
>>>>>> but would additionally download the source Jars.
>>>>>>
>>>>>> So if you avoid calling the eclipse tasks, then no source jars will
>>>>>> download. I can double check exactly how this happens if you like,
>>>>>> but I
>>>>>> think we are safe as a general idea.
>>>>>>
>>>>>> On Tue, Jul 26, 2016 at 12:43 PM, Jacques Le Roux <
>>>>>> [hidden email]> wrote:
>>>>>>
>>>>>> Does this mean that you used
>>>>>>
>>>>>> downloadSources=true"
>>>>>>>
>>>>>>> In you local Eclipse task?
>>>>>>> Because you said you had the sources easily available. Beside, where
>>>>>>> did
>>>>>>> you find the sources exactly?
>>>>>>>
>>>>>>> Thanks
>>>>>>>
>>>>>>> Jacques
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Le 24/07/2016 à 17:54, Taher Alkhateeb a écrit :
>>>>>>>
>>>>>>> Hi All,
>>>>>>>
>>>>>>> After a bit of investigation I believe Gradle will _not_ download
>>>>>>>> source
>>>>>>>> libraries _unless_ someone calls the "eclipse" task. So I think no
>>>>>>>> need
>>>>>>>> to
>>>>>>>> do any changes for releases.
>>>>>>>>
>>>>>>>> Cheers,
>>>>>>>>
>>>>>>>> Taher Alkhateeb
>>>>>>>>
>>>>>>>> On Fri, Jul 22, 2016 at 11:08 PM, Taher Alkhateeb <
>>>>>>>> [hidden email]> wrote:
>>>>>>>>
>>>>>>>> Hi Jacques,
>>>>>>>>
>>>>>>>> Sure. I have an idea in mind for how to make this very trivial so
>>>>>>>> that
>>>>>>>>
>>>>>>>>> minimal code is needed to prepare for a release. Whenever you issue
>>>>>>>>> the
>>>>>>>>> jira I'll attach a patch for a convenient solution.
>>>>>>>>>
>>>>>>>>> Regards,
>>>>>>>>>
>>>>>>>>> Taher Alkhateeb
>>>>>>>>>
>>>>>>>>> On Jul 22, 2016 11:04 PM, "Jacques Le Roux" <
>>>>>>>>> [hidden email]>
>>>>>>>>> wrote:
>>>>>>>>>
>>>>>>>>> I think a Jira is appropriate. I believe it should be a subtask of
>>>>>>>>> OFBIZ-7534. I like them because it's easy to spot the state
>>>>>>>>> (advance
>>>>>>>>> of
>>>>>>>>> work done, and especially remaining issue to work on). I'll handle
>>>>>>>>> the
>>>>>>>>> wiki
>>>>>>>>> side when I'll get a chance...
>>>>>>>>>
>>>>>>>>> Thanks
>>>>>>>>>
>>>>>>>>> Jacques
>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> Le 21/07/2016 à 14:39, Taher Alkhateeb a écrit :
>>>>>>>>>
>>>>>>>>> Nice work okay we have the answer on how to stop downloading the
>>>>>>>>> sources
>>>>>>>>>
>>>>>>>>> :)
>>>>>>>>>
>>>>>>>>>> On Jul 21, 2016 3:35 PM, "Jacques Le Roux" <
>>>>>>>>>> [hidden email]>
>>>>>>>>>> wrote:
>>>>>>>>>>
>>>>>>>>>> Thanks Taher,
>>>>>>>>>>
>>>>>>>>>> I guess you spoke about Eclipse. BTW should we not add "
>>>>>>>>>>
>>>>>>>>>> downloadSources=true"
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> https://stackoverflow.com/questions/10156847/how-to-tell-gradle-to-download-all-the-source-jars#answer-10655347
>>>>>>>>>>> ?
>>>>>>>>>>>
>>>>>>>>>>> For IntelliJ it's here
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> https://stackoverflow.com/questions/12718753/how-to-download-dependency-sources-for-gradle-project-in-idea
>>>>>>>>>>>
>>>>>>>>>>> We will put that, with other things, in the "Gradle to And" wiki
>>>>>>>>>>> page
>>>>>>>>>>> ASAP
>>>>>>>>>>>
>>>>>>>>>>> Jacques
>>>>>>>>>>>
>>>>>>>>>>>
>>>>>>>>>>> Le 21/07/2016 à 08:05, Taher Alkhateeb a écrit :
>>>>>>>>>>>
>>>>>>>>>>> Hi Everyone,
>>>>>>>>>>>
>>>>>>>>>>> One of the very nice things I discovered a while back is that
>>>>>>>>>>> Gradle
>>>>>>>>>>>
>>>>>>>>>>> automatically downloads The Source libraries for the jar
>>>>>>>>>>>> dependencies
>>>>>>>>>>>> for
>>>>>>>>>>>> almost all of the libraries.
>>>>>>>>>>>>
>>>>>>>>>>>> This means that you can ctrl-click with your IDE to navigate the
>>>>>>>>>>>> source
>>>>>>>>>>>> code of these external libraries which I find very helpful for
>>>>>>>>>>>> debugging.
>>>>>>>>>>>>
>>>>>>>>>>>> So just wanted to share that for anyone who might want to take
>>>>>>>>>>>> advantage
>>>>>>>>>>>> of
>>>>>>>>>>>> this
>>>>>>>>>>>>
>>>>>>>>>>>> Taher Alkhateeb
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>>>>>>>>>>>>
>
12