11 Replies Latest reply on May 22, 2008 8:38 AM by Max Rydahl Andersen

    Commit & Checkout Seam Project

    Berkay Aktan Newbie

      Hi.
      We had been using Netbeans for our Seam project but we decided to use WTP + JBoss Tools when the Tools 2.0 released.

      I am little bit confused about cvs part.
      When i create a new seam project (deploy as ear), wtp creates 4 project directory. [xxx / xxx-ejb / xxx-ear / xxx-test]

      Should i commit all the directories to cvs ? and how to checkout a seam project(fully functional) from cvs ?

        • 1. Re: Commit & Checkout Seam Project
          Max Rydahl Andersen Master


          Just commit them all under e.g. svn.jboss.com/myproject/xxx so you get

          svn.jboss.com/myproject/xxx/xxx
          svn.jboss.com/myproject/xxx/xxx-ejb
          svn.jboss.com/myproject/xxx/xxx-ear
          svn.jboss.com/myproject/xxx/xxx-test

          and then when you chek it out you just do:

          svn co svn.jboss.com/myproject/xxx yourlocalprojectdir

          and then in eclipse you do File > Import > Existing project and point it
          to yourlocalprojectdir and they are now all available instantly in eclipse.

          Onwards you can just use svn synchronize feature etc.

          It's like with any other multi dir project...nothing magically about this.
          Maven or multi-ant/classpath projects have the same "challenge"

          • 2. Re: Commit & Checkout Seam Project
            mutable the mutative Newbie

            In our company developers use various IDE's so project structure in CVS is general and I cannot import it in Eclipse.
            When I create project from CVS as Seam Project it creates many (for me) unnecessary files and splits project into two separate. The fetarues of JBoss Tools are awesome and I really want to use it. However then I couldn't synchronize with company CVS anymore.

            • 3. Re: Commit & Checkout Seam Project
              mutable the mutative Newbie

              I really hate when I add Seam project facet and it modifies faces-config.xml, components.xml, ..., creates dozens of files and directories with files that I really don't want without any question.

              • 4. Re: Commit & Checkout Seam Project
                Max Rydahl Andersen Master

                what files are unnecessery in the *new* projects we create ? Please be more precise.

                If you don't want us to preconfigure a project that can be used most efficiently from within eclipse then just enable seam codecompletion and validation by checking Seam support in the project preferences.

                • 5. Re: Commit & Checkout Seam Project
                  Berkay Aktan Newbie

                  we had similar problems with CVS and changed our versioning system cvs to svn.Now we can commit all the project directories (war's 2,ear's 4) to svn and checkout without new project wizard..

                  • 6. Re: Commit & Checkout Seam Project
                    T Rixom Newbie

                    berkay,

                    could you explain a little more how you use the new project wizard? I am quite interested in which files you commit to svn.

                    Every time I try to export the folder using the new seam project wizard the folders end up in the project-test folder.

                    Regards,

                    T.

                    • 7. Re: Commit & Checkout Seam Project
                      T Rixom Newbie

                      FYI I am using Eclipse and the New Seam Project Wizard.

                      Thanks,

                      T.

                      • 8. Re: Commit & Checkout Seam Project
                        Martin Goik Newbie

                        I'd like to refer to Max's answer checking in the 4 sub projects xxx/... .

                        You probably exclude xxx/.metadata from versioning?

                        I'd like to keep at least the bulk of (standard) libraries like xxx/xxx/WebContent/WEB-INF/lib and xxx/xxx-test/lib in a centralized location (e.g. /usr/share/java/seam/test/lib and /usr/share/java/seam/lib) and refer to them via an eclipse environment variable like MY_JBOSS_LIBS rather than having these as part of every project. This way other developers in a SVN team might define MY_JBOSS_LIBS in a way suiting their needs. But I found no way changing these settings after using the Seam Tools wizard.

                        I don't mind having large projects. But the standard libs for a simple CRUD project account for nearly 40 MB. And we have lots of students whom we encourage to use subversion having Jboss/Seam libs installed on every client PC anyway.

                        I thought of using symlinks on Linux but these won't work for Windows. Furthermore adding project local libraries might cause a problem.

                        • 9. Re: Commit & Checkout Seam Project
                          Max Rydahl Andersen Master

                           

                          "goik" wrote:
                          This way other developers in a SVN team might define MY_JBOSS_LIBS in a way suiting their needs. But I found no way changing these settings after using the Seam Tools wizard.


                          huh ? The projects are normal eclipse projects so you can change it as much as you can with normal eclipse java projects in the Build properties.

                          Please be more specific on what does not work ?

                          Thanks,
                          Max

                          • 10. Re: Commit & Checkout Seam Project
                            Martin Goik Newbie

                             

                            "max.andersen@jboss.com" wrote:
                            ... huh ? The projects are normal eclipse projects so you can change it as much as you can with normal eclipse java projects in the Build properties.

                            Please be more specific on what does not work ? ...


                            First I followed your advice regarding the SVN layout for my eclipse project "Hdmuser", after svn co ... I have:

                            ../hdmuser/Hdmuser
                            ../hdmuser/Hdmuser-ejb
                            ../hdmuser/Hdmuser-ear
                            ../hdmuser/Hdmuser-test


                            Versioning works fine this way. Via the usual eclipse build path configuration I can move the libraries being contained in Hdmuser-test/lib to a location of my choice outside the project. Regarding filesize and versioning this is the bulk of all and thus a progress.

                            Then I tried to do the same for Hdmuser-ejb. Eclipse's build path editor shows mvel14.jar ... jbpm-jpdl.jar below "EAR libraries". I cannot change these . The corresponding .classpath entry reads:

                            <classpathentry kind="con" path="org.eclipse.jst.j2ee.internal.module.container"/>


                            So I understand this is a referral that cannot be edited since the libraries exist in the different subproject Hdmuser-ear/EarContent.

                            Since these are just binaries rather than sourcecode I'd like to move them to a project external location as well. But I found no way to do so in the Hdmuser-ear subproject.

                            The last bit is the Web App Libraries entry in eclipse's build path editor of the subproject Hdmuser referring to the jars contained in Hdmuser/WebContent/WEB-INF/lib. Again I cannot edit these and again the .classpath entry shows me this is a container.

                            Seems like I'm missing something terribly obvious?


                            • 11. Re: Commit & Checkout Seam Project
                              Max Rydahl Andersen Master

                              WTP has some limitations concerning external libraries. But you should be able to remove the container and manage the libraries your self.

                              But you might run into WTP limitations about not publishing the jars.