htl-maven-plugin dependency error | Community
Skip to main content
Level 2
February 21, 2022
Solved

htl-maven-plugin dependency error

  • February 21, 2022
  • 2 replies
  • 3929 views

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

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by milind_bachani

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

2 replies

Mani_kumar_
Community Advisor
Community Advisor
February 21, 2022

Could you please provide your pom.xml file and with which archetype you have created the project.

 

Also please verify this thread as well

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/unable-to-update-htl-maven-plugin-to-1-0-6-to-1-4-0/td-p/414184

Level 2
February 21, 2022

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>

 

 

milind_bachani
Adobe Employee
milind_bachaniAdobe EmployeeAccepted solution
Adobe Employee
February 21, 2022

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