4 Replies Latest reply on Mar 7, 2011 6:39 AM by marx3

    POM hell ;)

    marx3 Apprentice

      I'm not good at POM tweaking and so I need some help.
      What's philosophy of defining libraries in POM? Let's say I use last stable JBoss AS 6. As I know it contains many of libraries, mainly Weld.
      So how should I define Weld library in POM?
      In examples I see this:


      Weld documentation says only about examples, but they uses hierarchical POM which isn't good for my app.

      I made an CRUD example from Andy Gibson's archetype and it uses:


      So what should I use?

      Let's look at Seam - Seam bom is nice and clean solution, documentation shows how to use artifacts - perfect :)

      I have also problems with Hibernate/JPA. JPA 2 is part of JBoss AS 6, right? If Hibernate is default implementation in AS, so is Hibernate part of JBoss as it was earlier? Let's say for example Envers - it's part of Hibernate. And if hibernate is part of JBoss, is Envers in JBoss too? So how to define it in POM? Should i declare Hibernate library or not? should it be provided or not?

      JBoss contains outdated Weld library. Is it possible and good idea to update it? And how? Should i pack newest Weld with my app, or change Weld library in JBoss? And now what my POM should contains?

      Next are tests. How to write POM for testable app? Examples uses Selenium (but none documentation about it anywhere). Arqullian works for me. JUnit/TestNG works too. But there is no article/documentation which testing framework should be used. And how to define POM with all those frameworks. We have profiles, but how to use them? Should tests be fired in every deploy, by Hudson/Jenkins? How developers of tests framework/Weld etc advise about it?

        • 1. Re: POM hell ;)
          Ales Justin Master

          Not to sound rude, but this looks like somebody else should do your "homework".

          I'm not saying all of this is trivial either, hence no one knew this the moment he/she set his foot in.

          I suggest you take your time, play with this things step-by-step, and I'm sure a lot of this will answer itself to you.
          Then you are more then welcome to come back and push less general questions.

          • 2. Re: POM hell ;)
            marx3 Apprentice

            so simply question first: how to define pom.xml to use Weld library? Is Andy Gibson's method good (artifact: jboss-javaee-6.0), or maybe weld-core-parent artifact (from examples) is better, or maybe something else?

            • 3. Re: POM hell ;)
              nimo stephan Master

              Hello Marek,

              try this:


              And delete the scope provided, if you want to integrate the lib within your war.

              However, I am not sure, conflicts can occur because of the jboss built in weld. (jar-hell;) So maybe, you have to replace it.

              You can also download and use the jboss-6.1 snapshot version in which the weld-lib is up to date:


              (this works without problems)

              • 4. Re: POM hell ;)
                marx3 Apprentice

                Thanky. I used it together with weld bom file and wverything seems ok. I think it should be mentioned in Weld documentation.