File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2121
2222
2323def checkMavenVersion ():
24- mvn_txt = re .search (MAVEN_VERSION_REGEX , shutil .which ("mvn" )).group ()
25- mvn_version = mvn_txt .split ("." )
26- if len (mvn_version ) != 3 :
27- print ("\n ERROR: Cannot find maven with `which mvn`:" + mvn_txt )
24+ mvn_path = shutil .which ("mvn" )
25+ if mvn_path == None :
26+ print ("\n ERROR: Cannot find maven with `which mvn`" )
27+ exit (1 )
28+
29+ match = re .search (MAVEN_VERSION_REGEX , mvn_path )
30+ if match == None :
31+ print ("\n Cannot determine mvn version from its path location: " + mvn_path )
2832 exit (1 )
33+
34+ mvn_txt = match .group ()
35+ mvn_version = mvn_txt .split ("." )
36+
37+ print ("\n Detected mvn version based on its path location: " + mvn_txt )
38+
2939 above = MAVEN_VERSION_ABOVE .split ("." )
3040 for index , v in enumerate (mvn_version ):
3141 if int (above [index ]) > int (v ):
You can’t perform that action at this time.
0 commit comments