ZPM is a package manager designed for convenient deployment of applications and modules on the IRIS platform.
Module developers, in order for their module to be installed using ZPM, need to follow a series of simple steps.
- Write module code
- Create a module.xml file that contains the meta description of the module
- Using the test registry, publish the module, verify that it is published
- Install the module from the test registry
- Publish the module. To publish in the public registry pm.community.intersystems.com, you need to publish the module in https://openexchange.intersystems.com, specifying the github url of your package and tick the “Publish in Package Manager” checkbox.
Creating a module.xml file manually can be tedious, so the generate command will now be created in zpm (starting with version 0.2.3).
The generate command is for creating module.xml for your project.
How to use:
Run zpm in terminal
And then type generate
USER>zpm
zpm: USER>generate /temp/zzz
As an argument (in this case /temp/zzz) specify the path to the directory with your project. The module.xml file will be created in this directory.
Then answer questions:
zpm: USER>generate /temp/zzz
Enter module name: my-module
Enter module version: 1.0.0 => 1.0.1
Enter module description: module description
Enter module keywords: test,zpm,docker
Enter module source folder: src =>
Existing Web Applications:
/csp/user
/registry
Enter a comma separated list of web applications or * for all: /csp/user
Enter path to csp files for /csp/user: web
Dependencies:
Enter module:version or empty string to continue: sslclient:*
Enter module:version or empty string to continue:
zpm: USER>
- module source folder – relative path to your code (classes, routines), usually src. All classes and routines in this folder are loaded into current namespace.
- If your module includes web applications, indicate which web applications from the current namespace should be added to module.xml
- If your module contains dependencies, specify the module and its version. Use * for the latest version.
If you need to add author and license information to module.xml, use the -author (-a) modifier.
zpm: USER>generate -author /temp/zzz
The generate command also supports a different option: use the -template (-t)
modifier. The module.xml is created with the fictional data, which you need to change manually.
zpm: USER>generate -template /temp/zzz
Watch this video demonstrating the usage of the generate command.
Is there a way to generate the file 100% programmatically, for example in an automated build pipeline? As far as I can see the only way seems to be to write code to generate the module.xml
hi @Nikolay Solovyev,
A great tool for me, I will try it very soon