title: what is the difference between compile test and clean install in maven
body: <p>I am using the rest-assured library to automate API's.</p>
  
  <p>I was struggling from yesterday. </p>
  
  <p>I was getting error with clean install like below:</p>
  
  <blockquote>
    <p>[ERROR] Failed to execute goal
    org.apache.maven.plugins:maven-compiler-plugin:3.6.1:compile
    (default-compile) on project rest-assuredProject: Compilation failure:
    Compilation failure: [ERROR]
    /D:/Workspace/rest-assuredMaven/src/basics/twitterAPI.java:[12,22]
    package io.restassured does not exist [ERROR]
    /D:/Workspace/rest-assuredMaven/src/basics/twitterAPI.java:[14,31]
    package io.restassured.response does not exist [ERROR]
    /D:/Workspace/rest-assuredMaven/src/basics/twitterAPI.java:[16,29]
    cannot find symbol [ERROR] symbol:   class RestAssured</p>
  </blockquote>
  
  <p>Today I refer a below stack thread</p>
  
  <p><a href="https://stackoverflow.com/questions/20345451/maven-compilation-error-package-org-testng-annotations-does-not-exist">Maven Compilation error [package org.testng.annotations does not exist]</a></p>
  
  <p>one of the answers said to use <strong>compile test</strong> instead of <strong>clean install</strong>.
  And guess what it started working. even just <strong>test</strong> is working fine. Now I have query that why it is happening</p>
  
  <p>I have observed that their are some static import present in the script. 
  Example:</p>
  
  <pre><code>import static io.restassured.RestAssured.given;
  import static org.hamcrest.Matchers.equalTo;
  </code></pre>
  
  <p>Is it due to same?</p>
  
  <p>Also, Let me know if I need to improvise it further more</p>