Java – what’s the difference between wrapping alfresco extensions as AMP and jar?

I want to understand the consequences of packaging alfresco extensions as jars rather than as amps I'm building alfesco Ask this question in the context of war using Maven

Suppose I have a module, myalfresco, created using all in on archetype I want to use my foo extension to extend it My question is: why am I packaged as amp?

If I package foo as a jar and mark it as a dependency of myalfresco, foo Jar will be placed in Web - inf / lib

If I package foo as AMP, the result will be the same (using overlay), but Maven construction will take longer (using overlay makes Maven war plugin very slow)

So is there any reason to consider packaging foo as AMP in this case?

Solution

As per doc, jar and amp are two different methods. Put Maven aside

JAR:

Jar contains Java classes and sometimes static resources They are added to share / alfresco. Com by overloading existing classes They had to fight an explosive war in Web - if / lib Suppose you use tomcat, your application will never be deleted

This is not a common situation, at least not a satisfactory mode of production

AMP

The common architecture provides some "standard" development and uses spring / spring surf integration

In addition, AMP and alfresco tools provide many mechanisms to include and use extensions It uses module Properties to define versions and dependencies (just like Maven) You can provide amps for production operators (or any management team) who simply put amps in the amplifier directory and start apply_ amp. Sh (or bat), all operations should be installed correctly

If you give a jar, they have many ways to include it, and some people really don't recommend it So you have to write a how

Okay, and Maven?

Maven was integrated for only two years It is still some old configuration and many development methods

If you only want to develop independent extensions for community or professional environments, consider using amp extension prototypes

When mixing share and alfresco, use the all-in-one prototype, when to fight (not just for AMP), and when to develop many related amplifiers

conclusion

Amp is a standard way to provide alfresco extensions even if I don't know more details It is equipped with good tools and brings some standards

Use amp extension wrappers for "simple" projects When things become more complicated, use an all-in-one machine (multi module)

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>