5 Replies Latest reply on Dec 25, 2005 5:03 PM by legolas

    How to start with Eclipse

    ptournet

      Hi,

      As I'm new to Java/J2EE (and therefore to JBoss Portal) development, I spend a lot of time discovering things and making mistakes... So I decided to write a little article to share my experience, get some feedback from people who already got there too and maybe help some people to start.

      First of all, after installing Eclipse 3.1, I decided to configure it to retrieve the anonymous CVS version (to be as close as possible of the configuration needed for participating in the development). The reason why I chose to use Eclipse instead of the command line version of CVS is that I'm under Windows XP and I didn't want to bother with cygwin for instance.

      Here is the only way I managed to get it done (but if someone has a better one, I would be pleased to know about it) :
      - open a "CVS Repository Exploring" perspective
      - create a "New/Repository Location"
      - fill the dialog bow as shown http://ptournet.free.fr/Images/Posts/Eclipse01.JPG
      - unfold the tree and choose "Refresh Branches..."
      - check the "jboss-portal-2.0" check box and click "Finish"
      - on the popping message box, click "Search Deeply"
      - unfold the "Branches/JBoss_Portal_Branch_2_0"
      - "Check Out As..." the "jboss-portal-2.0" node as shown http://ptournet.free.fr/Images/Posts/Eclipse02.JPG

      Once done, you can go in the build directory to launch the "build.bat" file to proceed with the building of the whole project.

      I hope that someone will find this usefull... Next step will be to configure the project in Eclipse so that all classes are known inside and that the build can be done from the IDE (as I haven't managed to do so at this time, any advice/help/comment is appreciate ;-))

      Patrick

      PS : it seems that the "img" and "url" tags doesn't work very well on this forum, as the "Private Message" button, is this a known issue ?

        • 1. Re: How to start with Eclipse

          I will take your post and place it in our wiki. Mind if I take the graphics and post them too?

          Thanks for the contribution!

          • 2. Re: How to start with Eclipse
            ptournet

            I don't mind at all Roy, it was intended to be used... But I rather post here to get more feedback...

            I'm still trying to configure Eclipse, so the project can be automatically build from within. If I run the build/build.xml file as an Ant Build, I get the following error :

            BUILD FAILED
            D:\Eclipse\JBoss-Portal-and-samples\jboss-portal-2.0\tools\etc\buildfragments\tools.ent:153: taskdef A class needed by class org.apache.cactus.integration.ant.CactusTask cannot be found: junit/framework/Test

            So if anyone has an idea of what happens and how to overcome it, I would be gratefull...

            • 3. Re: How to start with Eclipse
              scottdawson

              First of all, thanks to Patrick Tournet for his original post. His instructions have been extremely helpful to me.

              Did this forum entry ever get converted to a Wiki entry? If so, I can't find it. I'd like to update the original set of steps. For now, I'll post here and I can create a Wiki entry if none exists.

              These are the steps to retrieve the latest JBoss Portal source using Eclipse, which has built-in CVS support. I'm using the 3.1.1 version of Eclipse and these instructions show how to get the 2.2 version of the portal.
              * Open a "CVS Repository Exploring" perspective using the Window/Open Perspective menu option
              * Right-click in the CVS Repositories pane and create a "New/Repository Location"
              * Fill the "Add a new CVS Repository" dialog box with:
              ** Host: anoncvs.forge.jboss.com
              ** Repository path: /cvsroot/jboss
              ** User: anonymous
              ** Connection type: pserver
              ** 'Use default port' radiobutton selected
              ** Check the 'Validate connection on finish' and 'Save password' checkboxes

              * Unfold the tree and choose "Refresh Branches..."
              * Check the "jboss-portal-2.2" check box and click "Finish"
              * On the message box, click "Search Deeply"
              * Find "Head/jboss-portal-2.2" in the treeview
              * Right-click on the "jboss-portal-2.2" node and choose "Check Out As"
              * On the "Check Out As" dialog, select the "Check out as a project in the workspace" radiobutton

              Once done, you can go to the build directory and launch the "build.bat" file to proceed with the building of the whole project. On Windows, be sure that there are no spaces in the names of the directories in the path where the project is located. If there are spaces, build.bat will probably not work correctly.

              Regards,
              Scott Dawson
              Unisys

              • 4. Re: How to start with Eclipse
                glodo

                Hi! first, thanks for your help..
                i try to do the same thing, but when i try to connect with the server.. show me this error:
                Could not connect to :pserver:anonymous@anoncvs.forge.jboss.com/cvsroot/jboss: Socket Exception: Network is unreacheable: connect"
                why happens this??
                thank for your help..
                regards

                • 5. Re: How to start with Eclipse
                  legolas

                  Thank you Scott for putting this together.

                  Did this forum entry ever get converted to a Wiki entry? If so, I can't find it. I'd like to update the original set of steps. For now, I'll post here and I can create a Wiki entry if none exists.


                  Take a look at http://wiki.jboss.org/wiki/Wiki.jsp?page=UsingEclipse.

                  Glodo, Are you perhaps behind a (company) firewall? This can prevent connecting to pserver cvs repostories.

                  Cheers and Mery Christmas,
                  Marcel