1 2 Previous Next 18 Replies Latest reply on Mar 31, 2004 3:02 AM by ccsaxton

    Maven

    jlward4

      Have any JBoss people worked with Maven? I am using it quite a bit. Beta 8 should be released in the next few weeks. Which will really make it a viable option for JBoss. Some of the biggest reasons why I think it could really help the JBoss builds are:
      - The Reactor will simplify building subprojects and inter-subproject dependencies
      - The Release plugin will simplify releases. Automatic cvs branching, site creatation, testing, etc.
      - Easy dependency mgmt. Dependencies are configured in an xml file and downloaded (based on a version number) from a (or more than one) repository, when they are needed.
      - The Maven Console makes builds fly. No more lag time loading the xml config files. With the console, the config stays in memory and you run your goals (targets) instantly.
      - There are lots of other cool plugins... Testing, site generation, blah, blah.

      For a cool demo of how maven works with subprojects, get the jakarta commons from cvs, Maven Beta 7, and have fun.

      BTW: Maven will be a top level Jakarta project soon.

      http://jakarta.apache.org/turbine/maven

        • 1. Re: Maven
          user57

          Looks promising. Any idea on how long it might take to setup? I have only looked at the web pages, not any of the build file details (yet).

          --jason

          • 2. Re: Maven
            jlward4

            Once Beta-8 is released, it should not take long to setup. The Reactor stuff is really cool since it includes POM (Project Object Model) inheritence. This way you only need a few lines of xml config for each subproject, in order to have a fully functional build environment. The Reactor also automatically determines (based on inter-subproject dependencies) the order in which subprojects need to be built. It is very slick.

            BTW: You can even have Maven autmatically create the ant files, for those not willing to make the switch.

            • 3. Re: Maven
              wordman

              > Looks promising. Any idea on how long it might take
              > to setup?

              I translated a fairly complex build system in about a day. Now that I am more familiar with Maven, I could have done it in far less.

              One of the things about Maven that takes some getting used to is that the whole point of Maven is to do what you used to do with 20+ lines of script code in ZERO lines of script code. It takes a while to prevent yourself from immediately saying "oh, I'll just write a quick script that does X" and instead say "oh, I'll just see if Maven does this already" (it usually does).

              • 4. Re: Maven
                kevin

                Maven is fine, if you project fits the holes it drills for you. If you have a square peg then you are in a world of hurt, last I checked you couldn't have two java source directories, the reactor managed project interdependencies very well, but didn't aggregate the results in any way.

                There are other solutions available (though not with the hype of maven) that are far mroe ant friendly. Ant is a proven build system with a long and strong history, maven is the new kid on the block and might one day be king, but it isn't even release one yet.

                • 5. Maven Beta-8 Release
                  jlward4

                  I wanted you all to see that Maven Beta 8 is out! One of the newest features is an automatic release plugin. I believe it will branch or tag cvs for you and build your distributable tar.gz and .zip files automatically. Check out the announcement:

                  Maven Beta-8 has been released and can be found here:

                  http://jakarta.apache.org/builds/jakarta-turbine-maven/release/1.0-beta-8/

                  This release should be considered a mostly feature complete, but not bug free, version of Maven 1.0. The website will be updated over the next few days to reflect the changes in Beta 8. Please help us by upgrading to Beta 8 and reporting any problems that you experience to our bug tracker.

                  Thanks,
                  The Maven Team

                  • 6. Re: Maven Beta-8 Release
                    user57

                    I just started playing with beta 8 and so far I am not too impressed with the available docs or the lack of a simple example project... but perhaps I am just too deeply rooted in Ant-isms.

                    My biggest concern right now is that Maven runs outside and/or over Ant and not the other way around. This means that any IDE that supports Ant and has half a chance of building JBoss is now crippled.

                    I would have liked to see Maven-like functionality (ie. reactor & simplified build files) as plugins to Ant, not the other way around.

                    I am a little conceren about what another users said about it not being able to aggregate results. This is quite important.

                    In short I have very mixed feelings about Maven. Something needs to be done to simplify the JBoss build system and I do not have problems using a tool which fits the job, but the comment about square pegs and round holes comes to mind.

                    You seem to be an advocate, so perhaps you can help convince me that Maven will do the job? I would appreciate your (and anyone elses) input.

                    --jason

                    • 7. Re: Maven Beta-8 Release
                      user57

                      Okay, I just ran the 'site:generate' goal and now I am drooling.

                      If you can please detail what you think it would take to convert JBoss to use Maven. Email jason@jboss.org if you would. These forums still piss me off.

                      If I could see how say the jboss-common & jboss-jmx modules work ala Maven & how we can populate build/output/release-id with the proper structure then I may be more likly to suggest this switch to the rest of the group.

                      Another concern that I have is how conditional building of sources will work... there are bits which are 1.3 & 1.4 specific.

                      I also looked for docs on the release plugin but seems like that file is not on the web-server.

                      Anyways, I am more impressed each time I play with something, but I am still concerened about how it all fits together. Jboss is a huge project and only getting bigger, so I can see a real benifit from what Maven can offer, but I do not want to sacrifice any of the functionality of the current build system. ya know what I mean?

                      Can you please send me some details, I would like to move forward with a simple test asap.

                      Thanks,

                      --jason

                      • 8. Re: Maven Beta-8 Release
                        user57

                        The more I read the more I like... heh. Would have been nice if there was a how to build the entire JBoss project using Maven, but that would have been too easy ;)

                        --jason

                        • 9. Re: Maven Beta-8 Release
                          pilhuhn

                          On one side, maven seems to be very cool. On the other hand, I am struggling with things like 'how to I tell maven where my cvs executable is (on Win *sigh*) or 'how can I tell maven that my generated source by xdoclet should not go into the same directory as my hand-edited source' (-> how can I have more than one src-dir).
                          Examples are sparse and sometimes contradictory to dtds or other documentation.

                          Also: before you can use maven, it will download some 20 Megs of jars that you already have on the system. And this is imho a very big hurdle.

                          Again ... maven has the potential to be really cool.

                          • 10. Re: Maven Beta-8 Release
                            jlward4

                            Have you searched the Maven user list archives yet? I have seen most of your questions answered before.

                            http://jakarta.apache.org/turbine/maven/mail-lists.html

                            Also, I am working on Mavenizing xPetstore so that the world will have a good Maven example.

                            BTW: It is usually not a good idea to mave multiple source dirs with Maven. If you need this, you should probably use the Reactor. Also, you can set XDoclet's generated file dir by setting a bunch of destDir variables in your project.properties file. The XDoclet plugin is not well documented yet. I am working on that too.

                            • 11. Re: Maven Beta-8 Release
                              user57

                              I am worried about the comments about poor win32 experences... is this univeral amoung win32 users?

                              --jason

                              • 12. Re: Maven Beta-8 Release
                                pilhuhn

                                James,

                                I actually was browsing the maven mailing lists.

                                Doing a mavenized xPetstore is a very good idea.

                                About one or more source dirs: I want my self-written code to be separated from the generated code, as this makes things (for me/us here) easier.

                                • 13. Re: Maven Beta-8 Release
                                  jlward4

                                  My generated files go to target/xdoclet/ejbdoclet which the xDoclet Maven plugin automatically adds to your compile path. So my xDoclet and self-written code are in different locations, and everything gets compiled at at java:compile time.

                                  To answer Jason's question about Windows support... There have been some windows specific issues in Beta-8, however, Beta-8 is considered to be pretty buggy, but contains all the features for a 1.0 release. They released Beta-8 knowing it would have many problems, but they wanted to get it out there. Beta-9 will have tons of bug fixes and should be out within the next week or so. So, do not worry Jason. By the time we are done with our project Beta-9 should be out. (Did you get my email?)

                                  -James

                                  • 14. Re: Maven Beta-8 Release
                                    lepe

                                    Has there been any more talks on switchin to Maven?

                                    1 2 Previous Next