cancel
Showing results for 
Search instead for 
Did you mean: 

'Simple Module' or AMP module ?

mike38
Champ on-the-rise
Champ on-the-rise
Hello,

I am trying to understand with which kind of template I should work.

Most examples use the AMP templates (repo, share or all in one).
But the documentation for SDK 2.2 says in the <a href="http://docs.alfresco.com/5.1/concepts/dev-extensions-packaging-techniques-jar-files.html">"Simple Module" page</a> that "Platform and Share extensions are <strong>most suitably</strong> packaged in the Simple Module format. This module type uses <strong>the standard JAR</strong> file format.".

I understood the deployment differences, AMP deployments will alter the war files, while a JAR deployment only needs to drop the JAR module at the right place. The later seems easier in term of production maintenance since the product and the customizations are well separated.

Now it is very easy to spawn a new AMP module from the SDK template using mvn, while the only template I found for the "Simple Module" JAR kind of template is the <a href="https://github.com/Alfresco/alfresco-sdk-samples/tree/master/samples/alfresco-simple-module">example referred to</a> by the documentation. And this example explicitly says "UNSUPPORTED experiment on loading Alfresco repo modules as JARs - use for investigation / development purposes - not PRODUCTION".

Which is not at all the wished context.

Also the differences between these templates are not obvious, for example it looks like some files are not at the same location (modules.properties) but I don't know if it is just by chance or if it is required, I am 100% sure to make mistakes if I try to adapt an AMP project to the JAR style of deployment.

Thus my questions after this long explanation is, should I try to set-up a "Simple Module" jar-like project, or should I keep the AMP projects as-is and just take care of carefully managing the war file on the production system ? And why do they say that JAR simple modules are "most suitable" ?

Thank you.


3 REPLIES 3

gravitonian
Star Collaborator
Star Collaborator

Thanks, that was my preferred option but I was worried not to find much support and samples. Actually I got lost at some point in the alfresco-sdk-samples repository, as the documentation I was reading about modules was not pointing to the alfresco-51 branch…

Hi,
I am starting to make it work and even understand one or 2 things.
Your samples were absolutely necessary.

I would have a few remarks.
1. I have found a note in the documentation (http://docs.alfresco.com/5.1/concepts/dev-extensions-packaging-techniques-jar-files.html) that says: <cite> you should specify the new module.share.version.min and module.share.version.max properties</cite> while the module.properties files still have the old module.repo properties, maybe it would be helpful to update them for unskilled people like me.
2. It would also be very useful to include the test structure to the examples, I took (due to ignorance) much time to set-up a correct testing configuration with the right dependencies, etc.
3. Why not add them or at least a basic one to the alfresco maven templates ?

Thanks
Mike