Developing OpenCms with Eclipse
Line 19: | Line 19: | ||
* Use Default Port: true (leave it checked, as default) | * Use Default Port: true (leave it checked, as default) | ||
* Save Password: check it if you do not want to enter the CVS password anytime Eclipse needs to connect to the server. | * Save Password: check it if you do not want to enter the CVS password anytime Eclipse needs to connect to the server. | ||
+ | |||
+ | Click the "Next" button, to select the module name. Set it to opencms | ||
+ | |||
+ | Then, click the "Next" button, and select to "Checkout as a project configured using the New Project Wizard". | ||
+ | |||
+ | Click the "Next" button, to select the version to check out. Click the "Refresh Tags" button to get a list of possibilities, the most used is HEAD which is the last stable version. In choice "Branches" you can get another last version, for example dev_7_0_5 is OpenCms Version 7.0.5. When no branch versions are listed you have to select file build.xml in mask opened with button "Configure Tags". | ||
+ | |||
+ | Click the "Finish" button and the "New Project" wizard appears again. Now select "Java Project". Click the "Next" button and the "Create new Java Project" dialog is shown. Here enter the following information: | ||
+ | |||
+ | * Project Name: OpenCms | ||
+ | * Contents: Create a new project in the workplace | ||
+ | * Project Layout: Create a separate source and output folders. Click on "Configure Default...", and configure the "Source and output folder" checking folders, leaving the defaults: src for the Source folder and bin for the output Folder. |
Revision as of 09:00, 22 October 2010
Development Configuration
The OpenCms core provides the main OpenCms functionality. You can install the OpenCms core source code in your Eclipse in order to analyze it and learn how OpenCms works internally. It should not be necessary to modify anything in the OpenCms core for your project. We strongly recommend staying with the unmodified public core distribution. Creating a modified OpenCms core version will only lead to a dead end for your project since you will not be able to install important updates without incorporating your changes to the standard core. In the first subchapter is described how to checkout OpenCms Core project. How to configure OpenCms Core project in Eclipse is described in the second subchapter. In the third subchapter it is described how to check OpenCms Core code. How to build OpenCms Core project with Ant is described in the fourth subchapter.
Check Out the Project
OpenCms Core is accessible for free. The code is in a CVS repository. Following it is described how to checkout this code to your local computer.
Please Note: You can checkout all stable OpenCms Core Versions which were ever published. That means you can checkout the last stable version and also special numbered public OpenCms Core Versions, for example 7_0_5. In order for Eclipse to know which Branches or CVS Tags exists, you need to configure a file that has these information available. We usually use the Ant build file build.xml from the OpenCms core project to get this information. To check out the project from the CVS repository, you should create a new project, using the "New Project" wizard of Eclipse. For this go to the "File > New > Project..." menu option of Eclipse, and select the "CVS > Projects from CVS" option.
After clicking the ‘next’ button, a dialog for entering the repository information is displayed, enter the following information:
- Host: cvs.opencms.org
- Repository Path: /usr/local/cvs
- User: anon
- Password: anon
- Connection Type: pserver
- Use Default Port: true (leave it checked, as default)
- Save Password: check it if you do not want to enter the CVS password anytime Eclipse needs to connect to the server.
Click the "Next" button, to select the module name. Set it to opencms
Then, click the "Next" button, and select to "Checkout as a project configured using the New Project Wizard".
Click the "Next" button, to select the version to check out. Click the "Refresh Tags" button to get a list of possibilities, the most used is HEAD which is the last stable version. In choice "Branches" you can get another last version, for example dev_7_0_5 is OpenCms Version 7.0.5. When no branch versions are listed you have to select file build.xml in mask opened with button "Configure Tags".
Click the "Finish" button and the "New Project" wizard appears again. Now select "Java Project". Click the "Next" button and the "Create new Java Project" dialog is shown. Here enter the following information:
- Project Name: OpenCms
- Contents: Create a new project in the workplace
- Project Layout: Create a separate source and output folders. Click on "Configure Default...", and configure the "Source and output folder" checking folders, leaving the defaults: src for the Source folder and bin for the output Folder.