Modulegroup Update and Get tasks
Current implementation
The modulegroup update command is confusing to describe the behaviour and doesn't offer the level of granularity for supporting repositories.
Defect
bug 4741 describes the issues that started the need for modulegroup update and get.
zero modulegroup update
The command modulegroup update without any arguments will "get" the entire remote zero repository. The maven resolver does not support listing so those modules are not retrieved in the "get all". Actually, the only way to get artifacts from a maven repository is to add a dependency line to an ivy file and resolve the module.
zero modulegroup update zero.application.template
The command modulegroup update with a single argument will "get" the module from a remote zero repository, and any required transitives. Note: the installer uses this command to prime the repository, so this needs to be supported
Adding a get command and making update really an update
The initial requirement to split update and get came from the fact that the zero user has no way to update only the modules used by their application. The entire repository had to be updated, which is excessive. So the idea is make modulegroup update really just update. The command modulegroup get will be introduced to support getting all modules or new modules. There will be some overlap between the two commands that we need to identify and decide how to support in predictable manner.
modulegroup update
The modulegroup update task will update the modules currently in the repository. The implementation will list the modules in the repository and then check to see if a newer revision is available on the remote repository. Only the modules currently in the repository are updated, but new modules can be added because of transitive dependencies.
modulegroup update mstring
The supported mechanisim for getting new modules is to use the new modulegroup get command. However, for compatibility reasons, the modulegroup update mstring task must be supported. The installer uses zero modulegroup update zero.application.template to prime the local repository with modules.
modulegroup get
The modulegroup get command allows retrieving modules from remote repositories into the local repository. The modulegroup get command also supports retrieving modules from maven servers, but the wild card support is limited. The organisation name must be specified and it is strongly encouraged to specify the module name as well.
- zero modulegroup get org.apache.derby:derby
- zero modulegroup get org.apache.derby:derby:10.1.1.0
modulegroup get *
The modulegroup get needs a way to retrieve all remote modules, the equivalent of the previous modulegroup update task. The initial though was to use modulegroup get *, but unfortunately the * gets expanded to be all the files in the current directory.
The choices for get all are:
- modulegroup get "*"
- modulegroup get all
- modulegroup get
The command to get all is
zero modulegroup get all
what does zero modulegroup get zero.core mean if zero.core is in the repository?
Get supports a notation where the organization, module and revision can be specified. The module is required, but can be a wild card. If the organization is omitted, then the organization is defaulted to zero. If the revision is omitted, then the revision is default to the latest version. So if the zero.core module is in the repository and is not that latest revision, then the latest version is downloaded.
Examples
| command | description |
| zero modulegroup update | updates only those modules in the local repository |
| zero modulegroup update mstring | updates the specified module, need this because of the installer. Equivalent to mg get mstring |
| zero modulegroup get all | gets all modules from remote repository |
| zero modulegroup get org.apache.derby:derby:10.1.1.0 | get version 10.1.1.0 of derby |
| zero modulegroup get org.apache.derby:derby | get the latest version of derby. An older version of derby can be in the repo |
| zero modulegroup get org.apache.derby:* | get the latest version of modules in organisation org.apache.derby |
| zero modulegroup get zero:* | get the latest version of all the modules in organisation zero |
| zero modulegroup get zero:* -n=5 | get up to the 5 latest versions of all the modules in organisation zero |
-- bonanno - 02 Jul 2008