You are viewing a plain text version of this content. The canonical link for it is here.
Posted to builds@apache.org by sebb <se...@gmail.com> on 2012/02/28 14:17:07 UTC

[Buildbot] value for M2_HOME (maven.home) ?

JMeter needs to know the Maven home directory in order to upload snapshots.

However the standard M2_HOME env. variable [1] does not seem to be set.

Is Maven installed in a standard location?

I suppose the build file could be updated to run "mvn -v" in a shell
and extract the home directory, but that seems rather crude, and
error-prone.

[1] http://maven.apache.org/download.html#Installation

Re: [Buildbot] value for M2_HOME (maven.home) ?

Posted by sebb <se...@gmail.com>.
On 28 February 2012 22:46, Gavin McDonald <ga...@16degrees.com.au> wrote:
>
>
>> -----Original Message-----
>> From: sebb [mailto:sebbaz@gmail.com]
>> Sent: Wednesday, 29 February 2012 7:31 AM
>> To: builds@apache.org; gavin@16degrees.com.au
>> Subject: Re: [Buildbot] value for M2_HOME (maven.home) ?
>>
>> On 28 February 2012 21:19, Gavin McDonald <ga...@16degrees.com.au>
>> wrote:
>> > Sebb et al,
>> >
>> > Maven can be installed in different places on different slaves, so it
>> > is good to be specific.
>>
>> Is there a document that describes where to find things on each slave?
>
> No, with over 30 slaves and different admins installing stuff all the time,
> I
> fear it would be a nightmare to keep updated. Ideas welcome.

AIUI some OSes provide a command to display what tools have been
installed; perhaps that could be run and used to generate a reference
page?

Re: [Buildbot] value for M2_HOME (maven.home) ?

Posted by Olivier Lamy <ol...@apache.org>.
2012/2/29 Gavin McDonald <ga...@16degrees.com.au>:
>
>
>> -----Original Message-----
>> From: Jesse Glick [mailto:jesse.glick@oracle.com]
>> Sent: Wednesday, 29 February 2012 8:55 AM
>> To: builds@apache.org
>> Subject: Re: [Buildbot] value for M2_HOME (maven.home) ?
>>
>> On 02/28/2012 05:46 PM, Gavin McDonald wrote:
>> >> Is there a document that describes where to find things on each slave?
>> >
>> > with over 30 slaves and different admins installing stuff all the time, I fear it
>> would be a nightmare to keep updated.
>>
>> This is why tool auto-installation [1] was created. Even if you do not want to
>> use the automatic installers, you can still define an abstract tool on master
>> and then assign a path for it on each slave (in the node properties page).
>> Then a job can use the tool without having to hardcode a path. If by "using"
>> the tool you need to do something more specialized than just assigning it to a
>> standard build step, the Tool Environment plugin [2] can be very helpful.
>>
>> [1] https://wiki.jenkins-ci.org/display/JENKINS/Tool+Auto-Installation
>> [2] https://wiki.jenkins-ci.org/display/JENKINS/Tool+Environment+Plugin
>
> Note the Topic - BUILDBOT , not Jenkins!
>
> If the Jenkins Admins want to do that, fine.
>
> Gav...
>
>

Yup that's good for our tools (Ant Maven) using this automatic
installer/downloader.
BTW for jdk it's not anymore possible as some changes has been done on
oracle download side.... (so doesn't work anymore) and it was not
supported for all os.

--
Olivier

RE: [Buildbot] value for M2_HOME (maven.home) ?

Posted by Gavin McDonald <ga...@16degrees.com.au>.

> -----Original Message-----
> From: Jesse Glick [mailto:jesse.glick@oracle.com]
> Sent: Wednesday, 29 February 2012 8:55 AM
> To: builds@apache.org
> Subject: Re: [Buildbot] value for M2_HOME (maven.home) ?
> 
> On 02/28/2012 05:46 PM, Gavin McDonald wrote:
> >> Is there a document that describes where to find things on each slave?
> >
> > with over 30 slaves and different admins installing stuff all the time, I fear it
> would be a nightmare to keep updated.
> 
> This is why tool auto-installation [1] was created. Even if you do not want to
> use the automatic installers, you can still define an abstract tool on master
> and then assign a path for it on each slave (in the node properties page).
> Then a job can use the tool without having to hardcode a path. If by "using"
> the tool you need to do something more specialized than just assigning it to a
> standard build step, the Tool Environment plugin [2] can be very helpful.
> 
> [1] https://wiki.jenkins-ci.org/display/JENKINS/Tool+Auto-Installation
> [2] https://wiki.jenkins-ci.org/display/JENKINS/Tool+Environment+Plugin

Note the Topic - BUILDBOT , not Jenkins!

If the Jenkins Admins want to do that, fine.

Gav...



Re: [Buildbot] value for M2_HOME (maven.home) ?

Posted by Jesse Glick <je...@oracle.com>.
On 02/28/2012 05:46 PM, Gavin McDonald wrote:
>> Is there a document that describes where to find things on each slave?
>
> with over 30 slaves and different admins installing stuff all the time, I fear it would be a nightmare to keep updated.

This is why tool auto-installation [1] was created. Even if you do not want to use the automatic installers, you can still define an abstract tool on master and then 
assign a path for it on each slave (in the node properties page). Then a job can use the tool without having to hardcode a path. If by "using" the tool you need to do 
something more specialized than just assigning it to a standard build step, the Tool Environment plugin [2] can be very helpful.

[1] https://wiki.jenkins-ci.org/display/JENKINS/Tool+Auto-Installation
[2] https://wiki.jenkins-ci.org/display/JENKINS/Tool+Environment+Plugin

Re: [Buildbot] value for M2_HOME (maven.home) ?

Posted by sebb <se...@gmail.com>.
On 28 February 2012 22:46, Gavin McDonald <ga...@16degrees.com.au> wrote:
>
>
>> -----Original Message-----
>> From: sebb [mailto:sebbaz@gmail.com]
>> Sent: Wednesday, 29 February 2012 7:31 AM
>> To: builds@apache.org; gavin@16degrees.com.au
>> Subject: Re: [Buildbot] value for M2_HOME (maven.home) ?
>>
>> On 28 February 2012 21:19, Gavin McDonald <ga...@16degrees.com.au>
>> wrote:
>> > Sebb et al,
>> >
>> > Maven can be installed in different places on different slaves, so it
>> > is good to be specific.
>>
>> Is there a document that describes where to find things on each slave?
>
> No, with over 30 slaves and different admins installing stuff all the time,
> I
> fear it would be a nightmare to keep updated. Ideas welcome.
>
>>
>> > Also, it is not always appropriate to set M2_HOME in the env of the
>> > machine or buildbot user on a  build machine as there be several Maven
>> > versions installed at one time.
>> >
>> > Feel free to set M2_HOME in the buildbot settings for your builds. For
>> > example look where ANT_HOME has been set in the env for your build in
>> > your jmeter.conf
>>
>> OK, I see.
>>
>> I already used an Ant property instead, but that could be converted to an
> env
>> variable.
>
> The Ant property you set was in an addStep env, in other words, properties
> set
> on one step don’t necessarily flow through to the next step.

I know; in this case it's only needed for that task invocation.

> Variables
> and/or
> env args you want available to a whole build should instead be added to the
> builder env, or use WithProperties etc.
>
> Gav...
>
>>
>> >
>> > (the location mentioned is correct - for this slave, others may vary)
>> >
>> > Gav...
>> >
>> >
>> >> -----Original Message-----
>> >> From: sebb [mailto:sebbaz@gmail.com]
>> >> Sent: Wednesday, 29 February 2012 6:38 AM
>> >> To: builds@apache.org
>> >> Subject: Re: [Buildbot] value for M2_HOME (maven.home) ?
>> >>
>> >> On 28 February 2012 19:17, Konstantin Kolinko
>> >> <kn...@gmail.com>
>> >> wrote:
>> >> > 2012/2/28 sebb <se...@gmail.com>:
>> >> >> On 28 February 2012 13:17, sebb <se...@gmail.com> wrote:
>> >> >>> JMeter needs to know the Maven home directory in order to upload
>> >> snapshots.
>> >> >>>
>> >> >>> However the standard M2_HOME env. variable [1] does not seem to
>> >> >>> be
>> >> set.
>> >> >>>
>> >> >>> Is Maven installed in a standard location?
>> >> >>>
>> >> >>> I suppose the build file could be updated to run "mvn -v" in a
>> >> >>> shell and extract the home directory, but that seems rather
>> >> >>> crude, and error-prone.
>> >> >>
>> >> >> [And Maven 2.2.1 does not display the home directory anyway]
>> >> >>
>> >> >>> [1] http://maven.apache.org/download.html#Installation
>> >> >
>> >> > Looking at some other build that already uses Maven:
>> >> >
>> >> > http://ci.apache.org/builders/rat_trunk/builds/200/steps/compile/lo
>> >> > gs/
>> >> > stdio
>> >> >
>> >> >>  M2=/usr/local/apache-maven/current/bin
>> >> >>  M2_HOME=/usr/local/apache-maven/current
>> >> >
>> >> > I do not know whether it helps.
>> >>
>> >> Thanks, I'll try that and see.
>> >>
>> >> > Are you able to start mvn, or you cannot just because M2_HOME is
>> >> > not
>> >> set?
>> >>
>> >> I am using Ant to run Maven using Java, and so need to know where the
>> >> Maven jar is.
>> >>
>> >> Long story, but cannot use Maven Ant Tool, and shell invocation is
>> >> not
>> > ideal.
>> >>
>> >> > Best regards,
>> >> > Konstantin Kolinko
>> >
>

RE: [Buildbot] value for M2_HOME (maven.home) ?

Posted by Gavin McDonald <ga...@16degrees.com.au>.

> -----Original Message-----
> From: sebb [mailto:sebbaz@gmail.com]
> Sent: Wednesday, 29 February 2012 7:31 AM
> To: builds@apache.org; gavin@16degrees.com.au
> Subject: Re: [Buildbot] value for M2_HOME (maven.home) ?
> 
> On 28 February 2012 21:19, Gavin McDonald <ga...@16degrees.com.au>
> wrote:
> > Sebb et al,
> >
> > Maven can be installed in different places on different slaves, so it
> > is good to be specific.
> 
> Is there a document that describes where to find things on each slave?

No, with over 30 slaves and different admins installing stuff all the time,
I
fear it would be a nightmare to keep updated. Ideas welcome.

> 
> > Also, it is not always appropriate to set M2_HOME in the env of the
> > machine or buildbot user on a  build machine as there be several Maven
> > versions installed at one time.
> >
> > Feel free to set M2_HOME in the buildbot settings for your builds. For
> > example look where ANT_HOME has been set in the env for your build in
> > your jmeter.conf
> 
> OK, I see.
> 
> I already used an Ant property instead, but that could be converted to an
env
> variable.

The Ant property you set was in an addStep env, in other words, properties
set
on one step don’t necessarily flow through to the next step. Variables
and/or
env args you want available to a whole build should instead be added to the
builder env, or use WithProperties etc.

Gav...

> 
> >
> > (the location mentioned is correct - for this slave, others may vary)
> >
> > Gav...
> >
> >
> >> -----Original Message-----
> >> From: sebb [mailto:sebbaz@gmail.com]
> >> Sent: Wednesday, 29 February 2012 6:38 AM
> >> To: builds@apache.org
> >> Subject: Re: [Buildbot] value for M2_HOME (maven.home) ?
> >>
> >> On 28 February 2012 19:17, Konstantin Kolinko
> >> <kn...@gmail.com>
> >> wrote:
> >> > 2012/2/28 sebb <se...@gmail.com>:
> >> >> On 28 February 2012 13:17, sebb <se...@gmail.com> wrote:
> >> >>> JMeter needs to know the Maven home directory in order to upload
> >> snapshots.
> >> >>>
> >> >>> However the standard M2_HOME env. variable [1] does not seem to
> >> >>> be
> >> set.
> >> >>>
> >> >>> Is Maven installed in a standard location?
> >> >>>
> >> >>> I suppose the build file could be updated to run "mvn -v" in a
> >> >>> shell and extract the home directory, but that seems rather
> >> >>> crude, and error-prone.
> >> >>
> >> >> [And Maven 2.2.1 does not display the home directory anyway]
> >> >>
> >> >>> [1] http://maven.apache.org/download.html#Installation
> >> >
> >> > Looking at some other build that already uses Maven:
> >> >
> >> > http://ci.apache.org/builders/rat_trunk/builds/200/steps/compile/lo
> >> > gs/
> >> > stdio
> >> >
> >> >>  M2=/usr/local/apache-maven/current/bin
> >> >>  M2_HOME=/usr/local/apache-maven/current
> >> >
> >> > I do not know whether it helps.
> >>
> >> Thanks, I'll try that and see.
> >>
> >> > Are you able to start mvn, or you cannot just because M2_HOME is
> >> > not
> >> set?
> >>
> >> I am using Ant to run Maven using Java, and so need to know where the
> >> Maven jar is.
> >>
> >> Long story, but cannot use Maven Ant Tool, and shell invocation is
> >> not
> > ideal.
> >>
> >> > Best regards,
> >> > Konstantin Kolinko
> >


Re: [Buildbot] value for M2_HOME (maven.home) ?

Posted by sebb <se...@gmail.com>.
On 28 February 2012 21:19, Gavin McDonald <ga...@16degrees.com.au> wrote:
> Sebb et al,
>
> Maven can be installed in different places on different slaves, so it is
> good
> to be specific.

Is there a document that describes where to find things on each slave?

> Also, it is not always appropriate to set M2_HOME in the env of the machine
> or buildbot
> user on a  build machine as there be several Maven versions installed at one
> time.
>
> Feel free to set M2_HOME in the buildbot settings for your builds. For
> example look where
> ANT_HOME has been set in the env for your build in your jmeter.conf

OK, I see.

I already used an Ant property instead, but that could be converted to
an env variable.

>
> (the location mentioned is correct - for this slave, others may vary)
>
> Gav...
>
>
>> -----Original Message-----
>> From: sebb [mailto:sebbaz@gmail.com]
>> Sent: Wednesday, 29 February 2012 6:38 AM
>> To: builds@apache.org
>> Subject: Re: [Buildbot] value for M2_HOME (maven.home) ?
>>
>> On 28 February 2012 19:17, Konstantin Kolinko <kn...@gmail.com>
>> wrote:
>> > 2012/2/28 sebb <se...@gmail.com>:
>> >> On 28 February 2012 13:17, sebb <se...@gmail.com> wrote:
>> >>> JMeter needs to know the Maven home directory in order to upload
>> snapshots.
>> >>>
>> >>> However the standard M2_HOME env. variable [1] does not seem to be
>> set.
>> >>>
>> >>> Is Maven installed in a standard location?
>> >>>
>> >>> I suppose the build file could be updated to run "mvn -v" in a shell
>> >>> and extract the home directory, but that seems rather crude, and
>> >>> error-prone.
>> >>
>> >> [And Maven 2.2.1 does not display the home directory anyway]
>> >>
>> >>> [1] http://maven.apache.org/download.html#Installation
>> >
>> > Looking at some other build that already uses Maven:
>> >
>> > http://ci.apache.org/builders/rat_trunk/builds/200/steps/compile/logs/
>> > stdio
>> >
>> >>  M2=/usr/local/apache-maven/current/bin
>> >>  M2_HOME=/usr/local/apache-maven/current
>> >
>> > I do not know whether it helps.
>>
>> Thanks, I'll try that and see.
>>
>> > Are you able to start mvn, or you cannot just because M2_HOME is not
>> set?
>>
>> I am using Ant to run Maven using Java, and so need to know where the
>> Maven jar is.
>>
>> Long story, but cannot use Maven Ant Tool, and shell invocation is not
> ideal.
>>
>> > Best regards,
>> > Konstantin Kolinko
>

RE: [Buildbot] value for M2_HOME (maven.home) ?

Posted by Gavin McDonald <ga...@16degrees.com.au>.
Sebb et al,

Maven can be installed in different places on different slaves, so it is
good
to be specific.

Also, it is not always appropriate to set M2_HOME in the env of the machine
or buildbot
user on a  build machine as there be several Maven versions installed at one
time.

Feel free to set M2_HOME in the buildbot settings for your builds. For
example look where
ANT_HOME has been set in the env for your build in your jmeter.conf


(the location mentioned is correct - for this slave, others may vary)

Gav...


> -----Original Message-----
> From: sebb [mailto:sebbaz@gmail.com]
> Sent: Wednesday, 29 February 2012 6:38 AM
> To: builds@apache.org
> Subject: Re: [Buildbot] value for M2_HOME (maven.home) ?
> 
> On 28 February 2012 19:17, Konstantin Kolinko <kn...@gmail.com>
> wrote:
> > 2012/2/28 sebb <se...@gmail.com>:
> >> On 28 February 2012 13:17, sebb <se...@gmail.com> wrote:
> >>> JMeter needs to know the Maven home directory in order to upload
> snapshots.
> >>>
> >>> However the standard M2_HOME env. variable [1] does not seem to be
> set.
> >>>
> >>> Is Maven installed in a standard location?
> >>>
> >>> I suppose the build file could be updated to run "mvn -v" in a shell
> >>> and extract the home directory, but that seems rather crude, and
> >>> error-prone.
> >>
> >> [And Maven 2.2.1 does not display the home directory anyway]
> >>
> >>> [1] http://maven.apache.org/download.html#Installation
> >
> > Looking at some other build that already uses Maven:
> >
> > http://ci.apache.org/builders/rat_trunk/builds/200/steps/compile/logs/
> > stdio
> >
> >>  M2=/usr/local/apache-maven/current/bin
> >>  M2_HOME=/usr/local/apache-maven/current
> >
> > I do not know whether it helps.
> 
> Thanks, I'll try that and see.
> 
> > Are you able to start mvn, or you cannot just because M2_HOME is not
> set?
> 
> I am using Ant to run Maven using Java, and so need to know where the
> Maven jar is.
> 
> Long story, but cannot use Maven Ant Tool, and shell invocation is not
ideal.
> 
> > Best regards,
> > Konstantin Kolinko


Re: [Buildbot] value for M2_HOME (maven.home) ?

Posted by sebb <se...@gmail.com>.
On 28 February 2012 19:17, Konstantin Kolinko <kn...@gmail.com> wrote:
> 2012/2/28 sebb <se...@gmail.com>:
>> On 28 February 2012 13:17, sebb <se...@gmail.com> wrote:
>>> JMeter needs to know the Maven home directory in order to upload snapshots.
>>>
>>> However the standard M2_HOME env. variable [1] does not seem to be set.
>>>
>>> Is Maven installed in a standard location?
>>>
>>> I suppose the build file could be updated to run "mvn -v" in a shell
>>> and extract the home directory, but that seems rather crude, and
>>> error-prone.
>>
>> [And Maven 2.2.1 does not display the home directory anyway]
>>
>>> [1] http://maven.apache.org/download.html#Installation
>
> Looking at some other build that already uses Maven:
>
> http://ci.apache.org/builders/rat_trunk/builds/200/steps/compile/logs/stdio
>
>>  M2=/usr/local/apache-maven/current/bin
>>  M2_HOME=/usr/local/apache-maven/current
>
> I do not know whether it helps.

Thanks, I'll try that and see.

> Are you able to start mvn, or you cannot just because M2_HOME is not set?

I am using Ant to run Maven using Java, and so need to know where the
Maven jar is.

Long story, but cannot use Maven Ant Tool, and shell invocation is not ideal.

> Best regards,
> Konstantin Kolinko

Re: [Buildbot] value for M2_HOME (maven.home) ?

Posted by Konstantin Kolinko <kn...@gmail.com>.
2012/2/28 sebb <se...@gmail.com>:
> On 28 February 2012 13:17, sebb <se...@gmail.com> wrote:
>> JMeter needs to know the Maven home directory in order to upload snapshots.
>>
>> However the standard M2_HOME env. variable [1] does not seem to be set.
>>
>> Is Maven installed in a standard location?
>>
>> I suppose the build file could be updated to run "mvn -v" in a shell
>> and extract the home directory, but that seems rather crude, and
>> error-prone.
>
> [And Maven 2.2.1 does not display the home directory anyway]
>
>> [1] http://maven.apache.org/download.html#Installation

Looking at some other build that already uses Maven:

http://ci.apache.org/builders/rat_trunk/builds/200/steps/compile/logs/stdio

>  M2=/usr/local/apache-maven/current/bin
>  M2_HOME=/usr/local/apache-maven/current

I do not know whether it helps.

Are you able to start mvn, or you cannot just because M2_HOME is not set?

Best regards,
Konstantin Kolinko

Re: [Buildbot] value for M2_HOME (maven.home) ?

Posted by sebb <se...@gmail.com>.
On 28 February 2012 13:17, sebb <se...@gmail.com> wrote:
> JMeter needs to know the Maven home directory in order to upload snapshots.
>
> However the standard M2_HOME env. variable [1] does not seem to be set.
>
> Is Maven installed in a standard location?
>
> I suppose the build file could be updated to run "mvn -v" in a shell
> and extract the home directory, but that seems rather crude, and
> error-prone.

[And Maven 2.2.1 does not display the home directory anyway]

> [1] http://maven.apache.org/download.html#Installation