Is it possible to declare multiple versions of the same dependency in a Maven repo?
I need these dependencies all at once:
This is how I got around it. FYI: In my case I was building a RPM.
I used the maven-dependency-plugin to copy the older dependency that gets ignored to a folder in the build directory and then copied that file to the staging area so that it's included in the RPM.
Here's the code to copy the older dependency:
org.apache.maven.plugins
maven-dependency-plugin
3.1.1
copy-dependencies
prepare-package
copy
some.package.group.id
someartifact-id
1.2.3
false
${project.build.directory}/older-dependencies
And then later on during the building of my RPM I included this scriptlet in the configuration section of my rpm-maven-plugin. This will copy the file to the staging area for the RPM: