Hi @mounikasri ,
I am using mvn project with archetype version 35.
My main POM has :
<!-- HTL Maven Plugin -->
<plugin>
<groupId>org.apache.sling</groupId>
<artifactId>htl-maven-plugin</artifactId>
<version>1.3.4-1.4.0</version>
<configuration>
<failOnWarnings>true</failOnWarnings>
</configuration>
</plugin>And in my ui.apps/pom.xml, I added(what you have shared in comment):
<plugin>
<groupId>org.apache.sling</groupId>
<artifactId>htl-maven-plugin</artifactId>
<executions>
<execution>
<id>validate-htl-scripts</id>
<goals>
<goal>validate</goal>
</goals>
<phase>generate-sources</phase>
<configuration>
<generateJavaClasses>true</generateJavaClasses>
<generatedJavaClassesPrefix>org.apache.sling.scripting.sightly</generatedJavaClassesPrefix>
<allowedExpressionOptions>
<allowedExpressionOption>cssClassName</allowedExpressionOption>
<allowedExpressionOption>decoration</allowedExpressionOption>
<allowedExpressionOption>decorationTagName</allowedExpressionOption>
<allowedExpressionOption>wcmmode</allowedExpressionOption>
</allowedExpressionOptions>
</configuration>
</execution>
</executions>
</plugin>And I triggered:
mvn htl:validate
and it works totally fine with me.

Please refer the documentation:
https://sling.apache.org/components/htl-maven-plugin/usage.html
Regards,
Milind