Hi there,
I am facing a build failure after using "mvn -PautoInstallSinglePackage clean install"
Here's my version details
Apache Maven 3.8.8 (4c87b05d9aedce574290d1acc98575ed5eb6cd39)
Maven home: C:\Program Files\Maven\apache-maven-3.8.8
Java version: 11.0.23, vendor: Oracle Corporation, runtime: C:\Program Files\Java\jdk-11
Default locale: en_GB, platform encoding: Cp1252
OS name: "windows 11", version: "10.0", arch: "amd64", family: "windows"
[ERROR] Failed to execute goal org.apache.sling:htl-maven-plugin:2.0.2-1.4.0:validate (validate-htl-scripts) on project aem-jupiteram-project.ui.apps: Execution validate-htl-scripts of goal org.apache.sling:htl-maven-plugin:2.0.2-1.4.0:validate failed: A required class was missing while executing org.apache.sling:htl-maven-plugin:2.0.2-1.4.0:validate: org/apache/sling/scripting/sightly/java/compiler/JavaImportsAnalyzer
[ERROR] -----------------------------------------------------
[ERROR] realm = plugin>org.apache.sling:htl-maven-plugin:2.0.2-1.4.0
[ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
Could you please give me any suggestions about fixing this issue?
I uninstall and reinstalled everything, but it did not help me to fix this issue
Thanks in advance.
Solved! Go to Solution.
Views
Replies
Total Likes
Hi @AKurtulush
it seems that the htl-maven-plugin is missing a required class org/apache/sling/scripting/sightly/java/compiler/JavaImportsAnalyzer. This could be due to a compatibility issue or a corrupted installation.
1.Clean the Maven repository: Sometimes, corrupted dependencies in the local Maven repository can cause build failures. You can try deleting the contents of the .m2/repository directory in your user home directory and then re-run the build command.
2.Check for conflicting dependencies: It's possible that there are conflicting dependencies in your project's pom.xml file. You can use the Maven Dependency Plugin to analyze the dependency tree and identify any conflicts.
try this command mvn dependency:tree.
3.Java version you are using is compatible with the Maven and the plugin. In your case, Java 11 seems to be installed, which should be compatible. However, you can double-check if there are any specific Java version requirements for the htl-maven-plugin.
Hi @AKurtulush
it seems that the htl-maven-plugin is missing a required class org/apache/sling/scripting/sightly/java/compiler/JavaImportsAnalyzer. This could be due to a compatibility issue or a corrupted installation.
1.Clean the Maven repository: Sometimes, corrupted dependencies in the local Maven repository can cause build failures. You can try deleting the contents of the .m2/repository directory in your user home directory and then re-run the build command.
2.Check for conflicting dependencies: It's possible that there are conflicting dependencies in your project's pom.xml file. You can use the Maven Dependency Plugin to analyze the dependency tree and identify any conflicts.
try this command mvn dependency:tree.
3.Java version you are using is compatible with the Maven and the plugin. In your case, Java 11 seems to be installed, which should be compatible. However, you can double-check if there are any specific Java version requirements for the htl-maven-plugin.
Hi Raja,
Thanks for your suggestions.
Deleted my .m2/repository and rebuild project again. That worked for me
It seems your HTL is importing a java class (may be a Sling Model) which is not available.
It should be resolved now. You can even try after building the entire Project once, if apps is built after core & the import is available, the complete build should go through.
Hi aanchal_sikka,
Thanks for your all suggestions.
Views
Likes
Replies
Views
Likes
Replies
Views
Likes
Replies