You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@buildr.apache.org by Tom Lee <ap...@tomlee.co> on 2011/07/06 15:35:48 UTC

Dependency scope in buildr?

Hi all,

Is it currently possible to scope dependencies? Something along the 
lines of:

compile.with "com.jgoodies:looks:2.2.0:jar", :scope => :compile

?

I'm trying to implement something along the lines of package(:fulljar) 
that includes all dependencies, adds Class-Path to the manifest, etc., 
but it would be nice to be able to indicate e.g. that a particular jar 
is required at compile-time only (e.g. in the case of a custom compiler 
-- http://github.com/thomaslee/buildr-mirah).

Cheers,
Tom

-- 

*Tom Lee*
Software Developer / Consultant
http://tomlee.co | @tglee <http://twitter.com/tglee> | 0450 112 893 
<tel:+61450112893>

/(or check out my code on github <http://github.com/thomaslee>)/


Re: Dependency scope in buildr?

Posted by Antoine Toulme <an...@lunar-ocean.com>.
Compile dependencies are only used at compile time. We don't package them
with the jar by default.

On Fri, Jul 8, 2011 at 01:38, Tom Lee <ap...@tomlee.co> wrote:

> On 07/07/11 03:14, jeanphilippe1.caruana@orange-**ftgroup.com<je...@orange-ftgroup.com>wrote:
>
>> On 06/07/2011 15:35, Tom Lee wrote:
>>
>>> Hi all,
>>>
>>> Is it currently possible to scope dependencies? Something along the
>>> lines of:
>>>
>>> compile.with "com.jgoodies:looks:2.2.0:jar"
>>>
>>
>> that's how you declare compile scope dependancies.
>> test dependancies :
>> test.with 'com:com;1:jar'
>>
>>
>>  Oh, of course. Silly question. Let me rephrase: I guess I was looking for
> a sort of "compile_only": something that is *only* needed at compile time
> and is not a dependency of the resulting package (e.g. the Mirah compiler,
> which generates JVM bytecode without any additional runtime library
> requirements).
>
> Any hints, short of package(:jar).exclude artifact(...) ?
>
>
> --
>
> *Tom Lee*
> Software Developer / Consultant
> http://tomlee.co | @tglee <http://twitter.com/tglee> | 0450 112 893 <tel:
> +61450112893>
>
> /(or check out my code on github <http://github.com/thomaslee>)**/
>
>

Re: Dependency scope in buildr?

Posted by Tom Lee <ap...@tomlee.co>.
On 07/07/11 03:14, jeanphilippe1.caruana@orange-ftgroup.com wrote:
> On 06/07/2011 15:35, Tom Lee wrote:
>> Hi all,
>>
>> Is it currently possible to scope dependencies? Something along the
>> lines of:
>>
>> compile.with "com.jgoodies:looks:2.2.0:jar"
>
> that's how you declare compile scope dependancies.
> test dependancies :
> test.with 'com:com;1:jar'
>
>
Oh, of course. Silly question. Let me rephrase: I guess I was looking 
for a sort of "compile_only": something that is *only* needed at compile 
time and is not a dependency of the resulting package (e.g. the Mirah 
compiler, which generates JVM bytecode without any additional runtime 
library requirements).

Any hints, short of package(:jar).exclude artifact(...) ?

-- 

*Tom Lee*
Software Developer / Consultant
http://tomlee.co | @tglee <http://twitter.com/tglee> | 0450 112 893 
<tel:+61450112893>

/(or check out my code on github <http://github.com/thomaslee>)/


Re: Dependency scope in buildr?

Posted by je...@orange-ftgroup.com.
On 06/07/2011 15:35, Tom Lee wrote:
> Hi all,
>
> Is it currently possible to scope dependencies? Something along the
> lines of:
>
> compile.with "com.jgoodies:looks:2.2.0:jar"

that's how you declare compile scope dependancies.
test dependancies :
test.with 'com:com;1:jar'


-- 
Jean-Philippe Caruana































********************************************************************************
IMPORTANT.Les informations contenues dans ce message electronique y compris les fichiers attaches sont strictement confidentielles
et peuvent etre protegees par la loi.
Ce message electronique est destine exclusivement au(x) destinataire(s) mentionne(s) ci-dessus.
Si vous avez recu ce message par erreur ou s il ne vous est pas destine, veuillez immediatement le signaler  a l expediteur et effacer ce message 
et tous les fichiers eventuellement attaches.
Toute lecture, exploitation ou transmission des informations contenues dans ce message est interdite.
Tout message electronique est susceptible d alteration.
A ce titre, le Groupe France Telecom decline toute responsabilite notamment s il a ete altere, deforme ou falsifie.
De meme, il appartient au destinataire de s assurer de l absence de tout virus.

IMPORTANT.This e-mail message and any attachments are strictly confidential and may be protected by law. This message is
intended only for the named recipient(s) above.
If you have received this message in error, or are not the named recipient(s), please immediately notify the sender and delete this e-mail message.
Any unauthorized view, usage or disclosure ofthis message is prohibited.
Since e-mail messages may not be reliable, France Telecom Group shall not be liable for any message if modified, changed or falsified.
Additionally the recipient should ensure they are actually virus free.
********************************************************************************