@@ -38,15 +38,22 @@ def __str__(self):
3838 def parseLine (self ,line ):
3939 line = line .replace ('\' ' ,'\" ' )
4040 #Replace compile by implementation
41- #this is not that simple
42- if ('ompile' in line .split (" " )[0 ] ):
41+ #this is not that simple because grouid or artifactid can contains "compile" set of letters
42+ # print("line.split() "+str(line.split(" ")))
43+ firstNotNullIndex = 0
44+ splittedLine = line .split (" " )
45+ while splittedLine [firstNotNullIndex ] == None or len (splittedLine [firstNotNullIndex ])== 0 :
46+ firstNotNullIndex = firstNotNullIndex + 1
47+ if ('ompile' in splittedLine [firstNotNullIndex ] ):
4348 #replace
44- templine = line .split (" " )[0 ].replace ('compile' ,'implementation' )
45- templine = line .split (" " )[0 ].replace ('Compile' ,'Implementation' )
46- for subline in line .split (" " )[1 :]:
49+ templine = splittedLine [firstNotNullIndex ].replace ('compile' ,'implementation' )
50+ templine = templine .replace ('Compile' ,'Implementation' )
51+ # print("templine = "+templine)
52+ line = templine + " "
53+ for subline in splittedLine [firstNotNullIndex + 1 :]:
54+ # print("Adding subline "+subline)
4755 line = line + subline + " "
48- line = templine + line
49-
56+ print (BLUE + "\t " + line .replace ("\n " ,"" ))
5057 #then you can parse your line
5158 if len (line .split (':' )) != 3 :
5259 #print('\n')
@@ -126,3 +133,4 @@ def analyseError(self,line):
126133 self .rawValue = line .replace ("\n " ,"" )
127134 # print('analayse error: '+line.replace('\n',''))
128135 pass
136+
0 commit comments