No compiler is provided in the Environment? Perhaps you are running on a JRE rather than a JDK?
Sometimes when you are running Maven from command line or from Maven in AzureDevOps you may get an error like say
No compiler is provided in the Environment? Perhaps you are running on a JRE rather than a JDK?
Though Java is installed on the System and you have set the Paths you will continue to get this as newer version of Java change the order of environment variables on Windows
So verify whether Path variables and see whether you have something like
C:\Program Files (x86)\Common Files\Oracle\Java\javapath
If the answer is yes, then change the Path variable and set to something like ”
C:\Program Files\Java\jdk1.8.0_162\bin “