3 Replies Latest reply on Feb 4, 2011 10:28 AM by Monkey Den

    seamgen: Customizing with new templates ?

    Prathamesh Gaddam Novice
      Hi,

      Need to generate CRUD pages and entities based on custom templates. Following details are required to begin with hacking seam-gen:

      1. What are the dependencies for seam-gen module? Towards svn checkout in eclipse[Helios], error 'Target copyseam does not exists in this project' is thrown by build.xml

      2. How does seam-gen works?

      3. How to test seam-gen towards any customization/modifications through eclipse?

      4. Any developer's guide?

      Thanking for the same in advance!

      Regards
        • 1. Re: seamgen: Customizing with new templates ?
          Monkey Den Master

          All the seam-gen dependencies should be shipped with the seam distro itself, unless you plan to add features in the form of additional 3rd party jars and Java/XHTML sources to support them.  seam-gen relies heavily on source templates which can be found in:


          Java templates:
          ${seam distro}\seam-gen\src
          
          Resource templates
          ${seam distro}\seam-gen\resources
          
          View templates
          ${seam distro}\seam-gen\view
          
          IDE Project Files
          ${seam distro}\seam-gen\ide-project-files
          



          You can do a great deal of customizing in those files alone.  To my knowledge, other than kicking off the utility from within Eclipse there is no way to integrate with Eclipse, nor is the there a developer's guide.

          • 2. Re: seamgen: Customizing with new templates ?
            Prathamesh Gaddam Novice
            Thank you, Kyle Burke!

            Did u meant seam distribution with 'seam distro'? Or is it something else?

            So, you meant that only using build.xml/ANT with templates/FreeMarker the seam-gen build the project. And not any java code execution? Correct me if my bad?

            I want to understand, How can I test the modifications to seam-gen? Say need to run build.xml with ANT OR any test-case OR else. I'm working from my end however unable to get a clue, as it is something very new for me.

            The hurdle blocking my work is the error 'Target copyseam does not exists in this project' is thrown by build.xml What is about 'copyseam'?

            I'll we on IRC #seam-dev #seam wit the user name as 'allforjava'.



             
            • 3. Re: seamgen: Customizing with new templates ?
              Monkey Den Master

              Yes, seam distro is seam distribution.


              I don't know if seam-gen executes java code.  I'm simply pointing you to the templates which you can customize to bring your seam-gen'ed project closer to the final product.  Maybe you want to add proprietary code, change the entityManager to em, change the layout/style of your view completely.  Apart from that, I wouldn't say seam-gen is meant to be a code gen plugin platform.  From my perspective, it it does an excellent job bootstrapping an ant-built project so you can start development, but that's about it.


              I don't know why you don't have that ant target.  I see it in both the 2.0.2.GA and 2.2.0.GA versions of build.xml:


              ${seam distro}/seam-gen/build.xml