Is it possible to define a dependency in the pom such that it has the scope of system but points to multiple jars?
I’m sure this is quite unorthodox, however, I was just wondering whether this was even possible. So something like:
<dependency>
<groupId>foo</groupId>
<artifactId>foo</artifactId>
<version>1.0</version>
<scope>system</scope>
<systemPath>${basedir}/lib/foo/*.jar</systemPath>
</dependency>
First (and I’ll never repeat it enough), using
systemscoped dependencies is discouraged unless you know exactly what you’re doing. From Dependency Scopes:Now, to strictly answer your question, declaring a dependency with a
systemscope that would point on several jars is “possible” IF the dependency has aMANIFEST.MFlisting other JARs relatively in itsClass-Pathentry. Something like this (assuming the “root” dependency is inlib):But I do NOT recommend this approach, especially in your particular case. Instead, have a look at this previous answer where I describe how to setup a file-based repository.