Hello! I have java files that import package like this
`import com.adobe.cq.social.scf.OperationException;`
But during maven build I get error `package com.adobe.cq.social.scf does not exist`
I'm using maven 3.8.7 and <aem.sdk.api>2023.4.11835.20230414T234523Z-230200</aem.sdk.api>
Could you advise which dependency should be added to pom.xml to avoid such errors and getting right cq.social package?
Solved! Go to Solution.
Views
Replies
Total Likes
Hello @DmitryOs1
For any missing dependency, you can check the version that your AEM uses via
http://localhost:4502/system/console/depfinder
Just add full-qualified package/classname in the textbox and click Enter. You would see a maven dependency with version under "Maven Dependencies" column.
Hello @DmitryOs1 -
To resolve the error `package com.adobe.cq.social.scf does not exist`, you need to include the appropriate Maven dependency in your `pom.xml` file. In this case, the `cq-socialcommunities-api` dependency provides the required `com.adobe.cq.social.scf` package.
To add the dependency to your `pom.xml`, you can include the following XML snippet within the `<dependencies>` section:
<dependency>
<groupId>com.adobe.cq</groupId>
<artifactId>cq-socialcommunities-api</artifactId>
<version>[version]</version>
<scope>provided</scope>
</dependency>
Replace [version] with the specific version you are using.
Thanks! I have already this dependency in pom
<dependency>
<groupId>com.adobe.cq.social</groupId>
<artifactId>cq-socialcommunities-api</artifactId>
<version>1.7.197</version>
<scope>provided</scope>
</dependency>
but get such errors : `package com.adobe.cq.social.srp.utilities.api does not exist` `package com.adobe.cq.social.scf does not exist`
May be I need another version? Could you advise which one?
Try adding below dependency once?
<dependency>
<groupId>com.adobe.cq</groupId>
<artifactId>cq-social-srp-utilities-api</artifactId>
<version>[version]</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.adobe.cq.social</groupId>
<artifactId>cq-social-srp-utilities</artifactId>
<version>[version]</version>
<scope>provided</scope>
</dependency>
Could tell how to understand which version should I paste to [version]? I have `1.7.197` now, looks like it needs to be higher
Are you seeing this issue in your IDE? Did you try to run mvn clean command?, Sometimes the IDE require to "clean" the project to rebuild the PATH and dependencies appended to it
Yes, I run 'mvn clean install' in IDE
Hello @DmitryOs1
For any missing dependency, you can check the version that your AEM uses via
http://localhost:4502/system/console/depfinder
Just add full-qualified package/classname in the textbox and click Enter. You would see a maven dependency with version under "Maven Dependencies" column.
@DmitryOs1 Can the depdency file in below location with the releasted versions
https://mvnrepository.com/artifact/com.adobe.cq.social/cq-socialcommunities-api/1.7.197
1.7.197 is the version of Communities that shipped in AEM 6.1. It looks like there's a bug in the pom for 1.7.197.
It is strongly recommended that you install the latest feature pack for social communities.
See http://docs.adobe.com/docs/en/aem/6-1/deploy/communities.html
If you install FP3, then the version would change to 1.8.305.
If you wanted to stay on 1.7 (not recommended), then you'd at least want to apply the fix pack which would give you version 1.7.199.
Thank you! Could you tell which version of social communities is used with 6.5 AEM I think I have latest aem (<aem.sdk.api>2023.4.11835.20230414T234523Z-230200</aem.sdk.api>)
Looks like 1.8.305 is for older version