Note: information on this page refers to Ceylon 1.1, not to the current release.
Ceylon supports modules natively. Ceylon Modules contain the following:
- A module descriptor, which contains:
- A unique name and version
- Meta-data such as author, license, documentation
- A list of module dependencies
- A list of packages
- Optionally, a source archive
- Optionally, an API documentation archive
Ceylon modules are published in Ceylon repositories, which are then used by Ceylon tools to consume and produce modules natively.
Ceylon module archives contain the compiled code and are packaged in a
file using the ZIP file format.
Ceylon source archives contain the source code and are packaged in a
file using the ZIP file format.
Ceylon API documentation archives contain the API documentation in a
folder, which holds HTML documentation.
Legacy Java archives contain the compiled code and are packaged in a
file using the ZIP file format just as they are for Java. They are used instead
of the corresponding
.car archive (you can have on or the other, not both).
A legacy archive needs to follow the same naming rules and folder structure
as defined for
.car archives (see below). Also if the legacy archive has
dependencies on other modules they can be defined
module.properties file or other external files.
Ceylon module repositories are organised using the following structure
(using a module
com.foo.bar of versions
1.0 as example):
root/ com/ foo/ bar/ 1.0/ com.foo.bar-1.0.car -- Ceylon module archive com.foo.bar-1.0.car.sha1 -- Checksum file com.foo.bar-1.0.src -- Ceylon source archive com.foo.bar-1.0.src.sha1 -- Checksum file module-doc/ -- API documentation index.html -- Index page [...] -- API documentation files com/ foo/ bar/ 0.1/ com.foo.bar-0.1.jar -- Java legacy archive module.properties -- Dependencies for legacy archive
Supported repository types
At the moment, the Ceylon tools are able to use the following repository types:
- File system repository
- HTTP repository (for reading)
- WebDAV repository (for reading and publishing). You can specify the user name and password to use for WebDAV publishing in the tools
- A flat repository for interop
- Legacy repositories (Maven…)
The Ceylon tools use a number of standard repositories:
- The distribution repository, which is located in your distribution at
$CEYLON_HOME/repo. It contains the modules required by the Ceylon tools:
ceylon.language, the tools, the ant tasks.
- The current repository, which is specified by the user when invoking the
Ceylon tools, and defaults to
modulesin the current directory.
- The home repository, which is located at
$HOME/.ceylon/repoand contains a cache of module artifacts downloaded from remote repositories.
- The central repository, which is located at
https://modules.ceylon-lang.org/repo/1and will contain every published Ceylon module.
Normally, when looking for a Ceylon module, the tools will use these standard repositories in the order they are listed above. The exact order of lookup and the way you can change it is described in the section on tool configuration.
Ceylon also integrates with other legacy repositories such as Maven.