Maven Layout Provider¶
Introduction¶
Our support for Maven is handled via the Maven 2 Layout provider. The code is located under the strongbox-storage-maven-layout-provider module.
We support Maven versions 2.x and higher.
We do not support Maven versions 1.x, nor have virtual repositories that can do this conversion.
What does "Maven 2" actually refer to?¶
This layout provider supports Maven versions 2.x and higher. Collectively, these versions are referred to as "Maven 2.0", so that there could be a distinction between the early days Maven -- 1.x, which reached an end of life in June 2007 and was re-written from scratch and replaced by Maven 2.x.
One of the main difference between Maven 1.x and 2.x is that Maven dropped the Ant-style (Jelly) declaration of tasks to be executed in favour of proper Maven plugins written in Java.
Our implementation of the Maven 2 layout provider does not support Maven 1.x versions, since they have long reached an end-of-life.
Artifact Coordinates¶
This is the list of artifact coordinates supported by the provider:
Coordinate | Description | Type |
---|---|---|
groupId |
The group (package name) of the package | Mandatory |
artifactId |
The name of the package | Mandatory |
version |
The version of the package | Mandatory |
extension |
The extension of the package | Optional; defaults to jar |
classifier |
The classifier of the package | Optional |
User Agent¶
The accepted User-Agent
headers supported must look like User-Agent=Maven/*
.
Custom Features¶
This layout provider also indexes the artifacts using the Lucene-based Maven Indexer as explained below.
Maven 2 Search Providers¶
The Maven 2 layout provider uses the OrientDB (default).
Classes of Interest¶
The following are some of the most important classes you will need to be familiar with in order to work on this layout provider:
Coordinate | Description |
---|---|
MavenArtifactCoordinates | This is an implementation of ArtifactCoordinates for Maven. |
Maven2LayoutProvider | This is the actual implementation of the Maven 2 layout provider. |
MavenRepositoryFeatures | This defines the custom layout provider features for Maven 2 (like the Maven Indexer). |
MavenRepositoryManagementStrategy | This class is used to handle the initialization of Maven 2 repositories. |
ArtifactIndexesServiceImpl | This service class is used to manage Maven Indexer-related tasks. |
MavenIndexerSearchProvider | This is an implementation of the Maven Indexer. |
ArtifactMetadataServiceImpl | This service is used to manage Maven Metadata. |
MavenArtifactController | This is the Maven 2-specific implementation of the BaseArtifactController . |