there is a dependency jar which not existing in the maven centre but locally

    <dependency>
      <groupId>routines</groupId>
      <artifactId>routines</artifactId>
      <version>1.0</version>
      <scope>system</scope>
      <systemPath>${basedir}/lib/routines.jar</systemPath>
    </dependency>

after mvn clean install, this dependency jar can't be found from the fat jar. is this an known-issue? the workaround is have to install it into local maven repo with command: mvn install:install-file -Dfile=lib/routines.jar -DgroupId=org.talend -DartifactId=routines -Dversion=1.0 -Dpackaging=jar

then using normal dependency format in the pom.xml like this:

    <dependency>
      <groupId>org.talend</groupId>
      <artifactId>routines</artifactId>
      <version>1.0</version>
    </dependency>

Comment From: philwebb

System dependencies are intentionally excluded from fat JARs since they may be platform specific and are usually provided by the JDK. Here's the relevant section of the Maven docs:

Dependencies with the scope system are always available and are not looked up in repository. They are usually used to tell Maven about dependencies which are provided by the JDK or the VM. Thus, system dependencies are especially useful for resolving dependencies on artifacts which are now provided by the JDK, but where available as separate downloads earlier. Typical example are the JDBC standard extensions or the Java Authentication and Authorization Service (JAAS).

Comment From: pandaadb

This is quite old now, but in case the next person stumbles upon this, you can do what is described here:

https://stackoverflow.com/questions/30207842/add-external-library-jar-to-spring-boot-jar-internal-lib

This options worked for me:

<plugin>
  <groupId>org.springframework.boot</groupId>
  <artifactId>spring-boot-maven-plugin</artifactId>
  <configuration>
    <includeSystemScope>true</includeSystemScope>
  </configuration>
</plugin>

Comment From: vito16

thanks for replay, @pandaadb ,this config worked for me.

Comment From: rakeshskc

@pandaadb, Thanks, It worked for me

Comment From: musindo

works like a charm

Comment From: abramofranchetti

This is quite old now, but in case the next person stumbles upon this, you can do what is described here:

https://stackoverflow.com/questions/30207842/add-external-library-jar-to-spring-boot-jar-internal-lib

This options worked for me:

<plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <configuration> <includeSystemScope>true</includeSystemScope> </configuration> </plugin>

worked for me, thankyou so much

Comment From: joypad

This is quite old now, but in case the next person stumbles upon this, you can do what is described here:

https://stackoverflow.com/questions/30207842/add-external-library-jar-to-spring-boot-jar-internal-lib

This options worked for me:

<plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <configuration> <includeSystemScope>true</includeSystemScope> </configuration> </plugin>

Thank You a lot, this solution is my rescue :-)