Grails dependency sources

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
9 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Grails dependency sources

J. David Beutel-4
  Is there some convenient way to download the source code of the Grails
dependencies?  It's gotten a lot more complicated since Spring stopped
distributing the source code of its dependencies.  I'm hoping for
something like `mvn dependency:sources`

Cheers,
11011011

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Grails dependency sources

Lari Hotari -
05.10.2010 23:54, J. David Beutel kirjoitti:

>  Is there some convenient way to download the source code of the
> Grails dependencies?  It's gotten a lot more complicated since Spring
> stopped distributing the source code of its dependencies.  I'm hoping
> for something like `mvn dependency:sources`
>
> Cheers,
> 11011011
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>
>

Here's one way to do it:

grails install-plugin eclipse-scripts
grails compile
grails download-sources-and-javadocs
# run twice to download everything
grails download-sources-and-javadocs
grails create-eclipse-files


see http://www.grails.org/plugin/eclipse-scripts for more information.


Regards,

Lari


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Grails dependency sources

Sébastien Launay-2
Hi all,

I also have the same limitation using STS 2.3.3.CI-201007030809-CI-R5330-B277.
Indeed, I have the sources automatically attached to the following components:
- groovy-all-*.jar
- built-in grails-*.jar
- installed plugins (e.g. spring-security-core-*/src/groovy)

But I do not have the sources for these artifacts:
- grails dependencies like Spring, Hibernate, log4j, ...
- plugins transitive dependencies declared in dependencies.groovy
  like spring-security-core-*.jar pulled by spring-security-core plugin
- plugins with local transitive dependencies like Apache CXF
  pulled by ws-client plugin
- local libs found in lib/*.jar

Except for the plugins' local transitive dependencies and the local libs,
I think the dependencies sources are often available in Maven (where
the binary jars come from) and therefore could be fetch and cached
by Ivy and then provided by STS.

After using IvyDE or M2Eclipse and access to lib sources in one click,
this is
IMHO a major drawback, I have the impression of working with
closed source libraries :).

The only workaround I have at the moment is to click on a artifact and
attach Java sources but once I click on OK the
"Grails Tools > Refresh dependencies" is triggered and the overwrite
this attachment setting.
The trick is to quickly cancel the "Refresh dependencies" task by clicking
on "Terminate" in the Console view ;) but then later I will lose these settings
when I really need to refresh dependencies.

I search for this kind of issues on JIRA STS (Grails component) but
I did not find any, maybe I am the only one with this limitation?

I can create a JIRA issue with more details if needed.

--
Sébastien Launay
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Grails dependency sources

J. David Beutel-4
In reply to this post by Lari Hotari -
  On 2010-10-05 11:04 , Lari Hotari wrote:
> grails install-plugin eclipse-scripts
> grails compile
> grails download-sources-and-javadocs
> # run twice to download everything
> grails download-sources-and-javadocs
> grails create-eclipse-files

Excellent!  Thank you!

I'm using IntelliJ, so after that I just copied .classpath to vi it into
shape to insert into my global grails-1.3.4 library in
~/Library/Preferences/IntelliJIdea10/options/applicationLibraries.xml
(and path.macros.xml).

Cheers,
11011011

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Grails dependency sources

rlovtangen
In reply to this post by Lari Hotari -
The eclipse-scripts plugin looks nice, as it seems to put source-jars under ~/.ivy2 similar to how 'mvn dependency:sources' and buildt in feature of IntelliJ does.

But the main problem with Grails is that the Grails source-jars are not published to any repo (AFAIK)  :(
The Groovy source is published (eg http://repo2.maven.org/maven2/org/codehaus/groovy/groovy-all/1.7.5/groovy-all-1.7.5-sources.jar), but not the Grails source.

Ronny

On Oct 5, 2010, at 11:04 PM, Lari Hotari wrote:

> 05.10.2010 23:54, J. David Beutel kirjoitti:
>> Is there some convenient way to download the source code of the Grails dependencies?  It's gotten a lot more complicated since Spring stopped distributing the source code of its dependencies.  I'm hoping for something like `mvn dependency:sources`
>>
>> Cheers,
>> 11011011
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>   http://xircles.codehaus.org/manage_email
>>
>>
>
> Here's one way to do it:
>
> grails install-plugin eclipse-scripts
> grails compile
> grails download-sources-and-javadocs
> # run twice to download everything
> grails download-sources-and-javadocs
> grails create-eclipse-files
>
>
> see http://www.grails.org/plugin/eclipse-scripts for more information.
>
>
> Regards,
>
> Lari
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>   http://xircles.codehaus.org/manage_email
>
>


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Grails dependency sources

pledbrook
> The eclipse-scripts plugin looks nice, as it seems to put source-jars under ~/.ivy2 similar to how 'mvn dependency:sources' and buildt in feature of IntelliJ does.
>
> But the main problem with Grails is that the Grails source-jars are not published to any repo (AFAIK)  :(
> The Groovy source is published (eg http://repo2.maven.org/maven2/org/codehaus/groovy/groovy-all/1.7.5/groovy-all-1.7.5-sources.jar), but not the Grails source.

Do you mind raising an issue so we can keep track of it and people can vote?

Thanks,

Peter

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Grails dependency sources

rlovtangen

On Oct 12, 2010, at 12:15 PM, Peter Ledbrook wrote:

The eclipse-scripts plugin looks nice, as it seems to put source-jars under ~/.ivy2 similar to how 'mvn dependency:sources' and buildt in feature of IntelliJ does.

But the main problem with Grails is that the Grails source-jars are not published to any repo (AFAIK)  :(
The Groovy source is published (eg http://repo2.maven.org/maven2/org/codehaus/groovy/groovy-all/1.7.5/groovy-all-1.7.5-sources.jar), but not the Grails source.

Do you mind raising an issue so we can keep track of it and people can vote?

There's one already here: http://jira.codehaus.org/browse/GRAILS-5611

Would be terrific if this could be resolved :) Having the source automatically attached to the IDE is very nice.


Ronny

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Grails dependency sources

Robert Fletcher-2
Looks like the eclipse-scripts plugin no longer works with Grails 2. I
get the following error when I run `grails
download-sources-and-javadocs`:

    | Error Error executing script DownloadSourcesAndJavadocs:
groovy.lang.MissingMethodException: No signature of method:
org.codehaus.groovy.grails.resolve.IvyDependencyManager.addDependency()
is applicable for argument types:
(org.apache.ivy.core.module.id.ModuleRevisionId) values:
[org.xhtmlrenderer#core-renderer;R8] (Use --stacktrace to see the full
trace)

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Grails dependency sources

Lari Hotari -

In Grails 2.0 there is a command for downloading sources/javadocs:

grails refresh-dependencies --include-source --include-javadoc test.xml
http://jira.grails.org/browse/GRAILS-7916

It's used by STS: https://issuetracker.springsource.com/browse/STS-1440

The command doesn't seem to work properly yet.

Lari



25.10.2011 13:25, Robert Fletcher wrote:

> Looks like the eclipse-scripts plugin no longer works with Grails 2. I
> get the following error when I run `grails
> download-sources-and-javadocs`:
>
>     | Error Error executing script DownloadSourcesAndJavadocs:
> groovy.lang.MissingMethodException: No signature of method:
> org.codehaus.groovy.grails.resolve.IvyDependencyManager.addDependency()
> is applicable for argument types:
> (org.apache.ivy.core.module.id.ModuleRevisionId) values:
> [org.xhtmlrenderer#core-renderer;R8] (Use --stacktrace to see the full
> trace)
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>     http://xircles.codehaus.org/manage_email
>
>


---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Loading...