How to Access a Maven Repository » History » Version 4
Henning Blohm, 11.12.2013 14:14
1 | 1 | Henning Blohm | h1. Maven Repos Support |
---|---|---|---|
2 | |||
3 | The main idea behind this concept is to hook existing Maven repositories in as component repositories. At first this is most useful for libraries, later this may be extended to other archetypes. |
||
4 | |||
5 | Maven repository suppport can be implemented in z2-base and does not require core changes. |
||
6 | |||
7 | h2. Name mappings |
||
8 | |||
9 | Artefacts in Maven repos have a fully qualified name of the form |
||
10 | |||
11 | <pre> |
||
12 | <groupId>:<artifactId>:<version> |
||
13 | </pre> |
||
14 | |||
15 | where <groupId> is something like *org.acme*, <artefactId> is something like *mylibrary* and <version> is a fully structured _major.minor.micro_ style version or a version that has an appended "-SNAPSHOT" qualifier indicating an non-well-defined version that may receive intermediate updates. |
||
16 | |||
17 | When exposed via a Z2 component repository Maven artefacts will be addressed by their fully qualified name as module name and with an archetype specific in-module component name. |
||
18 | |||
19 | E.g. a library of packaging jar, will translate to |
||
20 | |||
21 | 2 | Henning Blohm | <pre> |
22 | 1 | Henning Blohm | <groupId>:<artefactId>:<version>/jar |
23 | 2 | Henning Blohm | </pre> |
24 | 3 | Henning Blohm | |
25 | In order to simplify management of version vectors, the [[smart_props]] approach may be utilized. |
||
26 | 4 | Henning Blohm | |
27 | Dependencies of Maven repo artefacts get mapped to Java dependencies, for the case of the jar archetype after parsing a corresponding POM file. |