7 Replies Latest reply on May 29, 2006 7:06 AM by eekboom

    Seam and IntelliJ IDEA packing

    Ales Justin Master

      Is there a way to package all those jBPM dependant xml descriptors directly into EAR's archive root - the way it is packaged now in the dvdstore example?

      <app-with-seam-and-jbpm>.ear
      - META-INF/application.xml
      - META-INF/jboss-app.xml
      - pageflow.jpdl.xml
      - jbpm.cfg.xml
      - hibernate.cfg.xml //H3 cfg for jbpm
      - jboss-seam.jar
      - jbpm-3.1.jar
      - mybusiness.jar //ejb3 stuff
      - myweb.war
      - manifest.mf
      - ...

      With IDEA built 5.1.1 there is no problem packaging ejb3/seam apps, but I just don't see the way how to include those jBPM xml files into this IDEA ear module build.

      Rgds, Ales

        • 1. Re: Seam and IntelliJ IDEA packing
          Gavin King Master

          Packaging of jPDL files is a really good question, and one I don't have a good answer for yet.

          I was thinking of zipping em up into a jar, putting that in the EAR, and naming it as a java module in application.xml.

          • 2. Re: Seam and IntelliJ IDEA packing
            Ales Justin Master

            >> I was thinking of zipping em up into a jar, putting that in the EAR, and naming it as a java module in application.xml

            Hmmm ...
            Since I believe you can only add ejb and web modules into ear module.
            And application.xml only excepts ejb and web tag inside module tag.

            So, I can add a new java module - and have all my jBPM xml files in it.
            Then use this module in my ejb module as dependency - pack it as 'JAR module, link via manifest' and this jar will copy into EAR root.

            I tried it and it works.

            Rgds, Ales

            • 3. Re: Seam and IntelliJ IDEA packing
              Gavin King Master

               

              And application.xml only excepts ejb and web tag inside module tag.


              This is not correct. application.xml accepts java modules.

              • 4. Re: Seam and IntelliJ IDEA packing
                Ales Justin Master

                 


                This is not correct. application.xml accepts java modules.


                Great. So how do I define them?

                Any thoughts why then IDEA doesn't support this in application.xml?


                I was thinking of zipping em up into a jar, putting that in the EAR


                How do you this for java module?
                Ok, you can select an option in a menu to jar ceratin module - can you do this also for a module/app build?

                Rgsd, Ales

                • 5. Re: Seam and IntelliJ IDEA packing
                  Gavin King Master

                  There is an example of this in every single seam example:

                  <application>
                   <display-name>Seam Blog</display-name>
                  
                   <module>
                   <web>
                   <web-uri>jboss-seam-blog.war</web-uri>
                   <context-root>/seam-blog</context-root>
                   </web>
                   </module>
                   <module>
                   <ejb>jboss-seam-blog.jar</ejb>
                   </module>
                   <module>
                   <java>jboss-seam.jar</java>
                   </module>
                  </application>


                  • 6. Re: Seam and IntelliJ IDEA packing
                    Ales Justin Master

                     

                    <module>
                     <java>jboss-seam.jar</java>
                     </module>
                    


                    How to get IDEA to 'grab' this jar and pack it into ear?

                    If I do it this way (although it looks that is works - is this 'correct' way to add resources to application)

                    So, I can add a new java module - and have all my jBPM xml files in it.
                    Then use this module in my ejb module as dependency - pack it as 'JAR module, link via manifest' and this jar will copy into EAR root.


                    should I still define java module in application.xml?

                    Or if I just define it in application.xml, do I still need manifest.mf in jar?

                    Sorry about this

                    There is an example of this in every single seam example


                    didn't pay much attention to this, since I though IDEA handles everything.


                    • 7. Re: Seam and IntelliJ IDEA packing
                      eekboom Newbie

                      I once posted this question (in a different context) to the IDEA EAP forum.
                      There is a very un-obvious way to make Idea do this.
                      See
                      http://www.intellij.net/forums/thread.jspa?messageID=5081712