1 2 3 4 5 6 Previous Next 89 Replies Latest reply on Dec 16, 2007 10:54 AM by nugyentv Go to original post
      • 45. Re: Seam & Maven2
        awhitford

        From http://raibledesigns.com/page/rd?entry=tse_hop_into_real_object:

        Ben just did a survey of the room asking who's using Ant vs. Maven. Surprisingly, Ant only slightly beats Maven.

        I can't stress the importance of being able to declare Seam as a dependency for Maven users. It is a speedbump to Seam adoption. Kudos to all involved. I can't wait!

        • 46. Re: Seam & Maven2

          Just to supply some more input to this thread:

          I have just switched one of our bigger seam projects which had a pretty sophisticated ant build script to Maven 2. It took me (never used Maven (1|2)) slightly more than a day.

          It works but I'm not as impressed as many others:



          1.) The maven plugins are buggy. No, I mean BUGGY. And they are pretty unflexible. This means that you have to do things just the maven way. The combination of these is nasty because it means there are hardly any wok-arounds availabe. If you are hit by a bug there are very few alternative routes to reach your "goal".

          (However, I have to admit that I like the strict layout that is required by maven projects. I think this is the right approach in the long run.)


          2.) The feature where Maven really shines is its dependency management. Well, in theory it is. The idea behind the dependecy management is good but in real life it falls short of its promise.

          The problem seems to be that the complete dependency chain can only be resolved if all the projects are build using Maven 2 which is obviously not the case. In all other projects the dependencies have to be supplied manually and hardly anybody seems to bother about this.

          This thread is a good example: Everybody is traing to give a complete list of all dependencies. But I think this is not the right appoach: Rather one should look on which libraries Seam directly depends. This should be put in a repository and have then their dependencies marked in their pom file etc. until we have a complete chain of dependencies.

          (BTW: Is there a way to change the scope of a transitive dependency. Many of the libs which are required to deploy a seam app in Tomcat are not required for JBoss etc. So is it possible to build a war for tomcat and one for JBoss which contain different sets of libraries, by switching the profile for example?)

          For 95% of the files in the repositories this is not the case so you have to take adjust the dependecies for every project manually down the chain.

          (I have lessened this pain to some extend by building my own company repository which I would recommend to anybody using Maven.)


          3.) Versioning of interdependent projects is a weakness if you don't use the maven 2 release plugin (s. 1.)). But I have no idea how to use it with subversion to set checkout numbers, for example. (I would be thankful for some input here).


          4.) Documentation is poor. I admit there is lots of it but even the plugins home pages don't have much more information then an autogenerated list of parameters. There is hardly any examples etc.



          So Maven is allright but nothing to go crazy about. It strength lies in sharing dependency information with others. This is very useful for me as some parts of our project are not developed inhouse and this was the main reason I decided to switch.

          But if you don't need that feature and you have a working ant build or are familiar with ant then it is hardly worth the trouble to switch.


          Regards

          Felix

          • 47. Re: Seam & Maven2
            mzeijen

            You are completely right that Maven2 isn't perfect and it (or its concept) has its flaws. But I haven't discovered yet that the maven plugins are Buggy.


            This thread is a good example: Everybody is traing to give a complete list of all dependencies. But I think this is not the right appoach: Rather one should look on which libraries Seam directly depends. This should be put in a repository and have then their dependencies marked in their pom file etc. until we have a complete chain of dependencies.


            We wanted to know the complete dependency list because then it is easier to make a dependency graph. With this graph we know which dependencies are directly used by Seam. We need the complete graph to see which dependencies (direct and indirect) aren't in the Maven repositories. Getting them in the repositories will become a difficult task, though.

            You are right that Maven2 is just another tool to not go crazy about. But a lot of people want to use it and to use it with Seam somebody needs to make it work.


            But if you don't need that feature and you have a working ant build or are familiar with ant then it is hardly worth the trouble to switch.


            When the Maven2 support is ready then people won't have a lot of trouble using Seam with Maven2.

            (BTW: Is there a way to change the scope of a transitive dependency. Many of the libs which are required to deploy a seam app in Tomcat are not required for JBoss etc. So is it possible to build a war for tomcat and one for JBoss which contain different sets of libraries, by switching the profile for example?)


            With profiles you should be able to solve this problem. Profiles are pretty powerful ;).

            • 48. Re: Seam & Maven2
              ccanning

              If you need more information on maven2 or think the documentation is poor, you might want to download/read this free book on maven2 : http://www.mergere.com/m2book_download.jsp. It is pretty good.

              • 49. Re: Seam & Maven2
                mzeijen

                Oh yeah, I forgot to tell that ;)

                • 50. Re: Seam & Maven2
                  marcin.caban

                  Is there any progress?

                  • 51. Re: Seam & Maven2
                    mzeijen

                    Sorry, been busy last 2/3 weeks because of the Holidays and some other things. But I will work on it soon (today, tomorrow else next week),

                    • 52. Re: Seam & Maven2
                      littlewing1112

                      Hello,
                      just for information in this thread. I tried some weeks ago to integrate maven2 and seam. I have also created 3 artifacts (ear,ejb,war). The only problem I have seen is running the testcases.
                      I described in http://jira.jboss.org/jira/browse/JBSEAM-570 the bug.

                      • 53. Re: Seam & Maven2
                        mzeijen

                        I just wanted to tell you guys (and maybe girls) that I am working on the dependency graph right now.

                        I changed my approach. I am now searching all the dependencies directly from the Seam source. I hope this works out...

                        • 54. Re: Seam & Maven2
                          mzeijen

                          I have come a long way of getting all the dependencies by looking at the source. But I encountered some problems.

                          1. To compile Seam it depends on Embeddable EJB3 (version ALPHA_8-patch2 for Seam 1.1.0GA). The available jar of this library (jboss-ejb3-all.jar) not only contains the specific embeddable ejb3 classes but also a lot of classes from other libraries. If I would use this library in the POM then it could cause dependency conflicts, so we shouldn't to that.
                          The best solution is probably to compile this library without those third-party libraries within it. I haven't tried this yet...

                          2. Seam depends on several libraries that are only distributed via the JBoss AS. What version number should they get? The same as JBoss AS?
                          These libraries should become available in the Maven repository as separate libraries.

                          • 55. Re: Seam & Maven2
                            gavin.king

                            I thought that E-EJB3 is distributed with both choices: the bundles jars, and a dir full of unbundled jars...?

                            The versions of jars used in Seam are always from the E-EJB3 release.

                            • 56. Re: Seam & Maven2
                              mzeijen

                              I can only find the bundled version. I looked here: http://sourceforge.net/project/showfiles.php?group_id=22866&package_id=132063

                              Should I contact the guys of EJB3 about this or maybe do you (Gavin) want to contact them?

                              I also checked out the ejb3 project from CVS but it required a lot of other projects too. Much more I haven't tried yet. I am working on it, just not that fast ;).

                              • 57. Re: Seam & Maven2

                                Hello,

                                I have created Seam Maven integration. I have created "profiles" - you just say "I want to use Seam with PDF" and it will add all required dependencies.

                                I have also created few archetypes. And now I am improving the dependencies and creating SeamGen for Maven.

                                See http://software.softeu.cz/seam/.

                                • 58. Re: Seam & Maven2
                                  mzeijen

                                  Very nice :D. I will check it out, tomorrow. Did you solve the problems with the dependencies? I mean those libraries that contain a lot of other libraries within them?

                                  • 59. Re: Seam & Maven2

                                     

                                    "mzeijen" wrote:
                                    I mean those libraries that contain a lot of other libraries within them?


                                    I solved some of them - the biggest problem was with JBoss AS - I don't think the interdependencies between jboss-* libraries is 100% correct. But dependencies for Seam are correct. I converted few seam examples and resolved dependencies of them. Some packages already had correct dependencies (Hibernate, Drools, jgroups, ...). I resolved them by hand, so maybe there are few missing (I need to convert all the examples to be sure). I also sometime didn't use exact version (as I can't get to know which version is in *-all.jar). I used exact version of JBoss Microcontainer. I tested it only with Microcontainer.

                                    Maybe there are some problems still - but you know - release early :-). I have also looked on SeamDependencies.

                                    I have created seamgen equivalent for Maven.
                                    Now you can create project using archetype:

                                    mvn archetype:create -DarchetypeArtifactId=softeu-archetype-seam \
                                    -DremoteRepositories=http://maven.softeu.cz/ \
                                    -DgroupId=cz.softeu.test -DartifactId=helloApp

                                    and later use seamgen:

                                    mvn seam:new-entity

                                    and run project with microcontainer on port 8080:

                                    mvn jetty:run

                                    What is still missing is seam:generate-entities and archetype that creates multiproject application (ear, jar, war). But I plan to start with LunarLogic archetype.

                                    mzeijen: I would be very thankful for testing.