10 Replies Latest reply on May 14, 2007 8:30 AM by estaub

    jBPM project, Eclipse, JBPM Library

    simonbaker

      Could someone help me understand something about Eclipse and Libraries and JBPM projects? When I start a new JBPM project, the JBPM Library is pre-configured as one of the libraries in the Project | Properties | Java Build Path | Libraries tab.

      If I delete the JBPM Library, I can't figure out how to get it back. Is this something only the plug-in can do at project creation, or is there a way to add the JBPM Library to any project? Where does this library come from?

      A related question is: is it possible to create a plain Java project and turn it into a JBPM project by adding objects and setting preferences, or can you only create a JBPM Project by starting with the File | New | Project | JBoss jBPM ...

      One of the reasons for the question is that I'm trying to strip down to the minimum libraries needed for our JBPM application, which will not be using JBOSS, and maybe not all the JBPM features. I could try deleting jars from the JBPM Library, but it seems it would be better to create my own User Library as a copy of the JBPM Library and then start deleting jars to see if any are not necessary. However, if I replace the JBPM Library in my project with my User Library, I'd like to be able to go back to the JBPM Library if necessary.

      I'm new to Eclipse, so in the dark on this.

        • 1. Re: jBPM project, Eclipse, JBPM Library
          simonbaker

          Any thoughts on this?

          • 2. Re: jBPM project, Eclipse, JBPM Library

            Simon,

            The library is a reference to the JBPM runtime you configured when you created the project.

            I'm trying to strip down to the minimum libraries needed for our JBPM application


            You need to be clear on whether you mean in the GPD (Eclipse plugin) or the engine.

            Frankly, this sounds unlikely to be important to you... do you really want to go after this? You have bigger fish to fry, I suspect. If you're thinking about the engine, I doubt there's much to get rid of. Hibernate alone is responsible for a lot of the dependencies, as I recall. Start there.

            -Ed Staub

            • 3. Re: jBPM project, Eclipse, JBPM Library
              simonbaker

              Part of chasing the small fish is trying to get in control of the tools I'm working with, a never ending process...

              It's really the engine libraries I'd like to identify, the stuff we give the customer.

              It looked to me that the JBPM Library has a lot of JBoss jars (and I hope the GPD jars are in their own place, not in the JBPM Lib) and maybe was to support the Cookie Monster example type of ap. We're not using JBoss so no point in any jars specific to that.

              • 4. Re: jBPM project, Eclipse, JBPM Library
                kukeltje

                Then I would suggest by starting to have a look at http://docs.jboss.com/jbpm/v3/userguide/deployment.html first

                • 5. Re: jBPM project, Eclipse, JBPM Library

                  Simon,

                  Here's my list of externals, FWIW. I haven't tested a lot, so don't be surprised if it's not complete. Also, it depends a lot on what container you're running in. This doesn't include console support.

                   <copy todir="target/APP-INF-parent/APP-INF/lib">
                   <fileset file="${lib.dom4j.local}"/>
                   <fileset file="${lib.hibernate.local}"/>
                   <fileset file="${lib.jaxen.local}"/>
                   <fileset file="${lib.commons.logging.local}"/>
                   <fileset file="${lib.commons.collections.local}"/>
                   <fileset file="${lib.bsh.local}"/>
                   <fileset file="${lib.hsqldb.local}"/>
                   <fileset file="${lib.cglib.local}"/>
                   <fileset file="${lib.antlr.local}"/>
                   <fileset file="${lib.asm.local}"/>
                   <fileset file="${lib.asm.attr.local}"/>
                   <fileset file="${lib.log4j.local}"/>
                   </copy>
                  

                  -Ed Staub

                  • 6. Re: jBPM project, Eclipse, JBPM Library
                    simonbaker

                    Thanks, much appreciated.

                    • 7. Re: jBPM project, Eclipse, JBPM Library
                      lachelt

                      Hi Simon,

                      Perhaps you've already gotten the answer you needed.

                      This can be a confusing aspect of Eclipse. You can add any library to an existing project.

                      1) look at the current list of libraries for a project
                      Project->Properties Libraries tab

                      2) usually we use the Add Variable...
                      Either choose an existing variable that has the base path to the library, or start with Configure Variables... to add a New variable. Then use the Extend... button to indicate which library. Then later you can change the value of the variable (say when you install a new version of jBPM), and any library links that use the variable will reference the right place.

                      You'll find that that is also the place in which you can attach the source to a given library. That let's you navigate into the library source code directly from your own source, using the nice Eclipse Ctrl-click feature (hover on a method or variable and press&hold Ctrl, then click to jump to the source where it is defined).


                      As for the question of creating a JBPM project out of a plain Java project. That is an aspect of Eclipse I'm not sure about. I tried to do something similar in another context (convert Java project to a Flex project), but didn't come up with a way to do it. But I bet there is a way.

                      -Jon Lachelt

                      • 8. Re: jBPM project, Eclipse, JBPM Library
                        simonbaker

                        Thanks, those are very useful tips. I'm just getting started with Eclipse after spending most of my time with JBuilder.

                        I'll check into attaching source to libs. I've been adding projects instead to the build, for instance, the jbpm.3_BRANCH_3_1 project. That seems to do what I expected, allows me to debug into jBPM, although I'm not completely clear on what Eclipse (or the plugin) does to the classpath when you add a project. Now, when you want to add source, such as Hibernate source, to a library, isn't it a challenge to locate the corresponding source and identify all the folders, etc?

                        Here is another question I have: usually the jars needed to compile are a subset of the jars needed to run an application. If you're testing you code under eclipse, what is a good way to set it up so you can keep those two sets of libraries distinct?


                        • 9. Re: jBPM project, Eclipse, JBPM Library
                          vipul.gupta

                          Hi Simon/Others,

                          Can you help me to setup a project of using jbpm without jboss.
                          I am new to jbpm and i am totally confused as to how to use it without jboss, say in a web application of mine.

                          I will be greatful for any help in this regards

                          ~Vipul

                          • 10. Re: jBPM project, Eclipse, JBPM Library

                            Vipul,

                            Please start a new thread if you're going to start a new discussion.

                            The starter kit doesn't use jboss, and most of the docs don't talk about using jboss. The starter kit includes a web application. Get it running (without building, just as binaries), read the userguide. Become familiar with what's on the wiki. When still puzzled, search the forum (using Google). Then, if you still have questions, post a question.

                            -Ed Staub