You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@buildr.apache.org by JPT <j-...@gmx.net> on 2015/01/10 16:20:34 UTC

buildr doesn not create recursive deps in eclipse classpath

Hi,

I already sent this email, but it did not appear in the ML archive.
Perhaps it wasn't accepted because I wasn't subscribed? (I am now)
Please excuse me for trying again, should this result in a double post.

----

I recently started my first project with buildr & eclipse.
Everything is fine, much better than maven I hope ;)

The only problem is, "buildr eclipse" only adds the complile.with from
buildfile to eclipse-cp. The dependencies of these are missing.
If I build the project using buildr, it recursively downloads all
necessary libraries.
But Eclipse classpath is still missing these.

Have some examples:

I added commons-config and -logging, -lang was missing, had to add
it manually:
compile.with 'commons-configuration:commons-configuration:jar:1.10'
compile.with 'commons-logging:commons-logging:jar:1.2'
compile.with 'commons-lang:commons-lang:jar:2.6'

I added junit
compile.with 'junit:junit:jar:4.12'

result is:
java.lang.NoClassDefFoundError: org/hamcrest/SelfDescribing

so, let's have a look into junit.pom:
<dependencies><dependency><groupId>org.hamcrest</groupId><artifactId>hamcrest-core</artifactId><version>1.3</version></dependency></dependencies>

there it is.
then why isn't it integrated into my eclipse CP? (see attachment)

Yes, I issued "buildr eclipse" and refreshed the project from disk.
Everything works fine for explicitely mentioned deps.

should I use builr4eclipse?

thanks,

Jan






Re: buildr doesn not create recursive deps in eclipse classpath

Posted by Peter Donald <pe...@realityforge.org>.
Hi,

Buildr does not by default add all transitive dependencies of a dependency.
So if you add 'junit:junit:jar:4.12' it will only add that one dependency.
To add junit and all it's transitive dependencies you can do something
along the lines of

compile.with transitive('junit:junit:jar:4.12')

HTH


On Sun, Jan 11, 2015 at 2:20 AM, JPT <j-...@gmx.net> wrote:

> Hi,
>
> I already sent this email, but it did not appear in the ML archive.
> Perhaps it wasn't accepted because I wasn't subscribed? (I am now)
> Please excuse me for trying again, should this result in a double post.
>
> ----
>
> I recently started my first project with buildr & eclipse.
> Everything is fine, much better than maven I hope ;)
>
> The only problem is, "buildr eclipse" only adds the complile.with from
> buildfile to eclipse-cp. The dependencies of these are missing.
> If I build the project using buildr, it recursively downloads all
> necessary libraries.
> But Eclipse classpath is still missing these.
>
> Have some examples:
>
> I added commons-config and -logging, -lang was missing, had to add
> it manually:
> compile.with 'commons-configuration:commons-configuration:jar:1.10'
> compile.with 'commons-logging:commons-logging:jar:1.2'
> compile.with 'commons-lang:commons-lang:jar:2.6'
>
> I added junit
> compile.with 'junit:junit:jar:4.12'
>
> result is:
> java.lang.NoClassDefFoundError: org/hamcrest/SelfDescribing
>
> so, let's have a look into junit.pom:
>
> <dependencies><dependency><groupId>org.hamcrest</groupId><artifactId>hamcrest-core</artifactId><version>1.3</version></dependency></dependencies>
>
> there it is.
> then why isn't it integrated into my eclipse CP? (see attachment)
>
> Yes, I issued "buildr eclipse" and refreshed the project from disk.
> Everything works fine for explicitely mentioned deps.
>
> should I use builr4eclipse?
>
> thanks,
>
> Jan
>
>
>
>
>
>


-- 
Cheers,

Peter Donald