-1

I have configured Maven in an environment variable and checked it in the command prompt and it works. Then I setup and configured Ant in environment variables and checked it in the command prompt and it works but Maven is not working. The problem I found out is the Path variable name. I only can set either one of them. How should I configure my environment to make sure both Maven and Ant are working at the same time?

Variable name: Path

Variable value: C:\Program Files\Apache Software Foundation\apache-maven-3.3.9\bin C:\Program Files\Apache Software Foundation\apache-ant-1.9.6\bin

entpnerd
  • 10,049
  • 8
  • 47
  • 68
Sree Hari
  • 24
  • 8

1 Answers1

0

I believe what's happening here is that you aren't using:

  1. a path separator in your PATH environment variable (for Windows it's a semi-colon).
  2. quotation marks when your paths have spaces.

Bad:

Path Variable value: C:\Program Files\Apache Software Foundation\apache-maven-3.3.9\bin C:\Program Files\Apache Software Foundation\apache-ant-1.9.6\bin

Good:

PATH="C:\Program Files\Apache Software Foundation\apache-maven-3.3.9\bin";"C:\Program Files\Apache Software Foundation\apache-ant-1.9.6\bin"

Hope that helps.

Community
  • 1
  • 1
entpnerd
  • 10,049
  • 8
  • 47
  • 68