Hi Team,
I have included the below dependency to my core/pom.xml, ui.apps/pom.xml, all/pom.xml in the dependency section.
<!-- Core WCM Components -->
<dependency>
<groupId>com.adobe.cq</groupId>
<artifactId>core.wcm.components.parent</artifactId>
<version>2.21.0</version>
<type>pom</type>
</dependency>
After maven build it gave the below.
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:compile (default-compile) on project we-retail.ui.apps: Compilation failure
[ERROR] /C:/Users/Seema/Documents/Code-Base/we-retail/ui.apps/target/generated-sources/htl/org/apache/sling/scripting/sightly/apps/infra__002d__core/components/title/title_html.java:[40,82] package com.adobe.cq.wcm.core.components.models does not exist.
Can someone help me to resolve this error.
Solved! Go to Solution.
Views
Replies
Total Likes
Hi @skumari1,
It seems you missed core.wcm.components.all, Please try below steps
1) Edit pom.xml and add the following dependencies in the <dependencies> section:
<dependencies> ... <dependency> <groupId>com.adobe.cq</groupId> <artifactId>core.wcm.components.core</artifactId> <version>2.21.0</version> <scope>provided</scope> </dependency> <dependency> <groupId>com.adobe.cq</groupId> <artifactId>core.wcm.components.all</artifactId> <type>zip</type> <version>2.21.0</version> <scope>provided</scope> </dependency> ... </dependencies>
2) Edit core/pom.xml. Add the core.wcm.components.core dependency to the dependency list. Notice that it is not necessary to specify a version, as the version is managed at the Parent pom. It is a best practice to always manage dependency versions within the Parent pom.
//core/pom.xml <dependencies> ... <dependency> <groupId>com.adobe.cq</groupId> <artifactId>core.wcm.components.core</artifactId> </dependency> ... </dependencies>
3) Edit ui.apps/pom.xml. Add the core.wcm.components.all zip as a dependency in the dependency list.
//ui.apps/pom.xml <dependencies> ... <dependency> <groupId>com.adobe.cq</groupId> <artifactId>core.wcm.components.all</artifactId> <type>zip</type> </dependency> ... </dependencies>
4) Edit ui.apps/pom.xml. Include core.wcm.components.all zip as a sub-package. This will deploy the Core Components package along with your custom code each time. Beneath the embedded tag add a new tag for subPackages and specify the core.wcm.components.all artifactId.
//ui.apps/pom.xml <plugins> ... <plugin> <groupId>com.day.jcr.vault</groupId> <artifactId>content-package-maven-plugin</artifactId> <extensions>true</extensions> <configuration> <group>aem-guides/wknd</group> <filterSource>src/main/content/META-INF/vault/filter.xml</filterSource> <properties> <acHandling>merge_preserve</acHandling> </properties> <embeddeds> <embedded> <groupId>com.adobe.aem.guides</groupId> <artifactId>wknd-sites-guide.core</artifactId> <target>/apps/wknd/install</target> </embedded> </embeddeds> <subPackages> <subPackage> <groupId>com.adobe.cq</groupId> <artifactId>core.wcm.components.all</artifactId> <filter>true</filter> </subPackage> </subPackages> <targetURL>http://${crx.host}:${crx.port}/crx/packmgr/service.jsp</targetURL> </configuration> </plugin> ... </plugins>
5) To verify that it works, go to the Package Manager. You should see listed three new items:
Hope that helps!
Regards,
Santosh
Hi @skumari1 , checking - have you included or tried below dependency in your core pom?
<dependency>
<groupId>com.adobe.cq</groupId>
<artifactId>core.wcm.components.core</artifactId>
<version>2.21.0</version>
</dependency>
In my case aem sdk I have not used 'core.wcm.components.parent'
tried with this too. but no luck!
<div class="cmp-title" selenium-id="we-retail-title" data-sly-use.title="com.adobe.cq.wcm.core.components.models.Title" data-sly-use.template="core/wcm/components/commons/v1/templates.html" data-sly-test.text="${title.text}">
Views
Replies
Total Likes
Views
Replies
Total Likes
Hi @skumari1,
It seems you missed core.wcm.components.all, Please try below steps
1) Edit pom.xml and add the following dependencies in the <dependencies> section:
<dependencies> ... <dependency> <groupId>com.adobe.cq</groupId> <artifactId>core.wcm.components.core</artifactId> <version>2.21.0</version> <scope>provided</scope> </dependency> <dependency> <groupId>com.adobe.cq</groupId> <artifactId>core.wcm.components.all</artifactId> <type>zip</type> <version>2.21.0</version> <scope>provided</scope> </dependency> ... </dependencies>
2) Edit core/pom.xml. Add the core.wcm.components.core dependency to the dependency list. Notice that it is not necessary to specify a version, as the version is managed at the Parent pom. It is a best practice to always manage dependency versions within the Parent pom.
//core/pom.xml <dependencies> ... <dependency> <groupId>com.adobe.cq</groupId> <artifactId>core.wcm.components.core</artifactId> </dependency> ... </dependencies>
3) Edit ui.apps/pom.xml. Add the core.wcm.components.all zip as a dependency in the dependency list.
//ui.apps/pom.xml <dependencies> ... <dependency> <groupId>com.adobe.cq</groupId> <artifactId>core.wcm.components.all</artifactId> <type>zip</type> </dependency> ... </dependencies>
4) Edit ui.apps/pom.xml. Include core.wcm.components.all zip as a sub-package. This will deploy the Core Components package along with your custom code each time. Beneath the embedded tag add a new tag for subPackages and specify the core.wcm.components.all artifactId.
//ui.apps/pom.xml <plugins> ... <plugin> <groupId>com.day.jcr.vault</groupId> <artifactId>content-package-maven-plugin</artifactId> <extensions>true</extensions> <configuration> <group>aem-guides/wknd</group> <filterSource>src/main/content/META-INF/vault/filter.xml</filterSource> <properties> <acHandling>merge_preserve</acHandling> </properties> <embeddeds> <embedded> <groupId>com.adobe.aem.guides</groupId> <artifactId>wknd-sites-guide.core</artifactId> <target>/apps/wknd/install</target> </embedded> </embeddeds> <subPackages> <subPackage> <groupId>com.adobe.cq</groupId> <artifactId>core.wcm.components.all</artifactId> <filter>true</filter> </subPackage> </subPackages> <targetURL>http://${crx.host}:${crx.port}/crx/packmgr/service.jsp</targetURL> </configuration> </plugin> ... </plugins>
5) To verify that it works, go to the Package Manager. You should see listed three new items:
Hope that helps!
Regards,
Santosh
Hi @SantoshSai
Thanks for the detail solution, will try and paste the result here.
Hi @SantoshSai
I have modified my pom files same as you have mentioned but still i am getting the same error which saying below:-
ui.apps/target/generated-sources/htl/org/apache/sling/scripting/sightly/apps/infra__002d__core/components/title/title_html.java:[40,82] package com.adobe.cq.wcm.core.components.models does not exist
Views
Replies
Total Likes
Hi,
I got the same error like above -
I followed below steps to resolve the issue :
1. Started command prompt terminal with administrator rights and ran the same maven command. It worked as expected and build is success
2. To start command prompt with admin rights, right click on cmd and click on run as administrator
Hope this helps ! Thanks
Views
Replies
Total Likes
Views
Likes
Replies