7 Replies Latest reply on Jan 20, 2010 7:40 PM by Aaron Walker

    Mavenizing Hornetq

    Clebert Suconic Master

      Continuing a discussions started here:

       

      http://community.jboss.org/thread/146971?tstart=0

       

       

      I also think it would be much better to have maven.

       

      One problem we have, is that we have a single source tree, and maven requires multiple source trees.

       

      Well.. I think it would be better to have multiple trees anyway. (Better isolation and making sure the dependencies are correct). Andy has done some work to verify the dependencies are correct, but I think it's possible to hack and cheat wrong dependencies around it.

       

      There is a way to create maven sub-projects without changing the source tree. There is an example on maven, and that could be a start at least.

        • 1. Re: Mavenizing Hornetq
          Andy Taylor Master
          Its not just creating sub projects for each artifact (each jar we have) that would have to be done. Each sub project would need its own tests, so we wouls need to refactor all the tests into the appropriate sub project. After that how would we mavenize the distro, would that have to be the parent pom with the jar artifacts as its children. If we do it its a major re structuring of our build.
          • 2. Re: Mavenizing Hornetq
            Clebert Suconic Master

            I woud keep the tests as they are now. Maybe create a test maven subproject, just like it's done at the application server.

             

            The distribution could also be a sub project with ant-tasks with the dependencies automated by maven.

             

             

            One issue we will have is to manage dependencies for AS6 or AS5, as they're different. We will need probably profiles? (I hope not). We will need to check how the other project are managing this (if they are).

            • 3. Re: Mavenizing Hornetq
              Andy Taylor Master
              I'm not sure what this will give us. The only reason to mavenize the project would be if we did it properly. doing it hacky would j ust cause us problems in the long run. We already have a script for creating maven artifacts, see build-maven.xml, if we need any more artifacts we can just add them to this.
              • 4. Re: Mavenizing Hornetq
                Clebert Suconic Master

                The only thing we need now is being able to upload dependencies from Maven.

                 

                Tests on maven are for short tests IMO (like Unit-tests), not long-running tests like we do (1 hour runs.. or if we do some work we could maybe save a few minutes, but still a long run).

                 

                We still need a separate project from those long runs on maven.

                 

                The distribution still needs to be an ant task automated by maven. ATM I think the best way it would be a separate project for the build.

                 

                Ant tasks can still be executed through maven.

                • 5. Re: Mavenizing Hornetq
                  Tim Fox Master

                  For now, let's just keep one project.

                   

                  We have more important things to deal with now anyway

                  • 6. Re: Mavenizing Hornetq
                    Clebert Suconic Master
                    Aaron was offering help on making this happen.
                    • 7. Re: Mavenizing Hornetq
                      Aaron Walker Newbie

                      I see one of the keys goal of mavenizing is to simplify the consumption of the horentq artifacts with a clear mechanism to manage the dependencies.

                       

                      I should be able to implement a hornetq server/client using the core api by adding a single maven dependency.

                       

                      ...
                            <dependency>
                               <groupId>org.hornetq</groupId>
                               <artifactId>core</artifactId>
                               <version>2.0.0.GA</version>
                            </dependency>
                      ...

                      If I want to support JMS then I add that dependency

                      ...
                            <dependency>
                               <groupId>org.hornetq</groupId>
                               <artifactId>jms</artifactId>
                               <version>2.0.0.GA</version>
                            </dependency>
                      ...

                      etc

                       

                      Currently the published artifacts don't contain any depenency information

                       

                      So I really see the mavenizing in two parts something that allows the correct pusblishing of artifacts to the jboss maven repo with correct dependencies and another of migrating the hornetq build. Now if you migrate the build then you get the first essentailly for free....

                       

                      Having a seperate module for longer running tests is always a good idea but you really need each module to have it's own tests but these should generally we very quick to run.

                       

                      I side benefit I found by using the maven project structure is it's familar to new developers to your project they don't need learn how your project is structured and built. This lowers the barrier for people to contribute to the project.

                       

                      --Aaron