cancel
Showing results for 
Search instead for 
Did you mean: 

Right way to package repository web scripts in a JAR?

davidbalt
Champ in-the-making
Champ in-the-making
First, let me say I am not a Java developer, so this may be a bonehead question.

I've put together a little extension for Alfresco share, which includes a bunch of resource files, customizations, Surf Web Scripts, etc.  All of these files are packaged in a JAR.  Yes, I know a WAR would be better, but for rapid turnaround I have been using a JAR for now, since all I have to do is place it in the lib/ folder and restart alfresco to see it applied.

Everything is working OK with the JAR, except of course I have no idea why most of the files have to be in the particular folder structures that apparently they need to be in… but it is working.

EXCEPT for repository web scripts.  I found numerous accounts online for where the repository scripts need to go in a JAR file, but none of them worked for me.  Right now I have been forced to place the repo scripts into Data Dictionary/Web Scripts in order to get them working, but I'd like to have all the file associated with my project in a single JAR file if at all feasible.

What am I missing here?

I've tried placing the web scripts on the following paths, to no avail:

config/alfresco/templates/webscripts
alfresco/templates/webscripts
alfresco/site-webscripts/templates
WEB-INF/classes/alfresco/extension/templates/webscripts

Any help is much appreciated!
1 REPLY 1

ecarbenay
Star Contributor
Star Contributor
Hi,

to become more familiar with the structure of the jar, you can check those documentations :
https://code.google.com/p/share-extras/wiki/SampleProject
https://code.google.com/p/share-extras/wiki/DevelopmentEnvironment
Many examples can be found on share-extras. You just have to check how they are made to get helped.

Regarding repository web scripts, the wiki gives you a step by step guide to create a repository web script, and explain the different places where to deploy it, : http://wiki.alfresco.com/wiki/Web_Scripts#How_Do_I_Create_a_Web_Script.3F.

Hope that will help you !