title: Payara micro error: In TLD scanning, the supplied resource file does not exist
body: <p>The App is a hello world created with the NetBeans Payara Micro plugin: it contains nothing but an index.html and a main class that writes "hello world".</p>
  
  <p>I added a dependency in the POM to check that external libraries are handled correctly. I don't want an uber jar so my POM places the libs in a <code>/lib</code> folder inside the <code>/target</code> folder</p>
  
  <p>I build the app in NetBeans then open a shell in the <code>/target</code> folder, deploying with:</p>
  
  <pre><code>java -jar ../payara-micro-5.183.jar myApp.war --addLibs lib/
  </code></pre>
  
  <p>(following <a href="https://docs.payara.fish/documentation/payara-micro/adding-jars.html" rel="nofollow noreferrer">this doc on adding jar files in deployment</a>)</p>
  
  <p>The server launches and the app deploys, but the external libs are missing:</p>
  
  <pre><code>  PWC6351: In TLD scanning, the supplied resource file:/C:/Users/LEVALL~1/AppData/Local/Temp/payaramicro-rt8447922723645389161tmp/applications/lib/utils-1.0.jar does not exist
  java.io.FileNotFoundException: C:\Users\LEVALL~1\AppData\Local\Temp\payaramicro-rt8447922723645389161tmp\applications\lib\utils-1.0.jar (Le chemin dÆaccÞs spÚcifiÚ est introuvable)
          at java.util.zip.ZipFile.open(Native Method)
          at java.util.zip.ZipFile.&lt;init&gt;(Unknown Source)
          at java.util.zip.ZipFile.&lt;init&gt;(Unknown Source)
          at java.util.jar.JarFile.&lt;init&gt;(Unknown Source)
  </code></pre>
  
  <p>The POM for reference:</p>
  
  
  
  <pre><code>&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
      &lt;groupId&gt;net.clementlevallois&lt;/groupId&gt;
      &lt;artifactId&gt;qof-back-email&lt;/artifactId&gt;
      &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
      &lt;packaging&gt;war&lt;/packaging&gt;
  
      &lt;name&gt;qof-back-email&lt;/name&gt;
  
      &lt;properties&gt;
          &lt;endorsed.dir&gt;${project.build.directory}/endorsed&lt;/endorsed.dir&gt;
          &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
          &lt;version.javaee&gt;8.0&lt;/version.javaee&gt;
          &lt;version.payara&gt;5.183&lt;/version.payara&gt;
          &lt;version.microprofile&gt;2.0.1&lt;/version.microprofile&gt;
      &lt;/properties&gt;
  
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;${project.groupId}&lt;/groupId&gt;
              &lt;artifactId&gt;utils&lt;/artifactId&gt;
              &lt;version&gt;1.0&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;javax&lt;/groupId&gt;
              &lt;artifactId&gt;javaee-web-api&lt;/artifactId&gt;
              &lt;version&gt;${version.javaee}&lt;/version&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.eclipse.microprofile&lt;/groupId&gt;
              &lt;artifactId&gt;microprofile&lt;/artifactId&gt;
              &lt;version&gt;${version.microprofile}&lt;/version&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
              &lt;type&gt;pom&lt;/type&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  
      &lt;build&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-war-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.3&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;packagingExcludes&gt;WEB-INF/lib/*.jar&lt;/packagingExcludes&gt;
                      &lt;failOnMissingWebXml&gt;false&lt;/failOnMissingWebXml&gt;
                      &lt;archive&gt;
                          &lt;manifest&gt;
                              &lt;addClasspath&gt;true&lt;/addClasspath&gt;
                              &lt;classpathPrefix&gt;lib/&lt;/classpathPrefix&gt;
                              &lt;mainClass&gt;net.clementlevallois.qof.back.email.Controller&lt;/mainClass&gt;
                          &lt;/manifest&gt;
                      &lt;/archive&gt;
  
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;artifactId&gt;maven-dependency-plugin&lt;/artifactId&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;phase&gt;install&lt;/phase&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;copy-dependencies&lt;/goal&gt;
                          &lt;/goals&gt;
                          &lt;configuration&gt;
                              &lt;outputDirectory&gt;${project.build.directory}/lib&lt;/outputDirectory&gt;                            
                          &lt;/configuration&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
  
  &lt;/project&gt;
  </code></pre>