title: Local deploy of Google cloud function fails with "javap -cp: Class not found"
body: <p>Using STS my cloud function works fine locally using the below command:</p>
  <p><code>mvn function:run -Drun.functionTarget=functions.Gcpfunc</code></p>
  <p>However, when doing a local Source or pre-packaged Lite JAR deployment, the build logs on GCP show error at the below stage:</p>
  <pre><code>&quot;builder&quot;: Running &quot;javap -classpath sts2gcphttpfunc-0.0.1-SNAPSHOT.jar functions.Gcpfunc&quot; 
  &quot;builder&quot;: Error: class not found: functions.Gcpfunc. 
  </code></pre>
  <p>However, if I create a function directly on GCP and deploy the same, the above line shows success in the logs.</p>
  <p>My System specs: Java 8, Maven 3.6.3, Windows 8.1
  Attachments: Screenshots of pom.xml, build log error of &quot;Source&quot; and &quot;JAR&quot; deployment</p>
  <p>Command for source deploy:</p>
  <pre><code>gcloud functions deploy Gcpfunction3 --region=us-east1 --entry-point=functions.Gcpfunc --runtime=java11 --trigger-http --allow-unauthenticated
  </code></pre>
  <p>Command for Lite JAR deployment:</p>
  <pre><code>gcloud functions deploy Gcpfunction3 --region=us-east1 --entry-point=functions.Gcpfunc --runtime=java11 --trigger-http --source=target/deployment --allow-unauthenticated
  </code></pre>
  <p><a href="https://i.stack.imgur.com/fu0zN.png" rel="nofollow noreferrer">POM.xml Image</a>
  <a href="https://i.stack.imgur.com/l7S6q.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/l7S6q.png" alt="BuildLog-function deploy from GCP" /></a>
  <a href="https://i.stack.imgur.com/ZZM0E.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/ZZM0E.png" alt="BuildLog-function deploy from localsystem" /></a></p>