Following the tutorial and testing it out, the screen explodes into a torrent of letters and characters...stack trace! Who would have thought...
Turns out ConfigurationManager is turned off by default for security reasons http://localhost:4502/system/console/configMgr/com.day.cq.wcm.webservicesupport.impl.ConfigurationManagerImpl. Well I could enable it then the tutorial would work, but those Adobe guys probably have good reason to disable it.
I found that it is possible to get a ConfigurationManager instance through the ConfigurationManagerFactory. Well, I could put this into the tutorial but who likes scriptlets not Center of Excellence, he wrote this article on how to avoid using scriptlets.
After some changes and making the cloud configuration conform to sightly and connect to a WCMUse backend.
Using depfinder http://localhost:4502/system/console/depfinder to make sure I have the correct dependency for ConfgurationManagerFactory. The package is com.day.cq.wcm.webservicesupport and version 5.8.44. Get everything set up and attempt to build the project to AEM.
No dice! Maven yelling at me!
Turns out the Adobe public repo is missing that version. The highest version at the time of this article was 5.6.4
So now What?!?!
I found this nice article about how to add jars to the local maven repository (.m2 folder)
Okay, so I know what to do but how do I get the jar?
How to get a jar from AEM instance
Go to http://localhost:4502/system/console/bundles
Search for webservice, click Day Communique 5 WCM Webservice Support
Notice Bundle Location copies the path after jcrinstall:
Open CRXDE Lite and add the copied path. You should see the name of the jar inside that path
Now that the location is confirmed. Go to the terminal and vlt down the jar. In my case this is what I used:
Go to http://localhost:4502/system/console/bundles
Search for webservice, click Day Communique 5 WCM Webservice Support
Notice Bundle Location copies the path after jcrinstall:
Open CRXDE Lite and add the copied path. You should see the name of the jar inside that path
Now that the location is confirmed. Go to the terminal and vlt down the jar. In my case this is what I used:
vlt --credentials admin:admin co --force http://localhost:4502/crx/-/jcr:root/libs/wcm/webservice-support/install
How to add missing AEM Dependency
This will add the jar to the local maven repository
Now that we have the jar, drill down to the jar and use the maven in the terminal to add it to your local repo. In my case, this is what I used.
How to add missing AEM Dependency
This will add the jar to the local maven repository
Now that we have the jar, drill down to the jar and use the maven in the terminal to add it to your local repo. In my case, this is what I used.
mvn install:install-file -Dfile=cq-wcm-webservice-support-5.8.44.jar -DgroupId=com.day.cq.wcm \
-DartifactId=cq-wcm-webservice-support -Dversion=5.8.44 -Dpackaging=jar
Rebuilding the project now worked.
Rebuilding the project now worked.
No comments:
Post a Comment
If you have any doubts or questions, please let us know.