2 Replies Latest reply on Jun 21, 2012 7:47 AM by komat

    Is there a JBoss AS7 BOM?  Are there libraries exposed outside of jboss-javaee-6.0-with-tools?

    Steven Boscarine Apprentice

      Hello All,

      I need to port an application to JBoss AS7.  I'd like to reuse container libraries, when possible. 


      Is there a BOM that reflects all libraries exposed to an application that's closely tied to the AS server release? 


      Also, if I move from Jboss AS 7.0.0 to 7.1.1, I would love to just change the version number of the BOM and know I am compiling against the correct libraries.  I noticed in the quickstart applications that there's a Java EE 6 BOM:



      Is this a full list of all libraries exposed to an application deployed to JBoss AS 7.1.1? 


      For example, I noticed $JBOSS_HOME/modules/org/apache/commons/lang/main/commons-lang-2.6.jar and my application uses commons-lang.  If commons-lang-2.6 is already exposed to my application, I would like to just use whatever the container provides. 




        • 1. Re: Is there a JBoss AS7 BOM?  Are there libraries exposed outside of jboss-javaee-6.0-with-tools?
          Brian Cowdery Newbie

          I'm not sure about the availability of a BOM, but you might try browsing through the "org.jboss.as" group on the JBoss nexus site (https://repository.jboss.org/nexus/index.html) - jboss-as-parent looks like a likely candidate.


          I use Apache Ivy for my projects, and here's how I've got my dependencies mapped. It was easier with AS 7.0.0 since JBoss provided a jboss-as-api artifact that referenced all of the public API's and classes that came bundled with AS 7.


          <dependency org="org.jboss.as" name="jboss-as-api" rev="7.0.0.Final">


          AS 7.1.1 was trickier since the above api artifact is missing (or maybe it hasn't been built yet?). So for AS 7.1.1 you're forced to reference each dependency you use. This can be a headache when your trying to map dependencies from an existing project, but in the end you'll have a more explicit list of artifacts that your application depends on. It looks like this route will work with all of the JBoss AS6 & 7 releases.


          Start with:


          <dependency org="org.jboss.spec" name="jboss-javaee-6.0" rev="3.0.0.Final" conf="provided"/>

          <dependency org="org.jboss.as" name="jboss-as-spec-api" rev="7.1.1.Final" conf="provided"/>


          And add on modules as you go:


          <dependency org="org.jboss.as" name="jboss-as-spec-api" rev="7.1.1.Final"/>

          <dependency org="org.jboss.as" name="jboss-as-ee" rev="7.1.1.Final"/>

          <dependency org="org.jboss.as" name="jboss-as-web" rev="7.1.1.Final"/>

          <dependency org="org.jboss.as" name="jboss-as-transactions" rev="7.1.1.Final"/>

          <dependency org="org.jboss.as" name="jboss-as-jpa-hibernate4" rev="7.1.1.Final"/>


          If you find a better solution let me know, or better yet, if somone at JBoss can provide an official recommendation?

          • 2. Re: Is there a JBoss AS7 BOM?  Are there libraries exposed outside of jboss-javaee-6.0-with-tools?
            komat Newbie

            Maybe this is what you seek, we use it as bom in our project:




            This is wjat we have in our pom.xml - without the individual dependencies of course:

                    <name>JBoss Repository</name>



            Our dependencies then look like:




            Hope that helps :-)





            [EDIT] here is another link that might give some more info: http://navinpeiris.com/2011/07/19/importing-jboss-7-dependencies-through-maven/