title: mvn clean install not able to resolve class
body: <p>I have the following maven structure</p>
  
  <pre><code>parent POM.XML
   - common/pom.xml
   - search/pom.xml
  </code></pre>
  
  <p>Search module is not able to get <code>common</code> module classes when i do mvn clean install on <code>search</code> module
  I get <code>package de.test.common does not exists</code>. I even ran <code>mvn clean install</code> on parent platform but no success. <code>common</code> module is building fine.</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;groupId&gt;de.test.search&lt;/groupId&gt;
      &lt;artifactId&gt;search&lt;/artifactId&gt;
      &lt;packaging&gt;jar&lt;/packaging&gt;
      &lt;parent&gt;
          &lt;groupId&gt;de.test.platform&lt;/groupId&gt;
          &lt;artifactId&gt;platform&lt;/artifactId&gt;
          &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
      &lt;/parent&gt;
      &lt;properties&gt;
          &lt;app-name&gt;search&lt;/app-name&gt;
      &lt;/properties&gt;
      &lt;dependencies&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-data-elasticsearch&lt;/artifactId&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;de.test.common&lt;/groupId&gt;
              &lt;artifactId&gt;common&lt;/artifactId&gt;
              &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
      &lt;profiles&gt;
          &lt;profile&gt;
              &lt;id&gt;searchdev&lt;/id&gt;
              &lt;activation&gt;
                  &lt;activeByDefault&gt;true&lt;/activeByDefault&gt;
              &lt;/activation&gt;
              &lt;dependencies&gt;
                  &lt;dependency&gt;
                      &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
                      &lt;artifactId&gt;spring-boot-devtools&lt;/artifactId&gt;
                      &lt;optional&gt;true&lt;/optional&gt;
                  &lt;/dependency&gt;
              &lt;/dependencies&gt;
              &lt;build&gt;
                  &lt;plugins&gt;
                      &lt;plugin&gt;
                          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
                          &lt;artifactId&gt;spring-boot-maven-plugin&lt;/artifactId&gt;
                      &lt;/plugin&gt;
                      &lt;plugin&gt;
                          &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                          &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;
                          &lt;configuration&gt;
                              &lt;skipTests&gt;true&lt;/skipTests&gt;
                          &lt;/configuration&gt;
                      &lt;/plugin&gt;
                  &lt;/plugins&gt;
              &lt;/build&gt;
              &lt;properties&gt;
                  &lt;!-- log configuration --&gt;
                  &lt;logback.loglevel&gt;DEBUG&lt;/logback.loglevel&gt;
              &lt;/properties&gt;
          &lt;/profile&gt;
          &lt;profile&gt;
              &lt;id&gt;searchprod&lt;/id&gt;
              &lt;build&gt;
                  &lt;plugins&gt;
                      &lt;plugin&gt;
                          &lt;groupId&gt;com.heroku.sdk&lt;/groupId&gt;
                          &lt;artifactId&gt;heroku-maven-plugin&lt;/artifactId&gt;
                          &lt;version&gt;1.0.3&lt;/version&gt;
                          &lt;configuration&gt;
                              &lt;appName&gt;${app-name}&lt;/appName&gt;
                          &lt;/configuration&gt;
                      &lt;/plugin&gt;
                      &lt;plugin&gt;
                          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
                          &lt;artifactId&gt;spring-boot-maven-plugin&lt;/artifactId&gt;
                      &lt;/plugin&gt;
                      &lt;plugin&gt;
                          &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                          &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;
                          &lt;configuration&gt;
                              &lt;skipTests&gt;true&lt;/skipTests&gt;
                          &lt;/configuration&gt;
                      &lt;/plugin&gt;
                  &lt;/plugins&gt;
              &lt;/build&gt;
              &lt;properties&gt;
                  &lt;!-- log configuration --&gt;
                  &lt;logback.loglevel&gt;INFO&lt;/logback.loglevel&gt;
              &lt;/properties&gt;
          &lt;/profile&gt;
      &lt;/profiles&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>common pom</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;groupId&gt;de.test.common&lt;/groupId&gt;
      &lt;artifactId&gt;common&lt;/artifactId&gt;
      &lt;packaging&gt;jar&lt;/packaging&gt;
      &lt;parent&gt;
          &lt;groupId&gt;de.test.platform&lt;/groupId&gt;
          &lt;artifactId&gt;platform&lt;/artifactId&gt;
          &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
      &lt;/parent&gt;
      &lt;properties&gt;
          &lt;app-name&gt;common&lt;/app-name&gt;
      &lt;/properties&gt;
      &lt;profiles&gt;
          &lt;profile&gt;
              &lt;id&gt;commondev&lt;/id&gt;
              &lt;activation&gt;
                  &lt;activeByDefault&gt;true&lt;/activeByDefault&gt;
              &lt;/activation&gt;
              &lt;dependencies&gt;
                  &lt;dependency&gt;
                      &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
                      &lt;artifactId&gt;spring-boot-devtools&lt;/artifactId&gt;
                      &lt;optional&gt;true&lt;/optional&gt;
                  &lt;/dependency&gt;
              &lt;/dependencies&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;configuration&gt;
                              &lt;skipTests&gt;true&lt;/skipTests&gt;
                          &lt;/configuration&gt;
                      &lt;/plugin&gt;
                      &lt;plugin&gt;
                          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
                          &lt;artifactId&gt;spring-boot-maven-plugin&lt;/artifactId&gt;
                      &lt;/plugin&gt;
                  &lt;/plugins&gt;
              &lt;/build&gt;
              &lt;properties&gt;
                  &lt;!-- log configuration --&gt;
                  &lt;logback.loglevel&gt;DEBUG&lt;/logback.loglevel&gt;
              &lt;/properties&gt;
          &lt;/profile&gt;
          &lt;profile&gt;
              &lt;id&gt;commonprod&lt;/id&gt;
              &lt;build&gt;
                  &lt;plugins&gt;
                      &lt;plugin&gt;
                          &lt;groupId&gt;com.heroku.sdk&lt;/groupId&gt;
                          &lt;artifactId&gt;heroku-maven-plugin&lt;/artifactId&gt;
                          &lt;version&gt;1.0.3&lt;/version&gt;
                          &lt;configuration&gt;
                              &lt;appName&gt;${app-name}&lt;/appName&gt;
                          &lt;/configuration&gt;
                      &lt;/plugin&gt;
                      &lt;plugin&gt;
                          &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                          &lt;artifactId&gt;maven-surefire-plugin&lt;/artifactId&gt;
                          &lt;configuration&gt;
                              &lt;skipTests&gt;true&lt;/skipTests&gt;
                          &lt;/configuration&gt;
                      &lt;/plugin&gt;
                      &lt;plugin&gt;
                          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
                          &lt;artifactId&gt;spring-boot-maven-plugin&lt;/artifactId&gt;
                      &lt;/plugin&gt;
                  &lt;/plugins&gt;
              &lt;/build&gt;
              &lt;properties&gt;
                  &lt;!-- log configuration --&gt;
                  &lt;logback.loglevel&gt;INFO&lt;/logback.loglevel&gt;
              &lt;/properties&gt;
          &lt;/profile&gt;
      &lt;/profiles&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/NqjcN.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NqjcN.png" alt="enter image description here"></a></p>
  
  <p>I think i have the same problem mentioned here </p>
  
  <p><a href="https://stackoverflow.com/questions/1589121/maven-compilation-failure">maven compilation failure</a></p>
  
  <p>Found the problem but not the cause</p>
  
  <p><strong><em>I removed the following dependency and everything is okay</em></strong></p>
  
  <pre><code>          &lt;plugin&gt;
                  &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
                  &lt;artifactId&gt;spring-boot-maven-plugin&lt;/artifactId&gt;
              &lt;/plugin&gt;
  </code></pre>
  
  <p>after removing the plugin the jar is build in a different structure. When spring boot plugin was there the whole content was inside BOOT-INF folder which i think was the cause, not sure though... need expert opinion here.</p>