title: Cloud Build Error: "Unknown lifecycle phase "/root/.m2""
body: <p>I'm trying to set up a CI/CD pipeline with a Java Micronaut Application.</p>
  <p>I'm using Cloud Build to build the Docker Image and ship it off to GCR</p>
  <p>Locally, I used the following command to build the image and ship it off:</p>
  <pre><code>./mvnw deploy -Dpackaging=docker -Djib.from.image=openjdk -Djib.to.image=gcr.io/PROJECT_ID/IMAGE_NAME:latest
  </code></pre>
  <p>This works all fine, very happy with this approach. The issue is putting this approach into the CI/CD pipeline.</p>
  <p>Here is my <code>cloudbuild.yaml</code> config</p>
  <pre><code>steps:
    - id: &quot;Build image and push to GCR&quot;
      name: maven:3-jdk-8
      entrypoint: &quot;./mvnw&quot;
      args: [
        &quot;deploy&quot;,
        &quot;-Dpackaging=docker&quot;,
        &quot;-Djib.from.image=openjdk&quot;,
        &quot;-Djib.to.image=gcr.io/PROJECT_ID/IMAGE_NAME:latest&quot;
      ]
  </code></pre>
  <p>But I am getting the following error:</p>
  <p><code>[ERROR] Unknown lifecycle phase &quot;/root/.m2&quot;. </code></p>
  <p>Can anyone provide a bit of insight into how I can get around this error?</p>