AnsweredAssumed Answered

JAR File structure to override 'share/components/...' direrectory

Question asked by itzamna on Nov 24, 2014
Latest reply on Nov 26, 2014 by itzamna
Hi,

I'm not sure if I'm on the right subforum for this topic, but I don't find another one that fits more.

I'm developing a small dashlet that I want to provide as a JAR file for tomcat/shared/lib. It's based on the "get-latest-document" dashlet example: https://code.google.com/p/alfresco-get-latest-document

The example dashlet works well if I copy and paste it into tomcat/shared/lib, but my extension won't work in this way. If I compare the created folder structure of both (the example jar and my final jar), it's nearly the same (only the file/webscript names has changed). It seems to be that the JavaScript/CSS/Image won't be found. All is located in the META-INF folder.

Here is my structure of the generated JAR file that does not work:

my_jar.jar
|
+-alfresco
|  |
|  +-site-webscripts
|  |  |
|  |  +-com
|  |   |
|  |   +-myModule
|  |    |
|  |    +-components
|  |    |  |
|  |    |  +-dashlets
|  |    |    |
|  |    |    + … webscripts …
|  |    |
|  |    +-modules
|  |      |
|  |      +-getMyModule
|  |        |
|  |        +-config
|  |          |
|  |           +- …config webscripts …
|  |
|  +-templates
|     |
|     + … repo stuff …
|
+-META-INF
  |
  +-extension
  | |
  | +-components
  |  |
  |  +-dashlets
  |  | |
  |  | +-my_stylesheet.css
  |  | +-my_javascript.js
  |  |
  |  +-images
  |   |
  |   +-my_image.png
  |
  +-MANIFEST.MF



The strange is:
If I just copy the my_javascript.js + my_stylesheet.css to the exploded folder: "tomcat\webapps\share\components\dashlets" and the my_image.png to exploded folder "tomcat\webapps\share\images" it works, meaning the rest of the files in the JAR seems to be considered even the repo stuff in "templates". I don't see my mistake!?? What I'm doing wrong? Has anybody a clue why the files in the META-INF folder doesn't work?

Thanks guys!

Outcomes