Hi,
Sorry for the slow response on this…
An extension module a Surf configuration object so you should place XML files containing module configuration in any of the locations where Surf config gets picked up… e.g. "<web-server>/webapps/share/WEB-INF/classes/alfresco/site-data" (there are lots of places where Surf configuration gets picked up, but "alfresco/site-data" on the classpath is the most common). Extension config files should be placed in the "extensions" folder within the directory… so you could place an extension config file in:
"alfresco/site-data/extensions" or "alfresco/web-extension/site-data/extensions" for example.
You could create a JAR file containing this folder structure. Everything that the extension refers to (e.g. WebScripts, other Surf config objects such as Pages, Template-Instances, Components, etc) should just be placed in their normal location. These can also be built into a JAR file.
If you want to access resources (e.g. CSS, images, JS) from a JAR file then place them in the META-INF folder of the JAR. You should place your JAR file in the "<web-server>/webapps/share/WEB-INF/lib" directory (obviously your server will need to be restarted to pick up new JAR contents).
WebScripts should can be in (on the classpath):
"alfresco/site-webscripts"
"alfresco/web-extension/site-webscripts"
"webscripts"
You can also configure other locations in the Surf configuration from which to load Surf config objects/WebScripts. It's pretty much endlessly customizable but you should probably just stick to the default locations configured for Share.
Regards,
Dave