I got a maven project with some third-party dependencies, wich later are provided automatically to my application, and thus may not be included into my JAR.
Additionally I got some other dependencies, wich are my own libraries and are only available locally outside of an repository. So I created a local repo:
<!-- local repo -->
<repository>
<id>local-maven-repo</id>
<url>file:///${project.basedir}/lib</url>
</repository>
I then added the dependency as usual:
<dependency>
<groupId>de.cydhra</groupId>
<artifactId>ABCommands</artifactId>
<version>1.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
When I remember the maven spec correctly, the dependency should now be included into my JAR, because the scope is "compile" (I've also tried runtime: same result). But the dependency is completly ignored when running "mvn package".
Again: I do not want to know, how to INCLUDE dependencies into my project, but how to COMPILE them into the finished App.
I currently use the maven-compiler plugin to generate my jar. While googling, I've heard about the maven jar plugin, wich has an option to "include classpath", which writes my dependencies into the manifest and nothing further, well thanks. Furthermore the maven assembly plugin can generate a jar-with-dependencies, which contains ALL of my dependencies, also those, which should be provided. So what am I missing?