6 Replies Latest reply on Dec 13, 2007 4:27 PM by sjmenden

    Staying sane (or how do I keep up with Seam releases)?

    gmarcus

      Can anyone share their strategy for updating to new releases of seam?

      I am currently using Seam 2.0.0 CR1 and about to update to 2.0.0 GA.

      I installed both versions and did a seam-gen with each and saw a lot of changes to the resource files and project structure.

      When I have done upgrades in the past, I have done the following:
      1. seam-gen a new project
      2. diff the new project with my existing project
      3. manually merge over any of my changes to files under resources which usually includes
      import-dev.sql
      import-test.sql
      import-prod.sql
      META-INF/persistence-dev.xml
      META-INF/persistence-test.xml
      META-INF/persistence-prod.xml
      WEB-INF/components.xml
      WEB-INF/faces-config.xml
      WEB-INF/pages.xml
      WEB-INF/web.xml
      4. bulk copy over my view and src directories

      Steps 2 and 3 are error prone and labor intensive.

      I looked at using seam-gen update-project but that only copies over new libs and doesn't migrate changes to files in teh

      I was thinking about moving to nightly builds on CVS, but I would go insane if I did this process everyday.

      What do you do?

        • 1. Re: Staying sane (or how do I keep up with Seam releases)?
          gmarcus

          ding!

          What process do you go through to update your project?

          • 2. Re: Staying sane (or how do I keep up with Seam releases)?
            gmarcus

            ok, one last ding before I consider this thread dead on arrival.

            come one, anyone have a good process to update your project with new seam releases? do you use any custom update scripts? the built-in seam-gen? manually merge like I do?

            share your experience and help others like me stay up to date.

            Thanks.

            • 3. Re: Staying sane (or how do I keep up with Seam releases)?
              matt.drees

              It's been a few months since I've updated, but over most of the summer I was living on cvs head, updating every week or so.

              I copied seam-gen's copy-lib task into my project, so I could do a cvs update, clean/build, and copy-lib with relatively little trouble.

              Of course, like you mentioned, that doesn't solve everything. But breaking changes like directory structure changes aren't too common. And if you keep an eye on fisheye (http://fisheye.jboss.com/browse/JBoss/jboss-seam/), you can usually see them coming.

              So yeah, it's painful to live on cvs head. Well, it was this summer anyway, as Seam 2 took shape. I think it'd be easier now.
              I don't think there's a completely painless way to do it, but if someone has found it, I'd like to know too. :-)

              • 4. Re: Staying sane (or how do I keep up with Seam releases)?

                I try to make the configuration changes manually, but if that becomes a headache I start with a clean Seam Gen project and then slowly work in my project.

                I always upgrade just before a new GA becomes available.

                • 5. Re: Staying sane (or how do I keep up with Seam releases)?
                  gmarcus

                  Thanks to those that posted. At least it helps me confirm that there is no automated way to upgrade to new seam releases (too bad since 2.0.1 CR1 was just released).

                  If someone does come up with an upgrade script or migration tool, please share it here.

                  Thanks again.

                  • 6. Re: Staying sane (or how do I keep up with Seam releases)?
                    sjmenden

                    If you upgrade point releases ie. 2.0.0.GA to 2.0.1.CR1 then you can typically just copy over the lib folder and be done with it. The problem with creating an automated script is going from major releases like 1.2.1.GA to 2 GA, in this case the tool would need to update all schemas and namespaces and api in your code. It would be not be a trivial tool to create. To most customers I deal with I recommend just creating a clean project and migrating the old code over. I've see a lot of problems when this is not done, so I am dogmatic on recommending it now, always create a clean project :)

                    And if you feel like tackling a daunting task, feel free to write such a migration tool and contribute it back to the project.

                    -Samuel