kalyanc42390873
kalyanc42390873
31-01-2016
~Hi All,
I am trying to build our migration project through Maven. I added dependencies required.
When i tried to build and install i got an error saying
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal on project usgboral-bundle: Could not resolve dependencies for project melbourne-it:usgboral-bundle:bundle:3.0-USG-BORAL-SNAPSHOT: Failed to collect dependencies at com.adobe.cq.social:cq-s
ocial-ugcbase:jar:1.1.34: Failed to read artifact descriptor for com.adobe.cq.social:cq-social-ugcbase:jar:1.1.34: Could not find artifact com.adobe.cq.social:socialcommunities-parent:pom:1.1.34 in adobe (http://repo.ado
be.com/nexus/content/groups/public/) -> [Help 1]
[ERROR]
I thought of downloading the jars manually.But the required com.adobe.cq.social:socialcommunities-parent:pom:1.1.34 version does not exist. Attaching the screenshot of the same.
The social-ugcbase-1.1.34 jar is dependent on social-communities-api-1.3.4 jar.
Please help me on this!!
Thanks,
Jitendra_S_Toma
Jitendra_S_Toma
31-01-2016
You might have to try with other social-communities-
And, you could also verify whether your maven repository has these jars or not.
Jitendra
kalyanc42390873
kalyanc42390873
31-01-2016
but in the repository we have only two versions of social ugcbase (cq-social-ugcbase-1.1.34:jar/cq-social-ugcbase-1.1.38:jar) jars and it is depending only on social-communities-api-1.3.4 jar.Could you please help me on this
kunal23
MVP
kunal23
MVP
31-01-2016
Since you are building your project for AEM 6.1 instance you should add AEM Uber Jar dependency in your pom file and remove all individual AEM API dependencies[2].
Remove cq-social-ugcbase:jar dependency and add the following -
<
dependency
>
<
groupId
>com.adobe.aem</
groupId
>
<
artifactId
>uber-jar</
artifactId
>
<
version
>6.1.0</
version
>
<
scope
>provided</
scope
>
<
classifier
>obfuscated-apis</
classifier
>
</
dependency
>
[1] https://docs.adobe.com/docs/en/aem/6-1/develop/communities/code-guide/maven.html
[2] https://docs.adobe.com/docs/en/aem/6-1/develop/dev-tools/ht-projects-maven.html
kalyanc42390873
kalyanc42390873
31-01-2016
But I need to use SocialUtils and SocialResourceUtils classes and it is available social-ugcbase. Is there anyother way for that?
kunal23
MVP
kunal23
MVP
31-01-2016
Both these classes are available in AEM uber jar. With 6.1, Adobe added Uber Jar which now has all the AEM APIs so you just need to add one dependency in your POM rather than adding individual API dependency.
kalyanc42390873
kalyanc42390873
31-01-2016
In 5.6.1 in our code we are using CollabUtil and it is deprecated in 6.0 and instead of CollabUtil API we are using the SocialUtils and SocialResourceUtils for this we included the social-ucgbase dependency in pom.
If we add uber.jar then it is not required to include the social-ugcbase dependency and will it resolve and can use SocialUtils and SocialResourceUtils with that uber dependency?
kunal23
MVP
kunal23
MVP
31-01-2016
If you are building the project for 6.1 version then yes you need to remove social-ugcbase dependency and add Uber Jar to the POM file. And you should make sure that you are not including any other dependencies in your POM just like social-ugcbase as for for them as well you should be using Uber jar.
kalyanc42390873
kalyanc42390873
31-01-2016
but when iam trying to build after removing all the dependencies related to social communities and social-ugcbase .jars then it is failing due to below errors
[INFO] -------------------------------------------------------------
[ERROR] /D:/USGB/USGBDevelopment/development/usgboral/bundle/src/main/java/com/melbourneit/usgboral/cq/services/UserProfileService.java:[25,37] package org.apache.commons.fileupload does not exist
[ERROR] /D:/USGB/USGBDevelopment/development/usgboral/bundle/src/main/java/com/melbourneit/usgboral/cq/services/UserProfileService.java:[936,188] cannot find symbol
symbol: class FileUploadException
location: class com.melbourneit.usgboral.cq.services.UserProfileService
[ERROR] /D:/USGB/USGBDevelopment/development/usgboral/bundle/src/main/java/com/melbourneit/usgboral/cq/servlets/WTBImportServlet.java:[3,45] package org.apache.commons.fileupload.servlet does not exist
[ERROR] /D:/USGB/USGBDevelopment/development/usgboral/bundle/src/main/java/com/melbourneit/usgboral/cq/servlets/WTBXmlImportServlet.java:[3,45] package org.apache.commons.fileupload.servlet does not exist
[ERROR] /D:/USGB/USGBDevelopment/development/usgboral/bundle/src/main/java/com/melbourneit/usgboral/cq/servlets/AvatarUploadServlet.java:[7,37] package org.apache.commons.fileupload does not exist
[ERROR] /D:/USGB/USGBDevelopment/development/usgboral/bundle/src/main/java/com/melbourneit/usgboral/cq/servlets/AvatarUploadServlet.java:[8,45] package org.apache.commons.fileupload.servlet does not exist
[ERROR] /D:/USGB/USGBDevelopment/development/usgboral/bundle/src/main/java/com/melbourneit/usgboral/cq/services/SearchService.java:[846,48] cannot find symbol
symbol: method getTopicCount()
location: variable forum of type com.adobe.cq.social.forum.api.Forum
[ERROR] /D:/USGB/USGBDevelopment/development/usgboral/bundle/src/main/java/com/melbourneit/usgboral/cq/services/SearchService.java:[848,69] cannot find symbol
symbol: method getTopicCount()
location: variable forum of type com.adobe.cq.social.forum.api.Forum
[ERROR] /D:/USGB/USGBDevelopment/development/usgboral/bundle/src/main/java/com/melbourneit/usgboral/cq/services/SearchService.java:[854,63] cannot find symbol
symbol: method isApproved()
location: variable latestTopic of type com.adobe.cq.social.forum.api.Post
[ERROR] /D:/USGB/USGBDevelopment/development/usgboral/bundle/src/main/java/com/melbourneit/usgboral/cq/services/SearchService.java:[862,69] cannot find symbol
symbol: method getSubject()
location: variable latestTopic of type com.adobe.cq.social.forum.api.Post
[ERROR] /D:/USGB/USGBDevelopment/development/usgboral/bundle/src/main/java/com/melbourneit/usgboral/cq/services/SearchService.java:[863,70] cannot find symbol
symbol: method getCreatedBy()
location: variable latestTopic of type com.adobe.cq.social.forum.api.Post
[ERROR] /D:/USGB/USGBDevelopment/development/usgboral/bundle/src/main/java/com/melbourneit/usgboral/cq/services/SearchService.java:[864,71] cannot find symbol
symbol: method getRepliesCount()
location: variable latestTopic of type com.adobe.cq.social.forum.api.Post
[ERROR] /D:/USGB/USGBDevelopment/development/usgboral/bundle/src/main/java/com/melbourneit/usgboral/cq/services/SearchService.java:[865,68] cannot find symbol
symbol: method getUrl()
location: variable latestTopic of type com.adobe.cq.social.forum.api.Post
[ERROR] /D:/USGB/USGBDevelopment/development/usgboral/bundle/src/main/java/com/melbourneit/usgboral/cq/services/SearchService.java:[866,123] cannot find symbol
symbol: method getCreatedBy()
location: variable latestTopic of type com.adobe.cq.social.forum.api.Post
[ERROR] /D:/USGB/USGBDevelopment/development/usgboral/bundle/src/main/java/com/melbourneit/usgboral/cq/services/SearchService.java:[867,68] no suitable method found for getAvatar(com.adobe.granite.security.user.UserPrope
rties)
method com.adobe.cq.social.commons.CollabUtil.getAvatar(com.adobe.granite.security.user.UserProperties,java.lang.String,java.lang.String) is not applicable
(actual and formal argument lists differ in length)
method com.adobe.cq.social.commons.CollabUtil.getAvatar(com.adobe.granite.security.user.UserProperties,java.lang.String,java.lang.String,com.adobe.cq.social.commons.CollabUtil.AVATAR_SIZE) is not applicable
(actual and formal argument lists differ in length)
[ERROR] /D:/USGB/USGBDevelopment/development/usgboral/bundle/src/main/java/com/melbourneit/usgboral/cq/services/SearchService.java:[868,68] cannot find symbol
symbol: method getCreated()
location: variable latestTopic of type com.adobe.cq.social.forum.api.Post
[ERROR] /D:/USGB/USGBDevelopment/development/usgboral/bundle/src/main/java/com/melbourneit/usgboral/cq/services/SearchService.java:[958,54] cannot find symbol
symbol: method isApproved()
location: variable topic of type com.adobe.cq.social.forum.api.Post
[ERROR] /D:/USGB/USGBDevelopment/development/usgboral/bundle/src/main/java/com/melbourneit/usgboral/cq/services/SearchService.java:[959,56] cannot find symbol
symbol: method getCreatedBy()
location: variable topic of type com.adobe.cq.social.forum.api.Post
[ERROR] /D:/USGB/USGBDevelopment/development/usgboral/bundle/src/main/java/com/melbourneit/usgboral/cq/services/SearchService.java:[960,57] cannot find symbol
symbol: method getCreated()
location: variable topic of type com.adobe.cq.social.forum.api.Post
[ERROR] /D:/USGB/USGBDevelopment/development/usgboral/bundle/src/main/java/com/melbourneit/usgboral/cq/services/SearchService.java:[969,53] cannot find symbol
symbol: method getMessage()
location: variable topic of type com.adobe.cq.social.forum.api.Post
[ERROR] /D:/USGB/USGBDevelopment/development/usgboral/bundle/src/main/java/com/melbourneit/usgboral/cq/services/SearchService.java:[970,53] cannot find symbol
symbol: method getSubject()
location: variable topic of type com.adobe.cq.social.forum.api.Post
[ERROR] /D:/USGB/USGBDevelopment/development/usgboral/bundle/src/main/java/com/melbourneit/usgboral/cq/services/SearchService.java:[971,58] cannot find symbol
symbol: method getRepliesCount()
location: variable topic of type com.adobe.cq.social.forum.api.Post
[ERROR] /D:/USGB/USGBDevelopment/development/usgboral/bundle/src/main/java/com/melbourneit/usgboral/cq/services/SearchService.java:[972,49] cannot find symbol
symbol: method getUrl()
location: variable topic of type com.adobe.cq.social.forum.api.Post
[ERROR] /D:/USGB/USGBDevelopment/development/usgboral/bundle/src/main/java/com/melbourneit/usgboral/cq/components/core/IdeaCenterDetail.java:[47,50] cannot find symbol
symbol: method isApproved()
location: variable ideaPost of type com.adobe.cq.social.forum.api.Post
[ERROR] /D:/USGB/USGBDevelopment/development/usgboral/bundle/src/main/java/com/melbourneit/usgboral/cq/components/core/IdeaCenterDetail.java:[48,52] cannot find symbol
symbol: method getCreatedBy()
location: variable ideaPost of type com.adobe.cq.social.forum.api.Post
[ERROR] /D:/USGB/USGBDevelopment/development/usgboral/bundle/src/main/java/com/melbourneit/usgboral/cq/components/core/IdeaCenterDetail.java:[49,53] cannot find symbol
symbol: method getCreated()
location: variable ideaPost of type com.adobe.cq.social.forum.api.Post
[ERROR] /D:/USGB/USGBDevelopment/development/usgboral/bundle/src/main/java/com/melbourneit/usgboral/cq/components/core/IdeaCenterDetail.java:[58,41] cannot find symbol
symbol: method getMessage()
location: variable ideaPost of type com.adobe.cq.social.forum.api.Post
kunal23
MVP
kunal23
MVP
31-01-2016
You need to refactor your communities code as in 6.1 many of the communities java api packages were reorganized. Did you follow the documentation for upgrading the communities - https://docs.adobe.com/docs/en/aem/6-1/deploy/communities/upgrade.html
Also, the links I shared with you earlier please go through this again -
[1] https://docs.adobe.com/docs/en/aem/6-1/develop/communities/code-guide/maven.html
You need to add the dependencies like below -
< dependency > < groupId >com.adobe.cq.social</ groupId > < artifactId >cq-socialcommunities-api</ artifactId > < version >1.7.197</ version > < scope >provided</ scope > </ dependency > < dependency > < groupId >com.adobe.aem</ groupId > < artifactId >uber-jar</ artifactId > < version >6.1.0</ version > < scope >provided</ scope > < classifier >obfuscated-apis</ classifier > </ dependency > |
You should use the right version of cq-socialcommunities-api as installed in your AEM instance. Please follow the steps mentioned in the documentation.
From the above exception it seems that you also need to add apache-commons dependency to your project.
<dependency>
<groupId>commons-fileupload</groupId>
<artifactId>commons-fileupload</artifactId>
<version>1.3.1</version>
<scope>provided</scope>
</dependency>