title: Maven: 'Package does not exist' (and other errors)
body: <p>I am running several selenium automated tests using Maven.  When I'm debugging in Eclipse, I usually just right click on testing.xml and Run As > TestNG Suite.  But running in Jenkins needs to be ran using <code>mvn test</code>.  But when I run that, I get several errors: </p>
  
  <pre><code>[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.6.1:compile (default-compile) on project ecom: Compilation failure: Compilation failure:
  [ERROR] /Users/kroe761/Documents/workspace/ecom/src/main/java/com/company/automation/ecom/HelperMethods.java:[15,43] package com.company.automation.ecom.pages does not exist
  [ERROR] /Users/kroe761/Documents/workspace/ecom/src/main/java/com/company/automation/ecom/HelperMethods.java:[16,43] package com.company.automation.ecom.pages does not exist
  [ERROR] /Users/kroe761/Documents/workspace/ecom/src/main/java/com/company/automation/ecom/HelperMethods.java:[110,13] cannot find symbol
  [ERROR] symbol:   class Header
  [ERROR] location: class com.company.automation.ecom.HelperMethods
  [ERROR] /Users/kroe761/Documents/workspace/ecom/src/main/java/com/company/automation/ecom/HelperMethods.java:[110,62] cannot find symbol
  [ERROR] symbol:   class Header
  [ERROR] location: class com.company.automation.ecom.HelperMethods
  [ERROR] /Users/kroe761/Documents/workspace/ecom/src/main/java/com/company/automation/ecom/HelperMethods.java:[113,9] cannot find symbol
  [ERROR] symbol:   class SignIn
  [ERROR] location: class com.company.automation.ecom.HelperMethods
  [ERROR] /Users/kroe761/Documents/workspace/ecom/src/main/java/com/company/automation/ecom/HelperMethods.java:[113,58] cannot find symbol
  [ERROR] symbol:   class SignIn
  [ERROR] location: class com.company.automation.ecom.HelperMethods
  </code></pre>
  
  <p>I know the files are present, when I run as TestNG suite everything works with no issues.  Additionally, when I run which <code>java -version</code> I get this:</p>
  
  <pre><code>java version "1.8.0_121"
  Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
  Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)
  </code></pre>
  
  <p>I know it's a configuration issue somewhere, but I don't know enough about maven/java configuration to figure it out.  The files that Maven is telling me are gone are my files, and they are absolutely present.  Here is my pom.xml file:</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;build&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;
                  &lt;version&gt;2.19.1&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;properties&gt;
                          &lt;property&gt;
                              &lt;name&gt;listener&lt;/name&gt;
                              &lt;value&gt;com.kirklands.automation.ecom.retry.MyTestListenerAdapter&lt;/value&gt;
                          &lt;/property&gt;
                      &lt;/properties&gt;
                      &lt;suiteXmlFiles&gt;
                          &lt;suiteXmlFile&gt;testng.xml&lt;/suiteXmlFile&gt;
                      &lt;/suiteXmlFiles&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
                  &lt;version&gt;3.6.1&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;source&gt;1.8&lt;/source&gt;
                      &lt;target&gt;1.8&lt;/target&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/build&gt;
      &lt;groupId&gt;com.kirklands.automation&lt;/groupId&gt;
      &lt;artifactId&gt;ecom&lt;/artifactId&gt;
      &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
      &lt;packaging&gt;jar&lt;/packaging&gt;
      &lt;name&gt;ecom&lt;/name&gt;
      &lt;url&gt;http://maven.apache.org&lt;/url&gt;
      &lt;properties&gt;
          &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
      &lt;/properties&gt;
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.testng&lt;/groupId&gt;
              &lt;artifactId&gt;testng&lt;/artifactId&gt;
              &lt;version&gt;6.8&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.seleniumhq.selenium&lt;/groupId&gt;
              &lt;artifactId&gt;selenium-java&lt;/artifactId&gt;
              &lt;version&gt;3.0.1&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;io.github.bonigarcia&lt;/groupId&gt;
              &lt;artifactId&gt;webdrivermanager&lt;/artifactId&gt;
              &lt;version&gt;1.5.0&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.googlecode.json-simple&lt;/groupId&gt;
              &lt;artifactId&gt;json-simple&lt;/artifactId&gt;
              &lt;version&gt;1.1.1&lt;/version&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>Project Structure:</p>
  
  <pre><code>src/main/java
      {package com.company.automation.ecom}
          CreditCard.java
          HelperMethods.java
  src/test/java
      {package com.company.automation.ecom.pages}
          Header.java
          SignIn.Java
          (etc...)
      {package com.company.automation.ecom.tests}
          HeaderTests.java
          (etc...)
  </code></pre>