You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hbase.apache.org by Jean Charles Jabouille <je...@kelkoogroup.com> on 2018/08/13 12:33:22 UTC
Use hadoop.profile with maven
Hi,
I'm working on a project which uses hbase 2.0 and hadoop 3.0. By default
Hbase dependencies are configured for hadoop 2.7.4.
As I understand the switch to hadoop 3.0 can be done by doing something
like this: "mvn -Dhadoop.profile=3.0 clean package" on my project. This
works like a charm but I would like to integrate this property in my
pom.xml. I tried:
- to put this property in <properties> section of my pom.xml
- use properties-maven-plugin to inject the property dynamically
When I launch mvn dependency:tree hadoop 2.7.4 is used.
Someone can me on this subject please ?
jc
Re: Use hadoop.profile with maven
Posted by Jean Charles Jabouille <je...@kelkoogroup.com>.
Hi,
I don't have a direct access on the pom.xml of Hbase, I just use it in
the pom.xml fo my application.
I will try to precise my question: in my application pom.xml how I can
add a dependency of hbase 2.x compiled for hadoop 3.x ?
Very big thanks for you help,
jc
Le 14/08/2018 à 17:12, Artem Ervits a écrit :
> copy the activation block from hadoop-2 profile and replace the
> hadoop-3 activation block with it. then comment out the hadoop-2.
>
> On Tue, Aug 14, 2018 at 10:56 AM Jean Charles Jabouille
> <jean-charles.jabouille@kelkoogroup.com
> <ma...@kelkoogroup.com>> wrote:
>
> Thanks for your help but I already did it and it works.
>
> What I want is to launch "mvn clean dependency:tree" without
> specifying
> in command line "-Dhadoop.profile=3.0"
>
>
> Le 14/08/2018 à 16:18, Artem Ervits a écrit :
> > mvn clean install -Dhadoop.profile=3.0 -DskipTests
> > mvn clean dependency:tree -Dhadoop.profile=3.0
> >
> >
> > On Tue, Aug 14, 2018 at 8:30 AM Jean Charles Jabouille <
> > jean-charles.jabouille@kelkoogroup.com
> <ma...@kelkoogroup.com>> wrote:
> >
> >> Hi,
> >>
> >> I launched "mvn -P hadoop-3.0 dependency:tree" without any
> success :-(
> >>
> >> Do you have other suggestion please ?
> >>
> >> jc
> >>
> >>
> >> Le 13/08/2018 à 17:53, Artem Ervits a écrit :
> >>> there may be a better way but you can try making hadoop-3
> profile default
> >>> in your pom
> >>> https://github.com/apache/hbase/blob/master/pom.xml#L2514-L2771
> >>> you can test and confirm but I believe the diff in the
> activation section
> >>> is what controls which profile gets executed
> >>> https://github.com/apache/hbase/blob/master/pom.xml#L2777-L2782
> >>>
> >>>
> >>> On Mon, Aug 13, 2018 at 8:33 AM Jean Charles Jabouille <
> >>> jean-charles.jabouille@kelkoogroup.com
> <ma...@kelkoogroup.com>> wrote:
> >>>
> >>>> Hi,
> >>>>
> >>>> I'm working on a project which uses hbase 2.0 and hadoop 3.0.
> By default
> >>>> Hbase dependencies are configured for hadoop 2.7.4.
> >>>>
> >>>> As I understand the switch to hadoop 3.0 can be done by doing
> something
> >>>> like this: "mvn -Dhadoop.profile=3.0 clean package" on my
> project. This
> >>>> works like a charm but I would like to integrate this
> property in my
> >>>> pom.xml. I tried:
> >>>> - to put this property in <properties> section of my pom.xml
> >>>> - use properties-maven-plugin to inject the property dynamically
> >>>>
> >>>> When I launch mvn dependency:tree hadoop 2.7.4 is used.
> >>>>
> >>>> Someone can me on this subject please ?
> >>>>
> >>>> jc
> >>>>
> >>
>
>
>
> --
> Artem
Re: Use hadoop.profile with maven
Posted by Jean Charles Jabouille <je...@kelkoogroup.com>.
Thanks for your help but I already did it and it works.
What I want is to launch "mvn clean dependency:tree" without specifying
in command line "-Dhadoop.profile=3.0"
Le 14/08/2018 à 16:18, Artem Ervits a écrit :
> mvn clean install -Dhadoop.profile=3.0 -DskipTests
> mvn clean dependency:tree -Dhadoop.profile=3.0
>
>
> On Tue, Aug 14, 2018 at 8:30 AM Jean Charles Jabouille <
> jean-charles.jabouille@kelkoogroup.com> wrote:
>
>> Hi,
>>
>> I launched "mvn -P hadoop-3.0 dependency:tree" without any success :-(
>>
>> Do you have other suggestion please ?
>>
>> jc
>>
>>
>> Le 13/08/2018 à 17:53, Artem Ervits a écrit :
>>> there may be a better way but you can try making hadoop-3 profile default
>>> in your pom
>>> https://github.com/apache/hbase/blob/master/pom.xml#L2514-L2771
>>> you can test and confirm but I believe the diff in the activation section
>>> is what controls which profile gets executed
>>> https://github.com/apache/hbase/blob/master/pom.xml#L2777-L2782
>>>
>>>
>>> On Mon, Aug 13, 2018 at 8:33 AM Jean Charles Jabouille <
>>> jean-charles.jabouille@kelkoogroup.com> wrote:
>>>
>>>> Hi,
>>>>
>>>> I'm working on a project which uses hbase 2.0 and hadoop 3.0. By default
>>>> Hbase dependencies are configured for hadoop 2.7.4.
>>>>
>>>> As I understand the switch to hadoop 3.0 can be done by doing something
>>>> like this: "mvn -Dhadoop.profile=3.0 clean package" on my project. This
>>>> works like a charm but I would like to integrate this property in my
>>>> pom.xml. I tried:
>>>> - to put this property in <properties> section of my pom.xml
>>>> - use properties-maven-plugin to inject the property dynamically
>>>>
>>>> When I launch mvn dependency:tree hadoop 2.7.4 is used.
>>>>
>>>> Someone can me on this subject please ?
>>>>
>>>> jc
>>>>
>>
Re: Use hadoop.profile with maven
Posted by Artem Ervits <ar...@gmail.com>.
mvn clean install -Dhadoop.profile=3.0 -DskipTests
mvn clean dependency:tree -Dhadoop.profile=3.0
On Tue, Aug 14, 2018 at 8:30 AM Jean Charles Jabouille <
jean-charles.jabouille@kelkoogroup.com> wrote:
> Hi,
>
> I launched "mvn -P hadoop-3.0 dependency:tree" without any success :-(
>
> Do you have other suggestion please ?
>
> jc
>
>
> Le 13/08/2018 à 17:53, Artem Ervits a écrit :
> > there may be a better way but you can try making hadoop-3 profile default
> > in your pom
> > https://github.com/apache/hbase/blob/master/pom.xml#L2514-L2771
> > you can test and confirm but I believe the diff in the activation section
> > is what controls which profile gets executed
> > https://github.com/apache/hbase/blob/master/pom.xml#L2777-L2782
> >
> >
> > On Mon, Aug 13, 2018 at 8:33 AM Jean Charles Jabouille <
> > jean-charles.jabouille@kelkoogroup.com> wrote:
> >
> >> Hi,
> >>
> >> I'm working on a project which uses hbase 2.0 and hadoop 3.0. By default
> >> Hbase dependencies are configured for hadoop 2.7.4.
> >>
> >> As I understand the switch to hadoop 3.0 can be done by doing something
> >> like this: "mvn -Dhadoop.profile=3.0 clean package" on my project. This
> >> works like a charm but I would like to integrate this property in my
> >> pom.xml. I tried:
> >> - to put this property in <properties> section of my pom.xml
> >> - use properties-maven-plugin to inject the property dynamically
> >>
> >> When I launch mvn dependency:tree hadoop 2.7.4 is used.
> >>
> >> Someone can me on this subject please ?
> >>
> >> jc
> >>
>
>
Re: Use hadoop.profile with maven
Posted by Jean Charles Jabouille <je...@kelkoogroup.com>.
Hi,
I launched "mvn -P hadoop-3.0 dependency:tree" without any success :-(
Do you have other suggestion please ?
jc
Le 13/08/2018 à 17:53, Artem Ervits a écrit :
> there may be a better way but you can try making hadoop-3 profile default
> in your pom
> https://github.com/apache/hbase/blob/master/pom.xml#L2514-L2771
> you can test and confirm but I believe the diff in the activation section
> is what controls which profile gets executed
> https://github.com/apache/hbase/blob/master/pom.xml#L2777-L2782
>
>
> On Mon, Aug 13, 2018 at 8:33 AM Jean Charles Jabouille <
> jean-charles.jabouille@kelkoogroup.com> wrote:
>
>> Hi,
>>
>> I'm working on a project which uses hbase 2.0 and hadoop 3.0. By default
>> Hbase dependencies are configured for hadoop 2.7.4.
>>
>> As I understand the switch to hadoop 3.0 can be done by doing something
>> like this: "mvn -Dhadoop.profile=3.0 clean package" on my project. This
>> works like a charm but I would like to integrate this property in my
>> pom.xml. I tried:
>> - to put this property in <properties> section of my pom.xml
>> - use properties-maven-plugin to inject the property dynamically
>>
>> When I launch mvn dependency:tree hadoop 2.7.4 is used.
>>
>> Someone can me on this subject please ?
>>
>> jc
>>
Re: Use hadoop.profile with maven
Posted by Artem Ervits <ar...@gmail.com>.
there may be a better way but you can try making hadoop-3 profile default
in your pom
https://github.com/apache/hbase/blob/master/pom.xml#L2514-L2771
you can test and confirm but I believe the diff in the activation section
is what controls which profile gets executed
https://github.com/apache/hbase/blob/master/pom.xml#L2777-L2782
On Mon, Aug 13, 2018 at 8:33 AM Jean Charles Jabouille <
jean-charles.jabouille@kelkoogroup.com> wrote:
> Hi,
>
> I'm working on a project which uses hbase 2.0 and hadoop 3.0. By default
> Hbase dependencies are configured for hadoop 2.7.4.
>
> As I understand the switch to hadoop 3.0 can be done by doing something
> like this: "mvn -Dhadoop.profile=3.0 clean package" on my project. This
> works like a charm but I would like to integrate this property in my
> pom.xml. I tried:
> - to put this property in <properties> section of my pom.xml
> - use properties-maven-plugin to inject the property dynamically
>
> When I launch mvn dependency:tree hadoop 2.7.4 is used.
>
> Someone can me on this subject please ?
>
> jc
>