Le 5 mai 2014 23:08, "Mauro Flores" <[email protected]> a écrit :
>>
>> Then you do mean the user who initiated the job; note that this does not
necessarily mean a user who was logged in, as jobs can be started by
'anonymous' (from an SCM trigger for example), or via the API.
>
>
> I'm aware of it.
>
>> The Build object itself should have a record of the user who initiated it
>
>
> I've been searching and testing the content of the MavenProject api
(including getBuild) with no success. No property from Build seems to have
this information.
>
http://maven.apache.org/ref/3.2.1/maven-model/apidocs/org/apache/maven/model/Build.html

As I said in answer to your other thread "getCiManagement()" you're using
the wrong APIs here. What you need to do is writing a *Jenkins* plugin.
What you currently seem to be trying to do is writing a *maven* plugin.

Jenkins and Maven are two absolutely unrelated projects (though often used
together in the CI world).

HTH

>
>
> Em segunda-feira, 5 de maio de 2014 16h38min30s UTC-3, Kevin Fleming
escreveu:
>>
>> Then you do mean the user who initiated the job; note that this does not
necessarily mean a user who was logged in, as jobs can be started by
'anonymous' (from an SCM trigger for example), or via the API.
>>
>> The Build object itself should have a record of the user who initiated
it, there's no need to talk to the Jenkins/Hudson objects to see who is
logged in, and in fact that would not work in a build step anyway because
they don't run in the same environment.
>>
>> ----- Original Message -----
>> From: [email protected]
>> To: [email protected]
>> Cc: Kevin Fleming (BLOOMBERG/ 731 LEXIN)
>> At: May 5 2014 15:27:54
>>>
>>> I mean the user that is logged on jenkins and started a jenkins job
that in the build step refers a pom.xml that declares this plugin.
>>>
>>>
>>>
>>> Em segunda-feira, 5 de maio de 2014 14h21min39s UTC-3, Kevin Fleming
escreveu:
>>>>
>>>> What do you mean by 'running'? Does this plugin provide a build step,
a publisher, or something else? If it provides something that is used
during a build, then you want the user who initiated the build.
>>>>
>>>> ----- Original Message -----
>>>> From: [email protected]
>>>> To: [email protected]
>>>> Cc: [email protected]
>>>> At: May 5 2014 12:49:10
>>>>>
>>>>> I'd like to log who is running this maven plugin.
>>>>> I thought I could access the jenkins user from a simple maven plugin
running on jenkins.. I'm afraid I'll have to build (or extend) a jenkins
plugin to achieve that.
>>>>>
>>>>> Regards. Mauro.
>>>>>
>>>>> Em sábado, 3 de maio de 2014 12h04min32s UTC-3, Baptiste Mathus
escreveu:
>>>>>>
>>>>>> Well, no indeed. Maven is an independent project and generally runs
out of Jenkins.
>>>>>>
>>>>>> Maybe you should explain a bit more what you are trying to achieve.
>>>>>>
>>>>>> Cheers
>>>>>>
>>>>>> Le 1 mai 2014 00:50, "Mauro Flores" <[email protected]> a écrit :
>>>>>>>
>>>>>>> Maybe I haven't expressed myself correctly.
>>>>>>>
>>>>>>>
>>>>>>> I get a ClassNotFound exception for hudson.model.User.
>>>>>>>
>>>>>>> Does a maven plugin (not a jenkins plugin) has access to jenkins
classpath ?
>>>>>>>
>>>>>>> Regards. Mauro Flores.
>>>>>>>
>>>>>>> Em terça-feira, 29 de abril de 2014 18h29min31s UTC-3, Mauro Flores
escreveu:
>>>>>>>>
>>>>>>>> Thanks. Michael.
>>>>>>>>
>>>>>>>> A complementary question.
>>>>>>>>
>>>>>>>> Do I have to add the jar of this class "hudson.model.User" to my
maven plugin jar? Or the classpath of jenkins is visible to the execution
of my maven plugin?
>>>>>>>> If I have to add, can you help how to define the dependency.
>>>>>>>> If I do like below I lot of jars are brought.
>>>>>>>>
>>>>>>>> <dependency>
>>>>>>>>     <groupId>org.jenkins-ci.main</groupId>
>>>>>>>>     <artifactId>jenkins-core</artifactId>
>>>>>>>>     <version>1.543</version>
>>>>>>>> </dependency>
>>>>>>>>
>>>>>>>>
>>>>>>>> Em sábado, 26 de abril de 2014 11h59min44s UTC-3, Michael Clarke
escreveu:
>>>>>>>>>
>>>>>>>>> Use User.current()
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> On 25 April 2014 23:17, Mauro Flores <[email protected]>
wrote:
>>>>>>>>>>
>>>>>>>>>> Hello,
>>>>>>>>>>
>>>>>>>>>> I'm building a maven plugin.
>>>>>>>>>> I'd like to access the name of the user logged on jenkins inside
the maven plugin.
>>>>>>>>>>
>>>>>>>>>> Regards. Mauro.
>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> You received this message because you are subscribed to the
Google Groups "Jenkins Users" group.
>>>>>>>>>> To unsubscribe from this group and stop receiving emails from
it, send an email to [email protected].
>>>>>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>>>>
>>>>>>>>>
>>>>>>> --
>>>>>>> You received this message because you are subscribed to the Google
Groups "Jenkins Users" group.
>>>>>>> To unsubscribe from this group and stop receiving emails from it,
send an email to [email protected].
>>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>
>>>>> --
>>>>> You received this message because you are subscribed to the Google
Groups "Jenkins Users" group.
>>>>> To unsubscribe from this group and stop receiving emails from it,
send an email to [email protected].
>>>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>> --
>>> You received this message because you are subscribed to the Google
Groups "Jenkins Users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
an email to [email protected].
>>> For more options, visit https://groups.google.com/d/optout.
>
> --
> You received this message because you are subscribed to the Google Groups
"Jenkins Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
email to [email protected].
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to