This might be an ignorant question but why are you using the "Publish over
SSH" plugin instead of the "SSH plugin"?
https://wiki.jenkins-ci.org/display/JENKINS/SSH+plugin

On Tue, Apr 28, 2015 at 3:16 PM, Erick Macedo <[email protected]>
wrote:

> Hi,
>
> The user I am connecting is the correct user, not root.
>
> Are you referring to .bashrc the right remote machine?
>
> Is remote machine is a Ubuntu and the .bashrc is so.
>
> # JAVA
> export JAVA_HOME = / usr / lib / jvm / java-8-oracle
>
> # MAVEN
> export MAVEN_HOME = / usr / local / apache-maven-3.2.5
> export M2_HOME = / usr / local / apache-maven-3.2.5
> export M2 = $ M2_HOME / bin
> export PATH = $ M2: $ PATH
>
> A very strange thing is that when I run the echo $ PATH in the "Exec
> command" it prints the variables of the local machine.
>
> Em terça-feira, 28 de abril de 2015 16:25:21 UTC-3, Erick Macedo escreveu:
>>
>> Hi,
>>
>> I'm using the plugin Publish over SSH to run a remote command maven on a
>> linux machine with properly configured maven.
>>
>> However when running mvn command is generated an error "bash: mvn:
>> command not found".
>>
>> The plugin is properly connecting the remote machine, as for testing in
>> the "Exec command" I include the command "ifconfig" and the same printed
>> data from the remote machine.
>>
>> However, when performing the command echo $ M2_HOME or echo $ PATH in the
>> "Exec command" he printed the local machine where the information jenkins
>> is the created, not the remote machine.
>>
>> Something very strange.
>>
>> Someone could help me?
>>
>  --
> 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].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/d92784d9-0141-4ef1-a240-8570c627e302%40googlegroups.com
> <https://groups.google.com/d/msgid/jenkinsci-users/d92784d9-0141-4ef1-a240-8570c627e302%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Jeff Vincent
See my LinkedIn profile at:
http://www.linkedin.com/in/rjeffreyvincent

-- 
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].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAPJK9%3DJwstGntydh%2B9NgR7fGOrty_0-EB5CXF_jwaLn%2Bk5Ucuw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to