I have few system dependencies in my maven project which I have included like this:
<dependency>
<groupId>Com.myCompany</groupId>
<artifactId>myArtifact</artifactId>
<scope>system</scope>
<version>1.0</version>
<systemPath>${project.basedir}\lib\myArtifact-1.0.jar</systemPath>
</dependency>
I am trying to create a executable jar [fat jar] which includes all the required dependencies , so the jar can run standalone .
I am using "maven-assembly-plugin" for packaging in this way:
<plugin>
<artifactId>maven-assembly-plugin<artifactId>
<configuration>
<archive>
<manifest>
<addClasspath>true<addClasspath>
<mainClass>com.mycompany.Application</mainClass>
</manifest>
</archive>
<descriptorRefs>
<descriptorRef>jar-with-dependencies</descriptorRef>
</descriptorRefs>
</configuration>
<executions>
<execution>
<id>jar-with-dependencies</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
The problem is that when the package is created the system dependencies are not included in the jar and I encounter ClassNotFound exceptions while I run it.
Can someone guide me with the correct way of configurations?
Update:
As few people mentioned I could install of the dependencies to local repository . The problem here is that We have a automated build server which gets triggered when ever we commit to the repo. I really don't want to install them on the remote build server.