title: How to configure multi module spring application
body: <p>Here is my project structure : </p>
  
  <p><a href="https://i.stack.imgur.com/wS85Z.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wS85Z.png" alt="enter image description here"></a></p>
  
  <p>I have two spring-boot modules. In auth module I implement spring security. And I have Auth controller that allows us to sign up and sign in(returns jwt token).
  In account-management module I want to get user profile and I should use auth module. I should have different databases.</p>
  
  <p>Here is my parent pom : </p>
  
  <pre><code> &lt;groupId&gt;com.social.network&lt;/groupId&gt;
  &lt;artifactId&gt;social-network&lt;/artifactId&gt;
  &lt;packaging&gt;pom&lt;/packaging&gt;
  &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
  &lt;modules&gt;
      &lt;module&gt;social-network-auth&lt;/module&gt;
      &lt;module&gt;social-network-account-management&lt;/module&gt;
  &lt;/modules&gt;
  
  &lt;parent&gt;
      &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
      &lt;artifactId&gt;spring-boot-starter-parent&lt;/artifactId&gt;
      &lt;version&gt;2.0.4.RELEASE&lt;/version&gt;
      &lt;relativePath/&gt; &lt;!-- lookup parent from repository --&gt;
  &lt;/parent&gt;
  
  &lt;build&gt;
      &lt;pluginManagement&gt;
          &lt;plugins&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&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;/pluginManagement&gt;
  &lt;/build&gt;
  </code></pre>
  
  <p>Here is auth module's pom : </p>
  
  <pre><code>    &lt;groupId&gt;com.social.network.auth&lt;/groupId&gt;
      &lt;artifactId&gt;social-network-auth&lt;/artifactId&gt;
      &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
      &lt;packaging&gt;jar&lt;/packaging&gt;
  
      &lt;name&gt;social-network-auth&lt;/name&gt;
      &lt;description&gt;Authentication module for SocialNetwork&lt;/description&gt;
  
      &lt;parent&gt;
          &lt;groupId&gt;com.social.network&lt;/groupId&gt;
          &lt;artifactId&gt;social-network&lt;/artifactId&gt;
          &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
          &lt;!--&lt;relativePath&gt;../pom.xml&lt;/relativePath&gt;--&gt;
      &lt;/parent&gt;
  
      &lt;properties&gt;
          &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
          &lt;project.reporting.outputEncoding&gt;UTF-8&lt;/project.reporting.outputEncoding&gt;
          &lt;java.version&gt;1.8&lt;/java.version&gt;
          &lt;jwt.version&gt;0.6.0&lt;/jwt.version&gt;
          &lt;swagger.version&gt;2.7.0&lt;/swagger.version&gt;
      &lt;/properties&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;/plugins&gt;
      &lt;/build&gt;
  </code></pre>
  
  <p>And here is my account-management's pom</p>
  
  <pre><code>&lt;groupId&gt;com.social.network.account.management&lt;/groupId&gt;
  &lt;artifactId&gt;social-network-account-management&lt;/artifactId&gt;
  &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
  &lt;packaging&gt;jar&lt;/packaging&gt;
  
  &lt;name&gt;social-network-account-management&lt;/name&gt;
  &lt;description&gt;Account management module for SocialNetwork&lt;/description&gt;
  
  &lt;parent&gt;
      &lt;groupId&gt;com.social.network&lt;/groupId&gt;
      &lt;artifactId&gt;social-network&lt;/artifactId&gt;
      &lt;version&gt;1.0-SNAPSHOT&lt;/version&gt;
      &lt;!--&lt;relativePath&gt;../pom.xml&lt;/relativePath&gt;--&gt;
  &lt;/parent&gt;
  
  &lt;properties&gt;
      &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
      &lt;project.reporting.outputEncoding&gt;UTF-8&lt;/project.reporting.outputEncoding&gt;
      &lt;java.version&gt;1.8&lt;/java.version&gt;
  &lt;/properties&gt;
  
  &lt;dependencies&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.social.network.auth&lt;/groupId&gt;
          &lt;artifactId&gt;social-network-auth&lt;/artifactId&gt;
          &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&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;/plugins&gt;
  &lt;/build&gt;
  </code></pre>
  
  <p></p>
  
  <p>I want to run all my modules. </p>
  
  <p><a href="https://i.stack.imgur.com/DnXFk.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DnXFk.png" alt="enter image description here"></a></p>
  
  <p>But build fails. I am getting Failed to execute goal org.apache.maven.plugins:maven-deploy-plugin:2.8.2:deploy (default-deploy) on project egs-social-network: Deployment failed: repository element was not specified in the POM inside distributionManagement element or in -DaltDeploymentRepository=id::layout::url parameter -> [Help 1]</p>