08-10-2022 10:19 AM
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
08-21-2022 03:16 PM
Finally, this worked.
<dependency> <groupId>${alfresco.groupId}</groupId> <artifactId>alfresco-share-services</artifactId> <version>${alfresco.share.version}</version> <classifier>classes</classifier> </dependency>
08-10-2022 12:00 PM
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>
08-11-2022 05:39 AM
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.
08-21-2022 03:16 PM
Finally, this worked.
<dependency> <groupId>${alfresco.groupId}</groupId> <artifactId>alfresco-share-services</artifactId> <version>${alfresco.share.version}</version> <classifier>classes</classifier> </dependency>
08-21-2022 11:58 PM
Thanks for your answer. It helped me a lot.
Explore our Alfresco products with the links below. Use labels to filter content by product module.