Extension:MavenRepository

MediaWiki extensions manual
OOjs UI icon advanced.svg
MavenRepository
Release status: stable
Implementation Parser function
Description Adds parser functions to output several informations from a Maven repository.
Author(s) Stéphane GALLAND (sgalland-arakhnetalk)
Latest version 1.2
License GPL
Download http://www.arakhne.org/mediawiki/MavenRepository/
Check usage and version matrix.

DescriptionEdit

MavenRepository is an extension of MediaWiki to retreive files and informations from a Maven repository.

Example: http://www.janus-project.org/index.php/Download

InstallationEdit

  1. Download MavenRepository,
  2. Unpack the archive in your Mediawiki directory
  3. add require_once('extensions/MavenRepository/MavenRepository.php'); in your LocalSettings.php.


ConfigurationEdit

MavenRepository extension uses several global variables which may be set in LocalSetting.php:

  • $wgMvnRepoPaths
    Defines the paths to the Maven repositories. It is an associative array of (repository_local_path => repository_url).

UsageEdit

MavenRepository provides several parser functions, explained below. In all the following explanations MID represents a standard Maven group-artefact pair: a group identifier, a column character, and an artifact identifier.

{{#mvngroupid}}Edit

Reports group identifier from the given module identifier. For example:

{{#mvngroupid: org.arakhne.afc:arakhneVmutils}}

Gives: org.arakhne.afc

{{#mvnartifactid}}Edit

Reports artifact identifier from the given module identifier. For example:

{{#mvnartifactid: org.arakhne.afc:arakhneVmutils}}

Gives: arakhneVmutils

{{#mvnversion}}Edit

Reports the version of the maven module. For example:

{{#mvnversion: org.arakhne.afc:arakhneVmutils | *}}

Gives: 1.0-SNAPSHOT

{{#mvndate}}Edit

Reports the distribution date of the maven module. For example:

{{#mvndate: org.arakhne.afc:arakhneVmutils | *}}

Gives: 03 Aug 2010 07:04:39

{{#mvnrepository}}Edit

Reports the URL of the last release of the maven module. For example:

{{#mvnrepository: org.arakhne.afc:arakhneVmutils | *}}

Gives: http://download.tuxfamily.org/arakhne/maven/org/arakgne/afc/arakhneVmutils/1.0-SNAPSHOT/

{{#mvnrepositorylink}}Edit

Reports the URL of the last release of the maven module. For example:

{{#mvnrepositorylink: org.arakhne.afc:arakhneVmutils | * | Label}}

Gives: Label

{{#mvnjar}}Edit

Reports the path to the Jar of the last release of the maven module. For example:

{{#mvnjar: org.arakhne.afc:arakhneVmutils | * | sources}}

Gives: org/arakgne/afc/arakhneVmutils/1.0-SNAPSHOT/arakhneVmutils-1.0-SNAPSHOT-sources.jar

{{#mvnjarname}}Edit

Reports the name to the Jar of the last release of the maven module. For example:

{{#mvnjarname: org.arakhne.afc:arakhneVmutils | * | sources}}

Gives: arakhneVmutils-1.0-SNAPSHOT-sources.jar

{{#mvnjarsize}}Edit

Reports the size to the Jar of the last release of the maven module. For example:

{{#mvnjarsize: org.arakhne.afc:arakhneVmutils | * | sources}}

Gives: 1.7 GB

{{#mvnjarlink}}Edit

Reports the hyperlink to the Jar of the last release of the maven module. For example:

{{#mvnjarlink: org.arakhne.afc:arakhneVmutils | * | sources}}

Gives: arakhneVmutils-1.0-SNAPSHOT-sources.jar

{{#mvnjarlist}}Edit

Reports a list of the hyperlinks to the Jar files of the last release of the maven modules inside the given group. For example, because arakhneLogger, arakhneRefs, and arakhneVmutils are artifacts in group org.arakhne.afc:

{{#mvnjarlist: org.arakhne.afc | * | sources}}

Gives:

ChangesEdit

  • 1.2 : {{#mvnjarsize}} is added. It is expanded to the size of the jar file in the Maven repository.
  • 1.1 : {{#mvnjarlist}} is introduced. It permits to output a list of links to jars for all artifacts inside a group..
  • 1.0 : First Public Release on Mediawiki website.