You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sqoop.apache.org by Jarek Jarcec Cecho <ja...@apache.org> on 2015/10/15 21:20:53 UTC

Re: How can we choose the right maven version for our build?

Any ideas how to pick up the proper version of maven?

Jarcec

> On Aug 24, 2015, at 1:20 PM, Jarek Jarcec Cecho <ja...@apache.org> wrote:
> 
> I have a job that is quite regularly failing with:
> 
> Error resolving version for 'org.codehaus.mojo:findbugs-maven-plugin': Plugin requires Maven version 3.0.1
> 
> Looking into the job’s configuration, I don’t see any way to specify maven version (similarly as we do for let say java). It seems that we were trying to deal with this in the past as the we’re having following “Detection” in the command we’re running:
> 
> export MAVEN_HOME=/home/jenkins/tools/maven/latest
> export PATH=$PATH:$JAVA_HOME/bin:$MAVEN_HOME/bin
> 
> But that sees quite flaky, so I’m wondering what is the right way to get the right maven version for the job? :)
> 
> Jarcec
> 
> Links:
> 1: https://builds.apache.org/job/PreCommit-SQOOP-Build/1622/artifact/patch-process/test_unit.txt


Re: How can we choose the right maven version for our build?

Posted by Sean Busbey <bu...@cloudera.com>.
you can activate the tool injection plugin to give you a reliable MAVEN_HOME.

In the job config, it's the checkbox labeled "tool environment" then
find the maven version you want and select it.

On Thu, Oct 15, 2015 at 7:32 PM, Jarek Jarcec Cecho <ja...@apache.org> wrote:
> Thanks for the idea David. I’ll try that to see if it helps at least for now.
>
> My concern is that it’s not final solution - if the node won’t have proper maven version we will again fail in unpredictable way. Would it be possible to add selector for Maven version similarly as we have for Java?
>
> Jarcec
>
>> On Oct 15, 2015, at 3:03 PM, David Robson <Da...@software.dell.com> wrote:
>>
>> Hey Jarcec,
>>
>> Have you tried reversing the path export for example:
>>
>> export MAVEN_HOME=/home/jenkins/tools/maven/latest
>> export PATH=$JAVA_HOME/bin:$MAVEN_HOME/bin:$PATH
>>
>> To ensure your "mvn" command is picked up first even if it's on the existing PATH.
>>
>> David
>>
>> -----Original Message-----
>> From: Jarek Jarcec Cecho [mailto:jarcec@gmail.com] On Behalf Of Jarek Jarcec Cecho
>> Sent: Friday, 16 October 2015 6:21 AM
>> To: builds@apache.org
>> Cc: dev@sqoop.apache.org
>> Subject: Re: How can we choose the right maven version for our build?
>>
>> Any ideas how to pick up the proper version of maven?
>>
>> Jarcec
>>
>>> On Aug 24, 2015, at 1:20 PM, Jarek Jarcec Cecho <ja...@apache.org> wrote:
>>>
>>> I have a job that is quite regularly failing with:
>>>
>>> Error resolving version for 'org.codehaus.mojo:findbugs-maven-plugin': Plugin requires Maven version 3.0.1
>>>
>>> Looking into the job’s configuration, I don’t see any way to specify maven version (similarly as we do for let say java). It seems that we were trying to deal with this in the past as the we’re having following “Detection” in the command we’re running:
>>>
>>> export MAVEN_HOME=/home/jenkins/tools/maven/latest
>>> export PATH=$PATH:$JAVA_HOME/bin:$MAVEN_HOME/bin
>>>
>>> But that sees quite flaky, so I’m wondering what is the right way to get the right maven version for the job? :)
>>>
>>> Jarcec
>>>
>>> Links:
>>> 1: https://builds.apache.org/job/PreCommit-SQOOP-Build/1622/artifact/patch-process/test_unit.txt
>>
>



-- 
Sean

Re: How can we choose the right maven version for our build?

Posted by Jarek Jarcec Cecho <ja...@apache.org>.
Thanks for the idea David. I’ll try that to see if it helps at least for now.

My concern is that it’s not final solution - if the node won’t have proper maven version we will again fail in unpredictable way. Would it be possible to add selector for Maven version similarly as we have for Java?

Jarcec

> On Oct 15, 2015, at 3:03 PM, David Robson <Da...@software.dell.com> wrote:
> 
> Hey Jarcec,
> 
> Have you tried reversing the path export for example:
> 
> export MAVEN_HOME=/home/jenkins/tools/maven/latest
> export PATH=$JAVA_HOME/bin:$MAVEN_HOME/bin:$PATH
> 
> To ensure your "mvn" command is picked up first even if it's on the existing PATH.
> 
> David
> 
> -----Original Message-----
> From: Jarek Jarcec Cecho [mailto:jarcec@gmail.com] On Behalf Of Jarek Jarcec Cecho
> Sent: Friday, 16 October 2015 6:21 AM
> To: builds@apache.org
> Cc: dev@sqoop.apache.org
> Subject: Re: How can we choose the right maven version for our build?
> 
> Any ideas how to pick up the proper version of maven?
> 
> Jarcec
> 
>> On Aug 24, 2015, at 1:20 PM, Jarek Jarcec Cecho <ja...@apache.org> wrote:
>> 
>> I have a job that is quite regularly failing with:
>> 
>> Error resolving version for 'org.codehaus.mojo:findbugs-maven-plugin': Plugin requires Maven version 3.0.1
>> 
>> Looking into the job’s configuration, I don’t see any way to specify maven version (similarly as we do for let say java). It seems that we were trying to deal with this in the past as the we’re having following “Detection” in the command we’re running:
>> 
>> export MAVEN_HOME=/home/jenkins/tools/maven/latest
>> export PATH=$PATH:$JAVA_HOME/bin:$MAVEN_HOME/bin
>> 
>> But that sees quite flaky, so I’m wondering what is the right way to get the right maven version for the job? :)
>> 
>> Jarcec
>> 
>> Links:
>> 1: https://builds.apache.org/job/PreCommit-SQOOP-Build/1622/artifact/patch-process/test_unit.txt
> 


Re: How can we choose the right maven version for our build?

Posted by Jarek Jarcec Cecho <ja...@apache.org>.
Thanks for the idea David. I’ll try that to see if it helps at least for now.

My concern is that it’s not final solution - if the node won’t have proper maven version we will again fail in unpredictable way. Would it be possible to add selector for Maven version similarly as we have for Java?

Jarcec

> On Oct 15, 2015, at 3:03 PM, David Robson <Da...@software.dell.com> wrote:
> 
> Hey Jarcec,
> 
> Have you tried reversing the path export for example:
> 
> export MAVEN_HOME=/home/jenkins/tools/maven/latest
> export PATH=$JAVA_HOME/bin:$MAVEN_HOME/bin:$PATH
> 
> To ensure your "mvn" command is picked up first even if it's on the existing PATH.
> 
> David
> 
> -----Original Message-----
> From: Jarek Jarcec Cecho [mailto:jarcec@gmail.com] On Behalf Of Jarek Jarcec Cecho
> Sent: Friday, 16 October 2015 6:21 AM
> To: builds@apache.org
> Cc: dev@sqoop.apache.org
> Subject: Re: How can we choose the right maven version for our build?
> 
> Any ideas how to pick up the proper version of maven?
> 
> Jarcec
> 
>> On Aug 24, 2015, at 1:20 PM, Jarek Jarcec Cecho <ja...@apache.org> wrote:
>> 
>> I have a job that is quite regularly failing with:
>> 
>> Error resolving version for 'org.codehaus.mojo:findbugs-maven-plugin': Plugin requires Maven version 3.0.1
>> 
>> Looking into the job’s configuration, I don’t see any way to specify maven version (similarly as we do for let say java). It seems that we were trying to deal with this in the past as the we’re having following “Detection” in the command we’re running:
>> 
>> export MAVEN_HOME=/home/jenkins/tools/maven/latest
>> export PATH=$PATH:$JAVA_HOME/bin:$MAVEN_HOME/bin
>> 
>> But that sees quite flaky, so I’m wondering what is the right way to get the right maven version for the job? :)
>> 
>> Jarcec
>> 
>> Links:
>> 1: https://builds.apache.org/job/PreCommit-SQOOP-Build/1622/artifact/patch-process/test_unit.txt
> 


RE: How can we choose the right maven version for our build?

Posted by David Robson <Da...@software.dell.com>.
Hey Jarcec,

Have you tried reversing the path export for example:

export MAVEN_HOME=/home/jenkins/tools/maven/latest
export PATH=$JAVA_HOME/bin:$MAVEN_HOME/bin:$PATH

To ensure your "mvn" command is picked up first even if it's on the existing PATH.

David

-----Original Message-----
From: Jarek Jarcec Cecho [mailto:jarcec@gmail.com] On Behalf Of Jarek Jarcec Cecho
Sent: Friday, 16 October 2015 6:21 AM
To: builds@apache.org
Cc: dev@sqoop.apache.org
Subject: Re: How can we choose the right maven version for our build?

Any ideas how to pick up the proper version of maven?

Jarcec

> On Aug 24, 2015, at 1:20 PM, Jarek Jarcec Cecho <ja...@apache.org> wrote:
> 
> I have a job that is quite regularly failing with:
> 
> Error resolving version for 'org.codehaus.mojo:findbugs-maven-plugin': Plugin requires Maven version 3.0.1
> 
> Looking into the job’s configuration, I don’t see any way to specify maven version (similarly as we do for let say java). It seems that we were trying to deal with this in the past as the we’re having following “Detection” in the command we’re running:
> 
> export MAVEN_HOME=/home/jenkins/tools/maven/latest
> export PATH=$PATH:$JAVA_HOME/bin:$MAVEN_HOME/bin
> 
> But that sees quite flaky, so I’m wondering what is the right way to get the right maven version for the job? :)
> 
> Jarcec
> 
> Links:
> 1: https://builds.apache.org/job/PreCommit-SQOOP-Build/1622/artifact/patch-process/test_unit.txt


RE: How can we choose the right maven version for our build?

Posted by David Robson <Da...@software.dell.com>.
Hey Jarcec,

Have you tried reversing the path export for example:

export MAVEN_HOME=/home/jenkins/tools/maven/latest
export PATH=$JAVA_HOME/bin:$MAVEN_HOME/bin:$PATH

To ensure your "mvn" command is picked up first even if it's on the existing PATH.

David

-----Original Message-----
From: Jarek Jarcec Cecho [mailto:jarcec@gmail.com] On Behalf Of Jarek Jarcec Cecho
Sent: Friday, 16 October 2015 6:21 AM
To: builds@apache.org
Cc: dev@sqoop.apache.org
Subject: Re: How can we choose the right maven version for our build?

Any ideas how to pick up the proper version of maven?

Jarcec

> On Aug 24, 2015, at 1:20 PM, Jarek Jarcec Cecho <ja...@apache.org> wrote:
> 
> I have a job that is quite regularly failing with:
> 
> Error resolving version for 'org.codehaus.mojo:findbugs-maven-plugin': Plugin requires Maven version 3.0.1
> 
> Looking into the job’s configuration, I don’t see any way to specify maven version (similarly as we do for let say java). It seems that we were trying to deal with this in the past as the we’re having following “Detection” in the command we’re running:
> 
> export MAVEN_HOME=/home/jenkins/tools/maven/latest
> export PATH=$PATH:$JAVA_HOME/bin:$MAVEN_HOME/bin
> 
> But that sees quite flaky, so I’m wondering what is the right way to get the right maven version for the job? :)
> 
> Jarcec
> 
> Links:
> 1: https://builds.apache.org/job/PreCommit-SQOOP-Build/1622/artifact/patch-process/test_unit.txt