Developers

This section is for developers that want to use or extend Mavenzilla.

Extend Mavenzilla

One option for extending Mavenzilla is to define regular expressions for parsing the HTML documents produced by the webservers of the remote repositories. The regular expressions are defined in the mavenzilla.properties file:

repository.http.<host>.artifact = <regexp for artifacts>
repository.http.<host>.group = <regexp for groups>

The <host> placeholder must be replaced by the host of the remote repository.

The regular expression must match all artifacts or groups, resp. They must contain one group ("(...)"), which is considered as name of the artifact or group. They also must contain one placeholder ("{0}") that will be replaced by the pattern the group is searched for or the type of the artifact.

Besides extending (or better: configuring) existing repository implementations, additional repository types can be supported. The full qualified class name of the Repository implementation for a certain protocol is defined in the mavenzilla.properties file:

repository.<protocol> = <full qualified class name>

Use Mavenzilla

The Mavenzilla API has changed, to become more clear and to gain performance. To use Mavenzilla only the following lines of code are needed:

:
:
// urls is a comma-separated list of repository urls, supported are file: and
// http: urls
Mavenzilla mavenzilla = new Mavenzilla(urls);
:
:
// that instance can be used multiple times
Collection result = mavenzilla.search(pattern, type);
:
: