Hi
I have a rather old repo modification I am trying to recompile for the latest version of Alfresco.
The problem I have is that the java file tries to import org.alfresco.slingshot.web.scripts.NodeBrowserScript that is part of share. How do I add share as a dependency in maven or should I add something else?
//Andreas
Solved! Go to Solution.
Finally, this worked.
<dependency> <groupId>${alfresco.groupId}</groupId> <artifactId>alfresco-share-services</artifactId> <version>${alfresco.share.version}</version> <classifier>classes</classifier> </dependency>
org.alfresco.slingshot.web.scripts.NodeBrowserScript is called by node-browser webscript . This webscript is part alfresco-share-services.amp which is part of Alfresco Repository libraries and not share . Below are the descriptor and the template of the controller org.alfresco.slingshot.web.scripts.NodeBrowserScript , at path share-services/src/main/resources/alfresco/templates/webscripts/org/alfresco/slingshot/node-browser/
node-browser.get.desc.xml
node-browser.get.json.ftl
add below dependency in repository/platform project pom.xml file and check .
<groupId>org.alfresco</groupId>
<artifactId>alfresco-share-services</artifactId>
<version>${project.version}</version>
<type>amp</type>
</dependency>
I added the dependencies to the platform pom.xml but changed project.version to alfresco.share.version. This downloads the amp, and I can see that inside the jar inside the amp is indeed org.alfresco.slingshot.web.scripts.NodeBrowserScript yet I still get the same error message when running mvn clean package, package org.alfresco.slingshot.web.scripts does not exist.
Finally, this worked.
<dependency> <groupId>${alfresco.groupId}</groupId> <artifactId>alfresco-share-services</artifactId> <version>${alfresco.share.version}</version> <classifier>classes</classifier> </dependency>
Thanks for your answer. It helped me a lot.
Ask for and offer help to other Alfresco Content Services Users and members of the Alfresco team.
Related links:
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.