Not able to apply environment variable for maven

363 views
Skip to first unread message

vivek sridhar

unread,
Jul 15, 2015, 12:34:41 AM7/15/15
to go...@googlegroups.com
Hi All,

I am getting following error when I execute maven commands from the GO agent.

it looks like its not setting up environment variable.

Error happened while attempting to execute 'mvn --version'. 
Please make sure [mvn] can be executed on this agent.

how to add variables into PATH ?

PATH gets overridden if I try to do it ?

Thanks,
 

vivek sridhar

unread,
Jul 15, 2015, 12:37:14 AM7/15/15
to go...@googlegroups.com
14:27:26.243 [go] setting environment variable 'M2_HOME' to value '/opt/apache-maven-3.3.3'
14:27:26.244 [go] setting environment variable 'M2' to value '/opt/apache-maven-3.3.3/bin'

Its setting environment variable and not able to set it in PATH. 

How to add above statement in PATH variable.
Go user is able to execute the command.

vivek sridhar

unread,
Jul 15, 2015, 8:21:26 AM7/15/15
to go...@googlegroups.com
Fixed it.

Zabil C M

unread,
Jul 15, 2015, 8:23:24 AM7/15/15
to go...@googlegroups.com
For reference, can you share the solution?

Fixed it.
--
You received this message because you are subscribed to the Google Groups "go-cd" group.
To unsubscribe from this group and stop receiving emails from it, send an email to go-cd+un...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

vivek sridhar

unread,
Jul 15, 2015, 8:32:21 AM7/15/15
to go...@googlegroups.com
I added maven path variables in /etc/default/go-agent file and restarted the agent. That's work around I believe. 

Sathish Gurram

unread,
Sep 14, 2015, 7:44:57 AM9/14/15
to go-cd
 
even i have faced same issue while running ant clean build like ant is not recognized as an internal command .thanks for sharing .
Reply all
Reply to author
Forward
0 new messages