Execution transpile-scripts of goal org.apache.sling:htl-maven-plugin:1.3.4-1.4.0:validate failed: Plugin org.apache.sling:htl-maven-plugin:1.3.4-1.4.0 or one of its dependencies could not be resolved: Failed to collect dependencies at org.apache.sling:htl-maven-plugin:jar:1.3.4-1.4.0 -> org.apache.sling:org.apache.sling.scripting.sightly.compiler.java:jar:1.1.4-1.4.0 (org.apache.sling:htl-maven-plugin:1.3.4-1.4.0:validate:transpile-scripts:generate-sources)
While running code repo in eclipse getting this .
Please help me with the solution
Solved! Go to Solution.
Views
Replies
Total Likes
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
Could you please provide your pom.xml file and with which archetype you have created the project.
Also please verify this thread as well
Hi @Mani_kumar_
Created the project with archetype-3.2.1.jar
and with both transpile-scripts and alidate-htl-scripts same error getting
under ui.apps/pom.xml
<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>
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