7 Replies Latest reply on Jul 13, 2007 10:34 AM by pgier

    JBoss/JCA Maven Build

    weston.price

      The next rev of JBoss/JCA should use Maven for it's build system. I have created a new project structure based on Maven using the parent/child POM relationship as:

      jboss-jca
       -->pom.xml
       -->core
       -->pom.xml
       -->src
       -->adapter
       -->pom.xml
       -->src
      


      This is fine and I am able to fetch my dependencies from our repository, compile, etc. However, I am starting to run into problems when wanting to construct multiple JAR(s) from a single project (pom.xml). I simply want to split the artifacts of core into multiple artificacts ie

       jboss-jca-spi.jar
       jboss-jca-plugin.jar
      


      Since I have a dependency on the MC and I want the new JCA stuff to be a top level project in JBossSVN, could we use the new JCA stuff as testbed for the new build/plugin process? It would seem to make some sense as this is a fundamental piece of JBoss5 that is going to be ripped out and made a standalone module much in the same manner of messaging, aop etc.




        • 1. Re: JBoss/JCA Maven Build
          starksm64

          This is the same type of structure that the mc project needs as well:
          http://www.jboss.com/index.html?module=bb&op=viewtopic&t=96393

          There we will have to split up the projects along the lines of spi/impl/test to work with the maven constructs. I'll ask Paul to comment further on what can be done short of that. Either a custom jar plugin that supports spi/impl notions, or the use of ant to build the jars would be needed otherwise.

          • 2. Re: JBoss/JCA Maven Build
            weston.price

            Cool. Sounds like we are heading in the right direction. Note, the JCA stuff is at a point that includes enough to where it can be checked into SVN as a top level project. Might help in proving out some of the new build stuff.

            • 3. Re: JBoss/JCA Maven Build
              pgier

               

              "scott.stark@jboss.org" wrote:
              Either a custom jar plugin that supports spi/impl notions, or the use of ant to build the jars would be needed otherwise.


              I think that pretty much sums up our options
              1 - Break into separate projects
              2 - Create maven plugin to generate artifacts
              3 - use ant to build the jars

              The first option is obviously the easiest for me, but I think it is the best choice.
              The second option will bring up some other issues if we start changing the names of artifacts. For example how will the artifacts be structured in the repository? If we just have two separate jars, it will be more complicated for projects that might depend on just the spi.
              The third option will create a mix of ant and maven which is not ideal.


              • 4. Re: JBoss/JCA Maven Build
                vickyk

                The Maven Build for the jboss-jca is dependent on the jboss-microcontainer , I don't see the jboss-microcontainer.jar at
                http://repository.jboss.com/maven2/jboss/jboss-microcontainer/2.0.0-SNAPSHOT/
                Looks like it is missing .

                • 5. Re: JBoss/JCA Maven Build

                  Snapshots are no longer in the main repository.
                  And the jar is called jboss-kernel.jar now.

                  It's only dependent on the MC for configuring the tests.

                  • 6. Re: JBoss/JCA Maven Build
                    vickyk

                     

                    "pgier" wrote:

                    I think that pretty much sums up our options
                    1 - Break into separate projects
                    2 - Create maven plugin to generate artifacts
                    3 - use ant to build the jars

                    The Option 1 looks simpler , so I continue with it . I separated the projects as
                    jboss-jca
                     ------->pom.xml
                     ------>core
                     ---------->jbossjcacore-impl
                     ------->src
                     ------->pom.xml
                     ---------->jbossjcacore-spi
                     ------->src
                     ------->pom.xml
                     ---------->pom.xml
                     ------->adapter
                     -->src
                     -->pom.xml

                    Now building of the jbossjcacore-impl needs the jbossjcacore-spi generated jar file . I wanted to know if I can use the generated spi.jar SNAPSHOT from the local system , using server to download it through depends would work ... I wanted to know if I can use it locally .

                    • 7. Re: JBoss/JCA Maven Build
                      pgier

                       

                      "vickyk" wrote:

                      Now building of the jbossjcacore-impl needs the jbossjcacore-spi generated jar file . I wanted to know if I can use the generated spi.jar SNAPSHOT from the local system , using server to download it through depends would work ... I wanted to know if I can use it locally .


                      Yes, you can use it from your local system without uploading to the repository server. When you do a "mvn install" the jar gets installed into your local repository. You will still have to specify it as a dependency, but if maven finds it locally, it won't go to the server to get it.