title: Jboss: How do I add Maven Dependencies required for JBoss AS 7 in a Spring Boot Application
body: <p>I am trying to deploy my Spring Boot war file in JBoss AS (7.1.0. Final). 
  In the readme.txt inside JBoss, its mentioned as follows:</p>
  
  <pre><code>"Maven users should not use this jar, but should use the following BOM dependencies instead
  
  &lt;dependencies&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.jboss.as&lt;/groupId&gt;
          &lt;artifactId&gt;jboss-as-ejb-client-bom&lt;/artifactId&gt;
          &lt;type&gt;pom&lt;/type&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.jboss.as&lt;/groupId&gt;
          &lt;artifactId&gt;jboss-as-jms-client-bom&lt;/artifactId&gt;
          &lt;type&gt;pom&lt;/type&gt;
      &lt;/dependency&gt;
  &lt;/dependencies&gt;
  
  This is because using maven with a shaded jar has a very high chance of causing class version conflicts, which is why we do not publish this jar to the maven repository."
  </code></pre>
  
  <p>I have tried giving the URL for all these dependencies, but not able to resolve them successfully. </p>
  
  <p>POM.xml</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &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;!-- JBOSS AS 7 Maven Dependencies --&gt;
  &lt;repositories&gt;
      &lt;repository&gt;
          &lt;id&gt;jboss-enterprise-techpreview-group&lt;/id&gt;
          &lt;name&gt;JBoss Enterprise Technology Preview  Maven Repository Group&lt;/name&gt;
          &lt;url&gt;http://maven.repository.redhat.com/techpreview/all/&lt;/url&gt;
          &lt;layout&gt;default&lt;/layout&gt;
          &lt;releases&gt;
              &lt;enabled&gt;true&lt;/enabled&gt;
              &lt;updatePolicy&gt;never&lt;/updatePolicy&gt;
          &lt;/releases&gt;
          &lt;snapshots&gt;
              &lt;enabled&gt;true&lt;/enabled&gt;
              &lt;updatePolicy&gt;never&lt;/updatePolicy&gt;
          &lt;/snapshots&gt;
      &lt;/repository&gt;
      &lt;repository&gt;
          &lt;id&gt;spring-snapshots&lt;/id&gt;
          &lt;url&gt;http://repo.spring.io/snapshot&lt;/url&gt;
          &lt;snapshots&gt;&lt;enabled&gt;true&lt;/enabled&gt;&lt;/snapshots&gt;
      &lt;/repository&gt;
      &lt;repository&gt;
          &lt;id&gt;spring-milestones&lt;/id&gt;
          &lt;url&gt;http://repo.spring.io/milestone&lt;/url&gt;
      &lt;/repository&gt;
  &lt;/repositories&gt;
  &lt;pluginRepositories&gt;
      &lt;pluginRepository&gt;
          &lt;id&gt;jboss-public-repository-group&lt;/id&gt;
          &lt;name&gt;JBoss Public Maven Repository Group&lt;/name&gt;
          &lt;url&gt;https://repository.jboss.org/nexus/content/groups/public-jboss/&lt;/url&gt;
          &lt;layout&gt;default&lt;/layout&gt;
          &lt;releases&gt;
              &lt;updatePolicy&gt;never&lt;/updatePolicy&gt;
          &lt;/releases&gt;
          &lt;snapshots&gt;
              &lt;updatePolicy&gt;never&lt;/updatePolicy&gt;
          &lt;/snapshots&gt;
      &lt;/pluginRepository&gt;
      &lt;pluginRepository&gt;
          &lt;id&gt;spring-snapshots&lt;/id&gt;
          &lt;url&gt;http://repo.spring.io/snapshot&lt;/url&gt;
      &lt;/pluginRepository&gt;
      &lt;pluginRepository&gt;
          &lt;id&gt;spring-milestones&lt;/id&gt;
          &lt;url&gt;http://repo.spring.io/milestone&lt;/url&gt;
      &lt;/pluginRepository&gt;
  &lt;/pluginRepositories&gt;
  
  &lt;groupId&gt;com.demo&lt;/groupId&gt;
  &lt;artifactId&gt;SpringBoot&lt;/artifactId&gt;
  &lt;version&gt;0.0.1-SNAPSHOT&lt;/version&gt;
  &lt;packaging&gt;war&lt;/packaging&gt;
  
  &lt;name&gt;SpringBootDemo&lt;/name&gt;
  &lt;description&gt;Demo project for Spring Boot&lt;/description&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;1.3.8.RELEASE&lt;/version&gt;
      &lt;relativePath/&gt; &lt;!-- lookup parent from repository --&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;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-actuator&lt;/artifactId&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-web&lt;/artifactId&gt;
      &lt;/dependency&gt;
  
      &lt;dependency&gt;
          &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
          &lt;artifactId&gt;spring-boot-starter-test&lt;/artifactId&gt;
          &lt;scope&gt;test&lt;/scope&gt;
      &lt;/dependency&gt;
  
      &lt;!-- JBOSS AS 7 Maven Dependencies --&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;org.jboss.as&lt;/groupId&gt;
          &lt;artifactId&gt;jboss-as-jms-client-bom&lt;/artifactId&gt;
          &lt;version&gt;jboss-as-7.1.0.Final&lt;/version&gt;
          &lt;type&gt;pom&lt;/type&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;
  &lt;/project&gt;
  </code></pre>
  
  <p>While building the Spring Boot App using Maven, I get the following error:</p>
  
  <blockquote>
    <p>[ERROR] Failed to execute goal on project SpringBoot: Could not
    resolve dependencies for project
    com.demo:SpringBoot:war:0.0.1-SNAPSHOT: Failed to collect dependencies
    for
    [org.springframework.boot:spring-boot-starter-actuator:jar:1.3.8.RELEASE
    (compile),
    org.springframework.boot:spring-boot-starter-web:jar:1.3.8.RELEASE
    (compile),
    org.springframework.boot:spring-boot-starter-test:jar:1.3.8.RELEASE
    (test), com.teamcenter.HelloTeamcenter:HelloTeamcenter:jar:1.0
    (compile),
    org.jboss.as:jboss-as-jms-client-bom:pom:jboss-as-7.1.0.Final
    (compile)]: Failed to read artifact descriptor for
    org.jboss.as:jboss-as-jms-client-bom:pom:jboss-as-7.1.0.Final: Could
    not transfer artifact
    org.jboss.as:jboss-as-jms-client-bom:pom:jboss-as-7.1.0.Final from/to
    jboss-enterprise-techpreview-group
    (<a href="http://maven.repository.redhat.com/techpreview/all/" rel="nofollow">http://maven.repository.redhat.com/techpreview/all/</a>): Access denied
    to
    <a href="http://maven.repository.redhat.com/techpreview/all/org/jboss/as/jboss-as-jms-client-bom/jboss-as-7.1.0.Final/jboss-as-jms-client-bom-jboss-as-7.1.0.Final.pom" rel="nofollow">http://maven.repository.redhat.com/techpreview/all/org/jboss/as/jboss-as-jms-client-bom/jboss-as-7.1.0.Final/jboss-as-jms-client-bom-jboss-as-7.1.0.Final.pom</a>.
    Error code 403, Proxy Unacknowledged -> [Help 1]</p>
  </blockquote>
  
  <p>Please let me know what I am missing?</p>
  
  <p>Thanks in Advance</p>
  
  <p><em>UPDATE</em></p>
  
  <p>I have given maven URL also, but no luck:</p>
  
  <pre><code>     &lt;repository&gt;
          &lt;id&gt;central&lt;/id&gt;
          &lt;name&gt;Maven Repository Group&lt;/name&gt;
          &lt;url&gt;https://repo1.maven.org/maven2&lt;/url&gt;
          &lt;layout&gt;default&lt;/layout&gt;
          &lt;releases&gt;
              &lt;enabled&gt;true&lt;/enabled&gt;
          &lt;/releases&gt;
          &lt;snapshots&gt;
              &lt;enabled&gt;true&lt;/enabled&gt;
          &lt;/snapshots&gt;
      &lt;/repository&gt;
  </code></pre>