You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@buildr.apache.org by atul singh <si...@gmail.com> on 2008/04/15 19:03:38 UTC

download sources for artifacts

I am a new user of buildr. I was looking for how to download sources for
artifacts and then i found the jira issue
https://issues.apache.org/jira/browse/BUILDR-19?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel

Download sources, is kind of important from the developer perspective...
Are there any updates on this one.Or is there a way one can suggest here,
which i can implement on my own.
Thanks

Re: download sources for artifacts

Posted by Alex Boisvert <bo...@intalio.com>.
On Tue, Apr 15, 2008 at 10:03 AM, atul singh <si...@gmail.com> wrote:

> I am a new user of buildr. I was looking for how to download sources for
> artifacts and then i found the jira issue
>
> https://issues.apache.org/jira/browse/BUILDR-19?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel
>
> Download sources, is kind of important from the developer perspective...
> Are there any updates on this one.Or is there a way one can suggest here,
> which i can implement on my own.


I haven't had time to get to it yet...

If you have some time, I think that would be a good starter task to get into
Buildr hacking since most of it would be contained in lib/ide/eclipse.rb.

On the top of my head, it could look like,
1) Add an option in the Eclipse task to download sources or not
    You could use something like ENV['DOWNLOAD_SOURCES'] and default to yes
2) Generate source artifact names using the "-sources" qualifier convention
3) Force download of source artifacts;  ignore if doesn't exist or download
fails
4) Add available source jars as classpathentry attribute,

<classpathentry kind="var"

path="M2_REPO/commons-lang/commons-lang/2.3/commons-lang-2.3.jar"
                sourcepath="M2_REPO/comm
ons-lang/commons-lang/2.2/commons-lang-2.2-sources.jar"/>

5) Write a test case (probably the toughest part since we don't have tests
for Eclipse task right now)

Hope this helps...

alex