Component Reader (Buckminster)
< To: Buckminster Project
A Component Reader is a technical adapter for a component respository (such as CVS, Subversion, FTP, filesystem, etc.). It can enumerate component branches and/or tags for a component request, and it can read individual files, and materialize component contents for a Version Selector.
A reader will typically be an adapter for a specific type of source code control system such as CVS, Subversion, Perforce, or ClearCase but it can also be an adapter for Maven repositories, FTP archives, or software that is installed on disk. One example of the latter is the "eclipse-installed" reader that will connect to components (in this case - features, plug-ins, and fragments) that are available in the Eclipse runtime.
The separation of concern between the ComponentType and ComponentReader is important as this provides a degree of freedom between how the content of the component is organized and dependencies gets created and how the content is read. Simple specify the mix you want in the RMAP.
Naturally, an important part of the reader functionality is to connect to the wanted version of the component. A URI points to the repository of one or many versions of the component, the name of the component is needed, and finally the original plain version string (like "4.5.2" or "titanic-27b") interpreted by a Version Type and translated by a Version Converter into a Version Selector such as "3.1.0/LATEST" depending on policies determined by the component owner.
Conceptually, the Component Reader normalizes across all repositories, but as a user you need to know how the component versioning is layed out in terms of branches, tags, etc. You control this with the specification of a VersionConverter in the RMAP.
Available Component Readers
Here is a list of the currently available component readers:
|maven||The maven Component Reader is based on the url.catalog reader that lists all available jar-files in a directory to determine best version. Extended with functionality that maps component names to the maven specific groupId and artifactId.|
The url.catalog Component Reader reads files from a specific catalog (folder) appointed by an URL. The reader must have browse permissions in order for this reader to function. The reader will parse generated page content in order to list the folder contents when http or ftp protocol is used. Only file, http, and ftp are supported.
If you are looking for a reader for a repository not listed here, please check out the Buckminster Plugin Directory, and if not found there, add it to the Buckminster Wish List, and hope that others are also interested.
Readers for non versioned artifacts
A component reader that connects to an non versioned artifact will only understand the Version Selector notation "<default branch>/LATEST".
Extending Component Readers
New types of component readers can be added using the Buckminster Extension Point org.eclipse.buckminster.core.readerTypes.