title: Add external library .jar to Spring boot .jar internal /lib
body: <p>I have an external .jar that cannot be imported from public repositories using pom.xml, it's <code>sqljdbc41.jar</code>.</p>
  
  <p>I can run the project locally from my IDE, and everything will work. I referenced the library after downloading it like so:</p>
  
  <pre><code>&lt;dependency&gt;
      &lt;groupId&gt;com.microsoft.sqlserver&lt;/groupId&gt;
      &lt;artifactId&gt;sqljdbc41&lt;/artifactId&gt;
      &lt;version&gt;4.1&lt;/version&gt;
      &lt;scope&gt;system&lt;/scope&gt;
      &lt;systemPath&gt;${basedir}/lib/sqljdbc41.jar&lt;/systemPath&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p>When I run <code>mvn clean package</code> to create my .jar file and try to run the created .jar, a mistake will pop up, which mentions the SQL Server references are not valid. I then extracted my .jar file and true enough, everything that is referenced in the <code>pom.xml</code> file properly gets downloaded and added, however, my SQL Server does not.</p>
  
  <p>I can, in a very hacky way* just manually add the <code>sqljdbc41.jar</code> to my /lib folder after it's been compiled as a .jar, and it'll work, however that seems highly unoptimal. What would be a better approach?</p>
  
  <hr>
  
  <p>*Opening the .jar file with Winrar, going to the /lib folder, manually selecting my <code>sqljdbc41.jar</code> file, then make sure to select the No Compression option bottom left where Winrar gives you compression options, in case you find this by Google and no one answered.</p>