File tree Expand file tree Collapse file tree
src/test/java/org/htmlunit Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -86,8 +86,27 @@ public void pom() throws Exception {
8686 final List <String > lines = FileUtils .readLines (new File ("pom.xml" ), ISO_8859_1 );
8787
8888 final List <String > wrongVersions = new LinkedList <>();
89+ boolean inComment = false ;
8990 for (int i = 0 ; i < lines .size (); i ++) {
90- final String line = lines .get (i );
91+ String line = lines .get (i );
92+
93+ String cleaned = "" ;
94+ if (!inComment ) {
95+ final int startIdx = line .indexOf ("<!--" );
96+ if (startIdx != -1 ) {
97+ cleaned += line .substring (0 , startIdx );
98+ inComment = true ;
99+ }
100+ }
101+ if (inComment ) {
102+ final int endIdx = line .indexOf ("-->" );
103+ if (endIdx != -1 ) {
104+ cleaned += line .substring (endIdx + 3 , line .length ());
105+ inComment = false ;
106+ }
107+ line = cleaned ;
108+ }
109+
91110 if (line .trim ().equals ("<properties>" )) {
92111 processProperties (lines , i + 1 , properties );
93112 }
You can’t perform that action at this time.
0 commit comments