cancel
Showing results for 
Search instead for 
Did you mean: 

Missing dependecy

Andreas_L-Å
Champ on-the-rise
Champ on-the-rise

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

1 ACCEPTED ANSWER

Finally, this worked.

<dependency>
  <groupId>${alfresco.groupId}</groupId>
  <artifactId>alfresco-share-services</artifactId>
  <version>${alfresco.share.version}</version>
  <classifier>classes</classifier>
</dependency>

View answer in original post

4 REPLIES 4

ash_saxena10
Confirmed Champ
Confirmed Champ

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.