Common issues I have to fix for people include;

Checking it's on the PATH, so for your example above it would be set
PATH=%PATH%;$MAVEN_BIN%

Checking it's executable

Most of my projects have moved to Maven Wrapper, and developers forgot to
check the exec bit is store in git, i.e. git update-index --chmod +x mvnw.
Using maven wrapper allows projects and branches to controller the maven
version used, so less setup/upgrade of developer machines or cicd hosts,
checking new maven version as part of cicd pipeline.

John


On Fri, 15 Sept 2023 at 11:26, sajith m p <[email protected]> wrote:

> Hello,
>
> I am using a basic maven command mvn -v in  a job unded execute batch
> command. I am getting an error while build "'mvn' is not recognized as an
> internal or external command,
> operable program or batch file."Please help me to resolve this error.
>
> I have completed maven installations in manage jenkins with name as MAVEN_HOME
> and path as C:\Users\sajit\Maven\apache-maven-3.9.4.
>
> Also, please find the environment variables:
> M2_HOME : C:\Users\sajit\Maven\apache-maven-3.9.4
> MAVEN_BIN: MAVEN_BIN : %M2_HOME%\bin
> MAVEN_HOME : %M2_HOME%
>
> Kindly help.
>
> Thanks,
> Sajith M P
>
> --
> 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/653af6b1-55d9-479a-87c8-6dd6be58c849n%40googlegroups.com
> <https://groups.google.com/d/msgid/jenkinsci-users/653af6b1-55d9-479a-87c8-6dd6be58c849n%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>

-- 
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/CAH9u10keju%3Dp6X1mrxioviwzVxDh%3D_v68w8hFhtYFY%2BEbhOaQA%40mail.gmail.com.

Reply via email to