This happens because of <scope>system</scope>
. It's telling Maven that the library is gonna be loaded in the system.
To fix this issue, one thing you can do is generate a jar with all dependencies included using Maven plugin
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<archive>
<manifest>
<mainClass>your.main.class.here</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
<executions>
<execution>
<id>make-assembly</id> <!-- this is used for inheritance merges -->
<phase>package</phase> <!-- bind to the packaging phase -->
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
That plugin will generate a bigger jar than usual containing all the dependencies in it.
Now it's just simple as running the jar with java -jar file.jar