Am 04.01.11 17:16, schrieb Mathias Kalb:
> Hi,
>
> with the java plugin I can not use providedCompile.
Ah okay. I missed that, but there was a discussion about adding the
providedCompile configuration to the java plugin I think.
>
> I thought I can define a new configuration 'tomcatLib' and every
> subproject use it.
> A Java/JAR subproject can use it as 'compile' and a WAR subproject can
> use it as 'providedCompile'.
You can try something like this:
------
subprojects{ sub ->
    if(sub.plugins.hasPlugin('war')){
       dependencies {
          providedCompile ...
       }
    }else{
    ...
    }
...
}
------

regards,
René
>
> But I do not know how to define this.
>
> regards
> Mathias Kalb
>
> Am 04.01.2011 17:04, schrieb Rene Groeschke:
>> Am 04.01.11 16:58, schrieb Mathias Kalb:
>>> Hi Rene,
>>>
>>> I can not use providedCompile or compile because the main build.gradle
>>> has not a java or war plugin.
>> ah okay. but you should be able to use it in your subprojects by
>> applying the java plugin directly in the subprojects closure :-)
>> -----
>> ....
>> subprojects{
>>       apply plugin:'java'
>>
>>       dependencies {
>>       ....
>>       }
>> }
>> -----
>>
>> regards,
>> René
>>>
>>> regards,
>>> Mathias Kalb
>>>
>>> Am 04.01.2011 16:38, schrieb Rene Groeschke:
>>>> Hi Mathias,
>>>> In general you can configure all your subprojects simply with the
>>>> subprojects closure:
>>>> -----
>>>> ....
>>>> subprojects{
>>>>       ...
>>>>       dependencies {
>>>>       ....
>>>>       }
>>>> }
>>>> -----
>>>>
>>>> I'm not sure why you declared a custom configuration. you can use the
>>>> providedCompile and providedRuntime configuration here I think.
>>>>
>>>> regards,
>>>> René
>>>>
>>>> Am 04.01.11 15:10, schrieb Mathias Kalb:
>>>>> Hi,
>>>>>
>>>>> we have some logging JARs (log4j, slf4j, ...) at "tomcat\lib". Every
>>>>> subproject (JAR/WAR) can use this JARs for "compile" and "runtime".
>>>>>
>>>>> I want to define the dependencies at one place and every subproject
>>>>> should use them as a compile dependency.
>>>>>
>>>>> I tried the following at the "main" build.gradle. But how can I
>>>>> use it
>>>>> at the subprojects?
>>>>>
>>>>>       configurations {
>>>>>           tomcatLib
>>>>>       }
>>>>>
>>>>>       dependencies {
>>>>>           tomcatLib group: 'log4j', name: 'log4j', version: '1.2.+'
>>>>>           tomcatLib group: 'javax.mail', name: 'mail', version: '1.+'
>>>>>           tomcatLib group: 'org.slf4j', name: 'slf4j-api', version:
>>>>> '1.+'
>>>>>           tomcatLib group: 'org.slf4j', name: 'slf4j-log4j12',
>>>>> version:
>>>>> '1.+'
>>>>>           tomcatLib group: 'commons-logging', name:
>>>>> 'commons-logging',
>>>>> version: '1.+'
>>>>>       }
>>>>>
>>>>> Thanks,
>>>>> Mathias Kalb
>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> 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
>>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
>    http://xircles.codehaus.org/manage_email
>


-- 
------------------------------------
Rene Groeschke

r...@breskeby.com
http://www.breskeby.com
http://twitter.com/breskeby
------------------------------------


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

    http://xircles.codehaus.org/manage_email


Reply via email to