title: What's the correct place to put dependency in pom.xml file?
body: <p>This is what my pom.xml looks like</p>
  <pre><code>&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
  &lt;project xmlns=&quot;http://maven.apache.org/POM/4.0.0&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot;
           xsi:schemaLocation=&quot;http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd&quot;&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
      &lt;parent&gt;
          &lt;groupId&gt;stark&lt;/groupId&gt;
          &lt;artifactId&gt;stark-parent&lt;/artifactId&gt;
          &lt;version&gt;1.5.0&lt;/version&gt;
      &lt;/parent&gt;
      &lt;groupId&gt;api&lt;/groupId&gt;
      &lt;artifactId&gt;adapter-mvp&lt;/artifactId&gt;
      &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
      &lt;name&gt;adapter-mvp&lt;/name&gt;
      &lt;description&gt;adapter-mvp grpc service&lt;/description&gt;
      &lt;properties&gt;
          &lt;business-domains-model.version&gt;0.0.9-847a022&lt;/business-domains-model.version&gt;
          &lt;!-- Test dependencies versions--&gt;
          &lt;blockhound.version&gt;1.0.4.RELEASE&lt;/blockhound.version&gt;
          &lt;jacoco.coverage.line&gt;0.1&lt;/jacoco.coverage.line&gt;
          &lt;jacoco.coverage.branch&gt;0.16
          &lt;/jacoco.coverage.branch&gt; 
          &lt;detekt.config&gt;detekt.yml&lt;/detekt.config&gt;
      &lt;/properties&gt;
      &lt;dependencyManagement&gt;      ---------------line 24
          &lt;dependencies&gt;
              &lt;dependency&gt;
                  &lt;groupId&gt;io.projectreactor.tools&lt;/groupId&gt;
                  &lt;artifactId&gt;blockhound&lt;/artifactId&gt;
                  &lt;version&gt;${blockhound.version}&lt;/version&gt;
                  &lt;scope&gt;test&lt;/scope&gt;
              &lt;/dependency&gt;
          &lt;/dependencies&gt;
      &lt;/dependencyManagement&gt;
      &lt;dependencies&gt;
  
          &lt;!-- Test dependencies --&gt; -----------------line 35
         
          &lt;dependency&gt;
              &lt;groupId&gt;jakarta.xml.bind&lt;/groupId&gt;
              &lt;artifactId&gt;jakarta.xml.bind-api&lt;/artifactId&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.glassfish.jaxb&lt;/groupId&gt;
              &lt;artifactId&gt;jaxb-runtime&lt;/artifactId&gt;
              &lt;version&gt;2.3.2&lt;/version&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
              &lt;artifactId&gt;spring-boot-starter-web-services&lt;/artifactId&gt;
              &lt;exclusions&gt;
                  &lt;exclusion&gt;
                      &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
                      &lt;artifactId&gt;spring-boot-starter-tomcat&lt;/artifactId&gt;
                  &lt;/exclusion&gt;
  
                  &lt;exclusion&gt;
                      &lt;groupId&gt;org.jvnet.staxex&lt;/groupId&gt;
                      &lt;artifactId&gt;stax-ex&lt;/artifactId&gt;
                  &lt;/exclusion&gt;
              &lt;/exclusions&gt;
          &lt;/dependency&gt;
  
          &lt;dependency&gt;
              &lt;groupId&gt;io.projectreactor.tools&lt;/groupId&gt;
              &lt;artifactId&gt;blockhound&lt;/artifactId&gt;
              &lt;scope&gt;test&lt;/scope&gt;
          &lt;/dependency&gt;
      &lt;/dependencies&gt;
      &lt;build&gt;
          &lt;finalName&gt;eg-gtp-tax-engine-adapter-mvp&lt;/finalName&gt;
          &lt;sourceDirectory&gt;${project.basedir}/src/main/kotlin&lt;/sourceDirectory&gt;
          &lt;testSourceDirectory&gt;${project.basedir}/src/test/kotlin&lt;/testSourceDirectory&gt;
          &lt;pluginManagement&gt;
              &lt;plugins&gt;
              &lt;/plugins&gt;
          &lt;/pluginManagement&gt;
      &lt;/build&gt;
  &lt;/project&gt;
  
  </code></pre>
  <p>I want add these three dependencies to that pom file, when I put them under line 35, I got error &quot;Cannot resolve com.amazonaws:aws-java-sdk-bom:1.11.974&quot;</p>
  <p>when I put them under line 24, I got error in my code, it seems like I didn't add secretsmanager dependency to that pom, can anyone help me with this issue? What's the correct place to put those dependencies?</p>
  <pre><code>&lt;dependency&gt;
              &lt;groupId&gt;com.amazonaws&lt;/groupId&gt;
              &lt;artifactId&gt;aws-java-sdk-bom&lt;/artifactId&gt;
              &lt;version&gt;1.11.974&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.amazonaws&lt;/groupId&gt;
              &lt;artifactId&gt;aws-java-sdk-core&lt;/artifactId&gt;
              &lt;version&gt;1.11.974&lt;/version&gt;
          &lt;/dependency&gt;
          &lt;dependency&gt;
              &lt;groupId&gt;com.amazonaws&lt;/groupId&gt;
              &lt;artifactId&gt;aws-java-sdk-secretsmanager&lt;/artifactId&gt;
              &lt;version&gt;1.11.974&lt;/version&gt;
          &lt;/dependency&gt;
  
  </code></pre>
  <p>Error</p>
  <pre><code>[WARNING] Rule 0: org.apache.maven.plugins.enforcer.BannedDependencies failed with message:
  | =====================================================================================
  | You have included a banned library, and you need to remove the dependency.
  | It is likely a transitive dependency of another library you have added to this POM,
  | the easiest way for you to determine how the dependency was added is to run:
  |
  | %&gt; mvn dependency:tree -Dverbose=true
  |
  | and scan that output for references to the offending dependency (listed after this
  | message) - you will either need to refactor that dependency to not use the
  | offending library (if you control the source) or to add an exclusion for that
  | library here in this pom (there are numerous examples).
  | ======================================================================================
  Found Banned Dependency: commons-logging:commons-logging:jar:1.1.3
  Use 'mvn dependency:tree' to locate the source of the banned dependencies.
  [INFO] ------------------------------------------------------------------------
  [INFO] BUILD FAILURE
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time:  3.665 s
  [INFO] Finished at: 2021-03-14T22:36:27-07:00
  [INFO] ------------------------------------------------------------------------
  [ERROR] Failed to execute goal org.apache.maven.plugins:maven-enforcer-plugin:3.0.0-M1:enforce (enforce-banned-logging-libraries) on project eg-gtp-tax-engine-adapter-mvp: Some Enforcer rules have failed. Look above for specific messages explaining why the rule failed. -&gt; [Help 1]
  
  
  dependency tree
  
  [INFO] +- com.amazonaws:aws-java-sdk-secretsmanager:jar:1.11.974:compile
  [INFO] |  +- com.amazonaws:aws-java-sdk-core:jar:1.11.974:compile
  [INFO] |  |  +- commons-logging:commons-logging:jar:1.1.3:compile
  [INFO] |  |  +- org.apache.httpcomponents:httpclient:jar:4.5.13:compile
  [INFO] |  |  |  +- org.apache.httpcomponents:httpcore:jar:4.4.14:compile
  [INFO] |  |  |  \- commons-codec:commons-codec:jar:1.15:compile
  [INFO] |  |  +- software.amazon.ion:ion-java:jar:1.0.2:compile
  [INFO] |  |  +- com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:jar:2.11.3:compile
  [INFO] |  |  \- joda-time:joda-time:jar:2.8.1:compile
  [INFO] |  \- com.amazonaws:jmespath-java:jar:1.11.974:compile
  
  
  </code></pre>