|
|
It is up to you to decide what platform you will use, although we strongly recommend Linux. The following instructions are exactly the same for any platform.
- If you don't have Java installed yet, download and install the Java SDK from http://java.sun.com/downloads/
- Latest version: 1.4.2
- If you are using Linux you probably have Java pre-installed. You will need to install Java if you're running Windows XP.
- Download the J2SE SDK distro (you don't need NetBeans, neither J2EE. Be sure to select the SDK)
- Download and install (unzip) JBoss from http://www.jboss.org/downloads
- Latest version: 3.2.3
- Select the ZIP file which includes Tomcat
- Download and install (unzip) Eclipse from http://www.eclipse.org/downloads/
- Latest version: 2.1.2
- Select the Eclipse SDK distribution.
- Download the GTK version if you are using Linux
Installing JBoss IDE
JBoss IDE is an Eclipse plug-in that provides tools to control and debug JBoss from Eclipse, among other nice features. More info at http://www.jboss.org/developers/projects/jboss/jbosside
- Execute Eclipse (you should have an eclipse.exe on the unzipped directory)
- Select Help | Software Updates | Update Manager.
- Select New | Site Bookmark, by right-clicking anywhere inside the Feature Updates view.
- On the New Site Bookmark window:
- Name:
JBoss IDE
- URL:
http://jboss.sourceforge.net/jbosside/updates
- Expand the tree, by clicking bookmark you just created (JBoss IDE), and select the version JBoss IDE / Eclipse 2.1
- Expand the JBoss sub-tree, and all the available versions will be shown. Select the latest version.
- Note the view on the right side shows some information related to this specific version
- Click the Install Now button on the right side view. A Wizard will be shown.
- Follow the Wizard instructions.
- After the installation, click Yes to restart Eclipse.
Obtaining Moap from the CVS
- Run Eclipse
- Select Window | Open Perspective | Other. Then, select the perspective "CVS Repository Exploring"
- Right-click on the CVS Repositories view, and select New | Repository Location
- Fill-up the following information:
- Host:
cvs.sourceforge.net
- Repository path:
/cvsroot/moap
- You will fill-up the other fields according to the access level you have in the project. You can access CVS using an anonymous user if you don't have CVS commit access, or if you simply want to get the source code as read-only. Or you can access CVS using your own Sourceforge username if you have CVS commit access (you need authorization from the project manager in order to be able to do CVS commits and access the Moap CVS through SSH). In doubt, try anonymous access.
- Anonymous CVS access:
- User:
anonymous
- Password: leave blank
- Connection Type:
pserver
- Committer access:
- User: your Sourceforge username
- Password: your Sourceforge password
- Connection Type:
extssh
- Expand the tree to show the CVS options. Then expand the HEAD tree.
- NOTE: If you are accessing CVS through SSH and you can't expand the HEAD tree, there is a known Eclipse bug. See the Troubleshooting section.
- Right-click on the moap directory and select Check Out As Project
- Eclipse will download all the files from the CVS repository.
- Select Window | Open Perspective | Resource
- Select Window | Show View | Other
- Expand JBoss IDE
- Select Server Navigator and click Ok. This view is used to manage JBoss.
- Note the buttons on the right side of this view.
You can start, shutdown and kill the JBoss server using those buttons.
- Click on the configuration button (the icon that looks like a pair of tools)
- Select JBoss 3.2.x and click New. A "New Configuration" item will be created.
- You can put a meaningful name in the Name field (ex:
JBoss 3.2.3)
- Put the JBoss directory on the field JBoss Home Directory
- Click on the Apply button and then Close
- Now your Server Navigator view should include a JBoss server.
- Right click on the server and select Start, or click on the start button on the right-top corner of this view.
- The view should automatically change to the Console tab, and you will see many info log messages showing JBoss' startup process
- You should have a line like
JBoss (MX MicroKernel?) [3.2.3 (build: CVSTag=JBoss_3_2_3 date=200311301445)] Started in 16s:423ms. This means JBoss was successfully initialized.
- You can always switch back to the Server Navigator tab if you want to stop or kill JBoss.
- Access the URL http://localhost:8080/jmx-console to test the JBoss installation. You should be able to see the JMX Agent View.
- Select Window | Open Perspective | Other. Select the Java perspective.
- Some errors will be shown on the Tasks view (right bottom). Don't worry! That's because some required files are generated during the build process.
- On the Package Explorer view (left side) click on the moap item (the root tree)
- Select Run | External Tools | Run As | Ant Build
- The console (right bottom) will show the build progress. You should have a
BUILD SUCCESSFUL. See the Troubleshooting section if you had a BUILD FAILED
- Select File | Refresh. The errors on the Tasks view should disappear now.
- Make sure JBoss is running, by selecting the Server Navigator tab on the right bottom side. Try to switch to different perspectives if you can't find the tab, by clicking on the icons on the very left side of the Eclipse window. You can also bring another Server Navigator view by selecting Window | Show View | Other | JBoss IDE.
- Window | Open Perspective | Resource
- On the Navigator view (left upper side) find the moap.ear file, under the directory results.
- Right-click on the file moap.ear
- Select Deployment | Deploy To
- Select the "default" JBoss instance and click Ok.
- You should have a message "Deployment was successful". The console should also show JBoss deploying the application. The last console message should be "Deployed package"
- Access the URL http://localhost:8080/moap/
At this point you might be asking where is the database used by Moap. JBoss ships with a lightweight database called HypersonicSQL. If you carefully review the console output during the deployment, you will notice that the tables were created during the deployment phase. This is a powerful J2EE feature, that allows the developer to describe the database schema in XML and pack it together with the application (the EAR file), and then the J2EE container (JBoss in our case) takes care of the rest.
You can see the database contents following those steps:
- Open a command prompt window on Windows or a terminal window on Linux
- cd to the JBoss directory
- cd to
server/default/lib
- Run the command
java -cp hsqldb.jar org.hsqldb.util.DatabaseManager
- Fill-in the following:
- Type: HSQL Database Engine Server
- Driver: leave the default value
- URL:
jdbc:hsqldb:hsql://localhost:1476
- User: sa
- Password: blank
BUILD FAILED during the Moap build process
That's probably because your Eclipse doesn't have the tools.jar in the CLASSPATH:
- Select Window | Preferences
- Expand Ant | Runtime
- Click Add JARs, under "Additional classpath entries" (bottom)
- Select the tools.jar file. You'll find this file on the Java 2 SDK directory, under the lib directory.
- Click on the Ok button and then rebuild the project, by either selecting Run | External Tools | Run As | Ant Build, or clicking on the
icon.
Eclipse cannot access SourceForge's CVS through SSH.
There is a known issue with Eclipse 2.1.2 and CVS 1.11.9 (SourceFourge recently upgraded their CVS server to this version). This bug was fixed on the versions greater than 2.1.3, and there is a patch available for 2.1.2. Follow the steps below to apply the patch:
- Close Eclipse if you have it open.
- Download the cvs.jar patch from here: cvs.jar
- Copy the jar file to
ECLIPSE_ROOT/plugins/org.eclipse.team.cvs.core_2.1.1
- Run Eclipse again.
- Eclipse Bug #45138 (go to Eclipse web site and select the "bugs" link on the left side)
- SourceForge Support Request #885091
- I had problems downloading the cvs.jar patch from the bug attachment. For some weird reason I got the jar with a few bytes more than the correct. Seems like other people had the same issue (see the bug comments). Then I tried a second time and it worked, so I attached the working cvs.jar file in this wiki page for your convenience.
-- FelipeAlbertao - 11 Jan 2004
|
|