<plugin> <artifactId>maven-assembly-plugin</artifactId> <configuration> <descriptorRefs> <descriptorRef>jar-with-dependencies</descriptorRef> </descriptorRefs> <archive> <manifest> <mainClass>com.company.Main</mainClass> </manifest> </archive> </configuration> <executions> <execution> <phase>package</phase> <goals> <goal>single</goal> </goals> </execution> </executions> </plugin> The problem is I have some local dependencies I'd like to keep in the project.
I defined them in pom.xml like so:
<dependency> <groupId>groupid</groupId> <artifactId>local</artifactId> <version>1.1</version> <scope>system</scope> <systemPath>${basedir}/lib/local-utilities-1.1.jar</systemPath> </dependency> Now when I package the whole thing maven-assembly-plugin packs only dependencies that are automatically downloaded and available in repo... That's probably because those local JARs are available in compile phase, not in package phase (correct?).
How can I make this plugin include those dependencies as well? I tried changing <scope> to package and other phases, but apparently that's not allowed by Maven.
system scope.