Gitlab maven repository aggregation
Problem to solve
Provide single central repository for maven artifacts. Currently each project has its own space to keep the artifacts, in order to consume the artifacts each repository has to be referenced in the consumer project.
Further details
Use case:
We have n number of projects, say
project-1, project-2,............,project-n
If we want to consume j (where j<=n) number of project/s in our consumer project called foo-consumer then the pom.xml of my foo-consumer would look something like
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>de.mycompany</groupId>
<artifactId>foo-consumer</artifactId>
<version>0.0.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>foo-consumer</name>
<url>http://maven.apache.org</url>
<repositories>
<repository>
<id>project-1</id>
<url>path-of-my-project</url>
</repository>
<repository>
<id>project-2</id>
<url>path-of-my-project</url>
</repository>
.
.
.
.
j times
</repositories>
<dependencies>..
</project>
Proposal
Define a way to aggregate the maven artifacts from individual projects to a single repository
What does success look like, and how can we measure that?
Having an aggregation of my n maven repositories to a maven repository called company-repo for example then I can simply reference company-repo in my foo-consumer's pom.xml, no matter how larger j gets