12 Replies Latest reply on Feb 27, 2008 8:30 AM by jeffdelong

    Eclipse template wizard plugin directory structure

    beve

      Hi,

      I'm currently working on the eclipse template wizard plugin. This plugin creates a simple project in eclipse and uses the same directory structure as the quickstarts do.

      I'm wondering how useful that directory structure is. I'd rather see a more structured layout.
      This is the current structure:

       |---src/
       |---build.properties
       |---build.xml
       |---deployment.xml
       |---jbmq-queue-service.xml
       |---jbm-queue-service.xml
       |---jboss-esb.xml
       |---jbossesb-properties.xml
       |---jndi.properties
       |---juddi.properties
       |---log4j.xml
       |---readme.txt
      

      Should we instead use a maven like project structure like this:
       |---src/
       |---src/main/java
       |---src/main/resources
       |---src/test/java
       |---src/test/resources
      

      And putting the configuration files in the resources directories.

      Any thoughs on this?

      /Daniel

        • 1. Re: Eclipse template wizard plugin directory structure
          bcarothers

          To the extent that my vote counts, I'd vote for more structure. Maven compatibility is a plus.

          • 2. Re: Eclipse template wizard plugin directory structure
            jeffdelong

            More structure is better. In particular I would like to see it support the same structure as the jBPM and Drools plugins, which have in addition:

            |-----src/main/rules
            |-----src/main/jpdl
            


            Thanks,

            Jeff

            • 3. Re: Eclipse template wizard plugin directory structure
              beve

              Thanks for the feedback!

              So, unless anyone objects, we'll go with the "maven" like directory structure and add the rules and jpdl directories.

              Next issue:

              Should we be able to run the project standalone, or is it enough that the project produces a <project_name>.esb archive?
              This would let us clear out some of the configuration files.

              /Daniel

              • 4. Re: Eclipse template wizard plugin directory structure
                kconner

                The directory structure is deliberately mirrored on the quickstarts, please do not change this. We can look again at changing the structure at a later date but this must coincide with changing *all* the quickstarts.

                The generated project must link into conf/base-build.xml and must demonstrate the deployment options supported by the quickstarts.

                • 5. Re: Eclipse template wizard plugin directory structure
                  beve

                  Sure, we can leave it as it is.

                  I was under the impression that this plugin was to be something that we could use in real projects and was the reason I wanted to see a different directory structure.

                  • 6. Re: Eclipse template wizard plugin directory structure
                    beve

                    How about I create a separate plugin for this?

                    What I'd like to see is a plugin that creates the directory structure as discussed above.

                    And ANT targets for building and deploying the artifact generated by the project. This would only be the <project-name>.esb.

                    Any other suggestions?

                    /Daniel


                    • 7. Re: Eclipse template wizard plugin directory structure
                      kconner

                      The problem with going down this route is that the generated build.xml file could easily become inconsistent with what is required to compile/execute the quickstarts.

                      At the moment these dependencies are handled within base-build.xml for all quickstarts, including the correct base-build.xml automatically pulls in the correct dependencies. To remove this would require setting up a 'context' for every version of the ESB we release (platform and project).

                      We could certainly look at supporting this but I would then want to see this used by the quickstarts themselves. If the plugin and quickstarts use the same mechanism then we know that the plugin will work in all those cases.

                      Kev

                      • 8. Re: Eclipse template wizard plugin directory structure
                        kconner

                        Hiya Daniel.

                        What I was trying to say with my last posting was the following :)

                        If you feel that you can change this structure, and make the quickstarts consistent, then please make it happen. I agree that the quickstart structure is not ideal, and that we should change it, but it is important that these changes are consistent.

                        Kev

                        • 9. Re: Eclipse template wizard plugin directory structure
                          marklittle

                          A little bit late to this discussion, but I'm never a fan of flat hierarchies. Structure is better.

                          • 10. Re: Eclipse template wizard plugin directory structure
                            beve

                            Hey Kevin,

                            yeah, I agree with you that the quickstarts should look the same as the projects created by the template plugin. I'll try modifying one quickstart locally to see how much is involved in this.

                            One thing that I'm probably missing is how the current template plugin is/was supposed to be used.
                            Was it only intended to help generate new quickstarts?

                            I have to admit that I have never used it. When I create a new quickstart I copy one that is similar to what I need and make updates :(

                            My thought was that the "new" template plugin should not have any dependencies to the quickstarts structure at all. And that jar dependencies should be used from the chosen esb server during project configuration.


                            /Daniel

                            • 11. Re: Eclipse template wizard plugin directory structure
                              kconner

                              Hiya Daniel.

                              The first version just recreated the helloworld example, IIRC, and may have been updated when the base-build.xml was created. Everything was a C&P prior to the base-build.xml, it was a maintenance nightmare.

                              Having the new plugin independent from the quickstarts would be a good move as the dependency mechanism should not really reside within the quickstarts. I would like the plugin and quickstarts to share the mechanism though.

                              Kev

                              • 12. Re: Eclipse template wizard plugin directory structure
                                jeffdelong

                                Thanks for going the structured directories and including the rules and jdpl folders. I am currently conducting a SOA workshop for a client, and it is a bit clumsy creating a rule project or a jbpm project in Eclipse with one directory structure and then a second project that mimics the quickstart folder structure.

                                Drools plugin has a nice feature that you can add the required jars through a menu option "Convert to Drools Project". When the user creates a jBPM project it uses a jBPM Runtime that the user has previously configured in preferences.