I have dozens of separate automated tests Maven projects. Many of these projects depend on other projects, as they all test different modules of one, massive system.
Maintaining the cohesion of these dependencies almost became a full-time job. What I want instead, is to create a single aggregate which we will be able to version, which will hold all version numbers.
It could hold dependencies, but that means:
- a) each project would download every single other project, even if it only needs one or two
- b) it would also download an older version of itself, which may cause conflicts
- c) no easy versioning
For reasons A and B I don't want to chain dependencies, or expand my parent pom into a gigantic pom. I am aware of the Properties Maven Plugin. I can create a separate project consisting of a pom.xml and a, lets say, versions.yaml files, which I can deploy to Nexus. Versions.yaml would contain entries like:
project-1: 0.4.2-SNAPSHOT
project-2: 0.9.18-SNAPSHOT
and then the dependency in test projects would look like this:
<dependency>
<groupId>group</groupId>
<artifactId>artifact</artifactId>
<version>${project-1}</version>
</dependency>
However, I am unsure how to access said file from another project:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>properties-maven-plugin</artifactId>
<version>1.2.1</version>
<executions>
<execution>
<phase>initialize</phase>
<goals>
<goal>read-project-properties</goal>
</goals>
<configuration>
<files>
<file>???</file> <!--TODO-->
</files>
</configuration>
</execution>
</executions>
</plugin>