title: Java web app on Heroku: Unable to access jarfile
body: <p>I'm trying to deploy my Java Spring Boot web application to Heroku.</p>
  
  <p>To launch it locally I run:</p>
  
  <p><code>mvn install</code></p>
  
  <p>and then</p>
  
  <p><code>java $JAVA_OPTS -jar target/*.war</code></p>
  
  <p>So for Heroku I've created the Procfile:
  <code>web: java $JAVA_OPTS -jar target/*.war</code></p>
  
  <p>I use Heroku Github integration and the application is deployed to Heroku from Github. So I just push it there.</p>
  
  <p>But the application doesn't launch.</p>
  
  <p><code>heroku logs --app myapp</code> gives me: </p>
  
  <pre><code>2015-09-09T21:53:25.581128+00:00 heroku[web.1]: Starting process with command `java $JAVA_OPTS -jar target/*.war`
  2015-09-09T21:53:27.110820+00:00 app[web.1]: Error: Unable to access jarfile target/*.war`
  </code></pre>
  
  <p><code>heroku run bash --app myapp</code> with <code>ls -a</code> doesn't show <code>target</code> directory.</p>
  
  <p>I think Heroku doesn't build the app. <strong>But what am I doing wrong?</strong> Thanks in advance for you advices!</p>