Re: BOM dependency with gradle

2016-06-02 Thread Matt Sicker
You can even put that log4jVersion property into gradle.properties. That's
how I've been doing it.

On 2 June 2016 at 11:42, Greg Thomas  wrote:

> Aha, I wasn't aware of that. A little bit of Googling later turns up
> https://spring.io/blog/2015/02/23/better-dependency-management-for-gradle
> which demonstrates a Gradle plugin that supports a BOM.
>
> That seems like overkill to me, I think I'll stick with ...
>
> def log4jVersion = '2.6'
> compile group: 'org.apache.logging.log4j', name: 'log4j-api', version:
> "$log4jVersion"
> compile group: 'org.apache.logging.log4j', name: 'log4j-core',
> version: "$log4jVersion"
>
> which seems simpler and more obvious, tbh.
>
> Greg
>
> On 2 June 2016 at 17:36, Matt Sicker  wrote:
> > I'm not sure if BOMs work outside Maven as it's based on a Maven-specific
> > feature that Ralph was involved in a while back.
> >
> > On 2 June 2016 at 10:13, Gary Gregory  wrote:
> >
> >> On Jun 2, 2016 3:04 AM, "Greg Thomas"  wrote:
> >> >
> >> > > I explicitly specify the version for log4j-api and  log4j-core as
> well.
> >> >
> >> > Doesn't that defeat the point of the BOM?
> >>
> >> It sure seems like it!
> >>
> >> Gary
> >> >
> >> > Greg
> >> >
> >> > On 2 June 2016 at 09:38, Remko Popma  wrote:
> >> > > I explicitly specify the version for log4j-api and  log4j-core as
> well.
> >> > >
> >> > > Sent from my iPhone
> >> > >
> >> > >> On 2016/06/02, at 17:03, Greg Thomas 
> wrote:
> >> > >>
> >> > >> Is there a correct syntax to use the BOM dependency with gradle?
> >> > >>
> >> > >> I've currently got the following ...
> >> > >>
> >> > >> compile group: 'org.apache.logging.log4j,' name: 'log4j-bom',
> version:
> >> '2.6'
> >> > >> compile group: 'org.apache.logging.log4j', name: 'log4j-api'
> >> > >> compile group: 'org.apache.logging.log4j', name: 'log4j-core'
> >> > >>
> >> > >> But dependency resolution fails ...
> >> > >>
> >> > >> C:\Greg\test>gradlew dependencies
> >> > >> :dependencies
> >> > >>
> >> > >> 
> >> > >> Root project
> >> > >> 
> >> > >>
> >> > >> archives - Configuration for archive artifacts.
> >> > >> No dependencies
> >> > >>
> >> > >> compile - Dependencies for source set 'main'.
> >> > >> +--- org.apache.logging.log4j:log4j-bom:2.6
> >> > >> +--- org.apache.logging.log4j:log4j-api: FAILED
> >> > >> +--- org.apache.logging.log4j:log4j-core: FAILED
> >> > >> ...
> >> > >>
> >> > >> What's the right syntax, if it's even possible?
> >> > >>
> >> > >> Thanks,
> >> > >>
> >> > >> Greg
> >> > >>
> >> > >>
> -
> >> > >> To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
> >> > >> For additional commands, e-mail:
> log4j-user-h...@logging.apache.org
> >> > >>
> >> > >
> >> > >
> -
> >> > > To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
> >> > > For additional commands, e-mail: log4j-user-h...@logging.apache.org
> >> > >
> >> >
> >> > -
> >> > To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
> >> > For additional commands, e-mail: log4j-user-h...@logging.apache.org
> >> >
> >>
> >
> >
> >
> > --
> > Matt Sicker 
>
> -
> To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
> For additional commands, e-mail: log4j-user-h...@logging.apache.org
>
>


-- 
Matt Sicker 


Re: BOM dependency with gradle

2016-06-02 Thread Jav Angelo
I always add try to add the version after having a bad experience with the
gradle dependency

Some times while upgrading some of the api's get deperecated and you end up
on the wrong side.

So better be safe than regret.

Atleast this gives you full control on what response you can expect from a
call.

Regards,

Jav Angelo

Getting started with Java Swing - http://bit.ly/1RQcam7


On Thu, Jun 2, 2016 at 1:33 PM, Greg Thomas  wrote:

> Is there a correct syntax to use the BOM dependency with gradle?
>
> I've currently got the following ...
>
> compile group: 'org.apache.logging.log4j,' name: 'log4j-bom', version:
> '2.6'
> compile group: 'org.apache.logging.log4j', name: 'log4j-api'
> compile group: 'org.apache.logging.log4j', name: 'log4j-core'
>
> But dependency resolution fails ...
>
> C:\Greg\test>gradlew dependencies
> :dependencies
>
> 
> Root project
> 
>
> archives - Configuration for archive artifacts.
> No dependencies
>
> compile - Dependencies for source set 'main'.
> +--- org.apache.logging.log4j:log4j-bom:2.6
> +--- org.apache.logging.log4j:log4j-api: FAILED
> +--- org.apache.logging.log4j:log4j-core: FAILED
> ...
>
> What's the right syntax, if it's even possible?
>
> Thanks,
>
> Greg
>
> -
> To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
> For additional commands, e-mail: log4j-user-h...@logging.apache.org
>
>


Re: BOM dependency with gradle

2016-06-02 Thread Ralph Goers
I have no idea what Gradle does to support the import scope, but as I recall 
that was added to Maven before Gradle existed.

> On Jun 2, 2016, at 9:36 AM, Matt Sicker  wrote:
> 
> I'm not sure if BOMs work outside Maven as it's based on a Maven-specific
> feature that Ralph was involved in a while back.
> 
> On 2 June 2016 at 10:13, Gary Gregory  wrote:
> 
>> On Jun 2, 2016 3:04 AM, "Greg Thomas"  wrote:
>>> 
 I explicitly specify the version for log4j-api and  log4j-core as well.
>>> 
>>> Doesn't that defeat the point of the BOM?
>> 
>> It sure seems like it!
>> 
>> Gary
>>> 
>>> Greg
>>> 
>>> On 2 June 2016 at 09:38, Remko Popma  wrote:
 I explicitly specify the version for log4j-api and  log4j-core as well.
 
 Sent from my iPhone
 
> On 2016/06/02, at 17:03, Greg Thomas  wrote:
> 
> Is there a correct syntax to use the BOM dependency with gradle?
> 
> I've currently got the following ...
> 
> compile group: 'org.apache.logging.log4j,' name: 'log4j-bom', version:
>> '2.6'
> compile group: 'org.apache.logging.log4j', name: 'log4j-api'
> compile group: 'org.apache.logging.log4j', name: 'log4j-core'
> 
> But dependency resolution fails ...
> 
> C:\Greg\test>gradlew dependencies
> :dependencies
> 
> 
> Root project
> 
> 
> archives - Configuration for archive artifacts.
> No dependencies
> 
> compile - Dependencies for source set 'main'.
> +--- org.apache.logging.log4j:log4j-bom:2.6
> +--- org.apache.logging.log4j:log4j-api: FAILED
> +--- org.apache.logging.log4j:log4j-core: FAILED
> ...
> 
> What's the right syntax, if it's even possible?
> 
> Thanks,
> 
> Greg
> 
> -
> To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
> For additional commands, e-mail: log4j-user-h...@logging.apache.org
> 
 
 -
 To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
 For additional commands, e-mail: log4j-user-h...@logging.apache.org
 
>>> 
>>> -
>>> To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
>>> For additional commands, e-mail: log4j-user-h...@logging.apache.org
>>> 
>> 
> 
> 
> 
> -- 
> Matt Sicker 



-
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org



Re: BOM dependency with gradle

2016-06-02 Thread Matt Sicker
I'm not sure if BOMs work outside Maven as it's based on a Maven-specific
feature that Ralph was involved in a while back.

On 2 June 2016 at 10:13, Gary Gregory  wrote:

> On Jun 2, 2016 3:04 AM, "Greg Thomas"  wrote:
> >
> > > I explicitly specify the version for log4j-api and  log4j-core as well.
> >
> > Doesn't that defeat the point of the BOM?
>
> It sure seems like it!
>
> Gary
> >
> > Greg
> >
> > On 2 June 2016 at 09:38, Remko Popma  wrote:
> > > I explicitly specify the version for log4j-api and  log4j-core as well.
> > >
> > > Sent from my iPhone
> > >
> > >> On 2016/06/02, at 17:03, Greg Thomas  wrote:
> > >>
> > >> Is there a correct syntax to use the BOM dependency with gradle?
> > >>
> > >> I've currently got the following ...
> > >>
> > >> compile group: 'org.apache.logging.log4j,' name: 'log4j-bom', version:
> '2.6'
> > >> compile group: 'org.apache.logging.log4j', name: 'log4j-api'
> > >> compile group: 'org.apache.logging.log4j', name: 'log4j-core'
> > >>
> > >> But dependency resolution fails ...
> > >>
> > >> C:\Greg\test>gradlew dependencies
> > >> :dependencies
> > >>
> > >> 
> > >> Root project
> > >> 
> > >>
> > >> archives - Configuration for archive artifacts.
> > >> No dependencies
> > >>
> > >> compile - Dependencies for source set 'main'.
> > >> +--- org.apache.logging.log4j:log4j-bom:2.6
> > >> +--- org.apache.logging.log4j:log4j-api: FAILED
> > >> +--- org.apache.logging.log4j:log4j-core: FAILED
> > >> ...
> > >>
> > >> What's the right syntax, if it's even possible?
> > >>
> > >> Thanks,
> > >>
> > >> Greg
> > >>
> > >> -
> > >> To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
> > >> For additional commands, e-mail: log4j-user-h...@logging.apache.org
> > >>
> > >
> > > -
> > > To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
> > > For additional commands, e-mail: log4j-user-h...@logging.apache.org
> > >
> >
> > -
> > To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
> > For additional commands, e-mail: log4j-user-h...@logging.apache.org
> >
>



-- 
Matt Sicker 


Re: BOM dependency with gradle

2016-06-02 Thread Gary Gregory
On Jun 2, 2016 3:04 AM, "Greg Thomas"  wrote:
>
> > I explicitly specify the version for log4j-api and  log4j-core as well.
>
> Doesn't that defeat the point of the BOM?

It sure seems like it!

Gary
>
> Greg
>
> On 2 June 2016 at 09:38, Remko Popma  wrote:
> > I explicitly specify the version for log4j-api and  log4j-core as well.
> >
> > Sent from my iPhone
> >
> >> On 2016/06/02, at 17:03, Greg Thomas  wrote:
> >>
> >> Is there a correct syntax to use the BOM dependency with gradle?
> >>
> >> I've currently got the following ...
> >>
> >> compile group: 'org.apache.logging.log4j,' name: 'log4j-bom', version:
'2.6'
> >> compile group: 'org.apache.logging.log4j', name: 'log4j-api'
> >> compile group: 'org.apache.logging.log4j', name: 'log4j-core'
> >>
> >> But dependency resolution fails ...
> >>
> >> C:\Greg\test>gradlew dependencies
> >> :dependencies
> >>
> >> 
> >> Root project
> >> 
> >>
> >> archives - Configuration for archive artifacts.
> >> No dependencies
> >>
> >> compile - Dependencies for source set 'main'.
> >> +--- org.apache.logging.log4j:log4j-bom:2.6
> >> +--- org.apache.logging.log4j:log4j-api: FAILED
> >> +--- org.apache.logging.log4j:log4j-core: FAILED
> >> ...
> >>
> >> What's the right syntax, if it's even possible?
> >>
> >> Thanks,
> >>
> >> Greg
> >>
> >> -
> >> To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
> >> For additional commands, e-mail: log4j-user-h...@logging.apache.org
> >>
> >
> > -
> > To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
> > For additional commands, e-mail: log4j-user-h...@logging.apache.org
> >
>
> -
> To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
> For additional commands, e-mail: log4j-user-h...@logging.apache.org
>


Re: BOM dependency with gradle

2016-06-02 Thread Greg Thomas
> I explicitly specify the version for log4j-api and  log4j-core as well.

Doesn't that defeat the point of the BOM?

Greg

On 2 June 2016 at 09:38, Remko Popma  wrote:
> I explicitly specify the version for log4j-api and  log4j-core as well.
>
> Sent from my iPhone
>
>> On 2016/06/02, at 17:03, Greg Thomas  wrote:
>>
>> Is there a correct syntax to use the BOM dependency with gradle?
>>
>> I've currently got the following ...
>>
>> compile group: 'org.apache.logging.log4j,' name: 'log4j-bom', version: '2.6'
>> compile group: 'org.apache.logging.log4j', name: 'log4j-api'
>> compile group: 'org.apache.logging.log4j', name: 'log4j-core'
>>
>> But dependency resolution fails ...
>>
>> C:\Greg\test>gradlew dependencies
>> :dependencies
>>
>> 
>> Root project
>> 
>>
>> archives - Configuration for archive artifacts.
>> No dependencies
>>
>> compile - Dependencies for source set 'main'.
>> +--- org.apache.logging.log4j:log4j-bom:2.6
>> +--- org.apache.logging.log4j:log4j-api: FAILED
>> +--- org.apache.logging.log4j:log4j-core: FAILED
>> ...
>>
>> What's the right syntax, if it's even possible?
>>
>> Thanks,
>>
>> Greg
>>
>> -
>> To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
>> For additional commands, e-mail: log4j-user-h...@logging.apache.org
>>
>
> -
> To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
> For additional commands, e-mail: log4j-user-h...@logging.apache.org
>

-
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org



Re: BOM dependency with gradle

2016-06-02 Thread Remko Popma
I explicitly specify the version for log4j-api and  log4j-core as well. 

Sent from my iPhone

> On 2016/06/02, at 17:03, Greg Thomas  wrote:
> 
> Is there a correct syntax to use the BOM dependency with gradle?
> 
> I've currently got the following ...
> 
> compile group: 'org.apache.logging.log4j,' name: 'log4j-bom', version: '2.6'
> compile group: 'org.apache.logging.log4j', name: 'log4j-api'
> compile group: 'org.apache.logging.log4j', name: 'log4j-core'
> 
> But dependency resolution fails ...
> 
> C:\Greg\test>gradlew dependencies
> :dependencies
> 
> 
> Root project
> 
> 
> archives - Configuration for archive artifacts.
> No dependencies
> 
> compile - Dependencies for source set 'main'.
> +--- org.apache.logging.log4j:log4j-bom:2.6
> +--- org.apache.logging.log4j:log4j-api: FAILED
> +--- org.apache.logging.log4j:log4j-core: FAILED
> ...
> 
> What's the right syntax, if it's even possible?
> 
> Thanks,
> 
> Greg
> 
> -
> To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
> For additional commands, e-mail: log4j-user-h...@logging.apache.org
> 

-
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org



BOM dependency with gradle

2016-06-02 Thread Greg Thomas
Is there a correct syntax to use the BOM dependency with gradle?

I've currently got the following ...

compile group: 'org.apache.logging.log4j,' name: 'log4j-bom', version: '2.6'
compile group: 'org.apache.logging.log4j', name: 'log4j-api'
compile group: 'org.apache.logging.log4j', name: 'log4j-core'

But dependency resolution fails ...

C:\Greg\test>gradlew dependencies
:dependencies


Root project


archives - Configuration for archive artifacts.
No dependencies

compile - Dependencies for source set 'main'.
+--- org.apache.logging.log4j:log4j-bom:2.6
+--- org.apache.logging.log4j:log4j-api: FAILED
+--- org.apache.logging.log4j:log4j-core: FAILED
...

What's the right syntax, if it's even possible?

Thanks,

Greg

-
To unsubscribe, e-mail: log4j-user-unsubscr...@logging.apache.org
For additional commands, e-mail: log4j-user-h...@logging.apache.org