Download 3.5.x - Docs

Transcript
qooxdoo Documentation, Release 3.5.1
“library” Key and Manifest Files
The library key of a configuration holds information about source locations that will be considered in a job (much like
the CLASSPATH in Java). Each element specifies one such library. The term “library” is meant here in the broadest
sense; everything that has a qooxdoo application structure with a Manifest.json file can be considered a library in this
context. This includes applications like the Showcase or the Feedreader, add-ins like the Testrunner or the Apiviewer,
contribs from the qooxdoo-contrib repository, or of course the qooxdoo framework library itself. The main purpose of
any library entry in the configuration is to provide the path to the library’s “Manifest” file.
Manifest files Manifest files serve to provide meta information for a library in a structured way. Their syntax is again
JSON, and part of them is read by the generator, particularly the provides section. See here for more information
about manifest files.
“manifest” values The most important key in each library entry is manifest. This section gives some examples and
background on the possible values of this key.
Local path The simplest value is just a path on your local machine. It must lead to the library root directory and end
in the library’s Manifest.json:
../../mylib/utils/Manifest.json
Like in this example paths can be relative, and will be calculated from the configuration file they appear in. The
Generator will search the Manifest file especially for the provides keys, e.g. provides/class which points to the
library’s class path.
The other possible values are concerned with network-base libraries.
contrib:// URL If the value starts with contrib:// there will be a lookup in the contribution catalog for the given
contribution and version. For example:
contrib://UploadWidget/0.4/Manifest.json
will look in the catalog for a contribution named “UploadWidget” and below that for a version named “0.4”.
This must contain a file “Manifest.json” that contains a download link to an archive, and some other entries to
assist in downloading.
The archive will be downloaded and unpacked, and then used by the Generator like a local library.
http(s):// URL If the value starts with http:// or https:// there are two cases:
• Either it points to a file that has an archive extension (like .zip or .tar.gz), it will be downloaded and
unpacked, just like with a contribution archive. Example:
http://example.com/foo/bar/my-contrib-0.3.tar.gz
• Or it points to a file that has a .json extension. Then it will be evaluated like a catalog entry-style Manifest.json file and the download information therein will be used to get to the archive. Example:
http://example.com/foo/bar/MyContrib-0.3.catalog.json
Mind that for network-based libraries the JSON files pointed to by a URL is searched for the download information
for the archive, while the downloaded archive itself needs to contain a Manifest.json file (literally) which is searched
for information about the actual library contents (e.g. classes). See the contribution page for details.
URI handling URIs are used in a qooxdoo application to refer from one part to other parts like resources. There
are places within the generator configuration where you can specify uri parameters. What they mean and how this all
connects is explained in this section.
10.2. Generator
441