We're updating the issue view to help you get more done. 

Add Packager API to packager a container's distribution, a Configuration and deployed Deployables

Description

From a mail sent to the dev list:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 Hi, I'd like to propose introducing a new API in Cargo: the Packager API. The idea is that it would be useful for our users to ask Cargo to give them a consolidated distribution containing the container distribution files, a container configuration and deployed deployables. For example this would be very useful for the use case where a user wants to use Cargo to generate an application (i.e. a container, its configuration and deployed deployables). I'm thus proposing the introduction of the following interface: /** * Gathers an installed container distribution and a local configuration in a single location. * There can be several packagers like a directory packager which packeg them in a given directory * on the file system, a ZIP packager which does the same but packaged as a ZIP file, etc. * * @version $Id: Container.java 886 2006-02-28 12:40:47Z vmassol $ */ public interface Packager { /** * Package an installed container distribution and its local configuration in a single location. * * @param container the installed container to package */ void packageContainer(InstalledLocalContainer container); } This interface will be implemented by the different containers. We would also add a PackagerFactory class to return a packager for a given container. There could be several packager types (directory packager, zip packager, IzPack packager, etc). Thus we would also introduce a PackagerType class and use it to register packagers in the DefaultPackagerFactory class. Last, I'd like to introduce a new Maven2 MOJO so that users can type "mvn cargo:package". This would also mean the introduction a some new configuration elements: <configuration> <container/> <configuration/> <deployer/> <packager> <type>directory|zip|...</type> </packager> </configuration> The "directory" type would be the default so no configuration element would need to be specified to use it. WDYT? Thanks -Vincent

Status

Assignee

Vincent Massol

Reporter

Vincent Massol

Components

Fix versions

Affects versions

0.8

Priority

Major