Extension:MavenRepository

From MediaWiki.org
Jump to: navigation, search
MediaWiki extensions manual - list
Crystal Clear action run.png
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)
Last version 1.2
License GPL
Download http://www.arakhne.org/mediawiki/MavenRepository/

Check usage (experimental)

Contents

[edit] Description

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

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

[edit] Installation

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


[edit] Configuration

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).

[edit] Usage

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.

[edit] {{#mvngroupid}}

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

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

Gives: org.arakhne.afc

[edit] {{#mvnartifactid}}

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

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

Gives: arakhneVmutils

[edit] {{#mvnversion}}

Reports the version of the maven module. For example:

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

Gives: 1.0-SNAPSHOT

[edit] {{#mvndate}}

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

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

Gives: 03 Aug 2010 07:04:39

[edit] {{#mvnrepository}}

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/

[edit] {{#mvnrepositorylink}}

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

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

Gives: Label

[edit] {{#mvnjar}}

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

[edit] {{#mvnjarname}}

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

[edit] {{#mvnjarsize}}

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

[edit] {{#mvnjarlink}}

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

[edit] {{#mvnjarlist}}

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:

[edit] Changes

  • 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.
Personal tools
Namespaces

Variants
Actions
Navigation
Support
Download
Development
Communication
Print/export
Toolbox