CridManager 2.0 - Getting started
Aus open7x0.org
Getting started with CridManager 2.0 and Eclipse
This page describes how to set up CridManager 2.0 with Eclipse so that you can either contribute to the project or simply build your own copy.
Retrieving CridManager from SVN
First install Eclipse and create a new, empty workspace. Make sure you set Eclipse to Java 5.0 compiler compliance level (open the preferences and select Java -> Compiler).
For contributing to the project you need to have developer access to the repository. Please leave a message at the main discussion page.
Now install the Subclipse plugin for the subversion repository access.
Open the context menu of the Package Explorer, select Import... and then Other->Checkout projects from SVN. Create a new repository location pointing to svn://open7x0.org/cm
CridManager 2.0 is located in the trunk of the repository. Below trunk there are folders for each sub-project of CridManager. You need to check out all of them except documentation. You can select several projects using Ctrl+click over them. When you have selected all the projects you want to check out, click on Finish. Don't forget to include lib and project settings.
The project settings project contains the CridManager 2.0 - Team settings. Check that page for how to import them.
After that all projects should be error free. If not, clean the projects once by selecting Project -> Clean... from the main menu.
Starting the project in debug mode
Although CridManager is composed of plugins, you may start CridManager from Eclipse without building the plugin jar files. For this mode, there is a special implementation of IPluginController that does not load plugin jar files but therefore can be adjusted to load the components under test directly from the classpath. Open the file DeveoplopmenPluginController.java and change the init methode in the way shown below:
public void init() {
super.init();
// hier die zu testenden Komponenten aufführen
ClassLoader cl = this.getClass().getClassLoader();
Class<?> clazz;
try {
clazz = cl.loadClass("de.cridmanager.filesystems.Filesystems"); //$NON-NLS-1$
registerComponent(clazz);
} catch (ClassNotFoundException e) {
e.printStackTrace();
}
}
Add other component start classes as needed.
Please do not check-in your changes for this class. The repository should contain a version loading all components that are in the repository.
Next you have to create a new Debug configuration for passing a parameter to the Start class of CM2.0. Open the menu Run->Debug... to open the debug configuration dialogue. Create a new Java Application configuration and enter de.cridmanager.core as project and de.cridmanager.Start as Main class. Switch to the Arguments tab and enter dev in the Program arguments line. Finally switch to Classpath and add at least those projects that your test configuration needs. Enter a meaningful name and click Apply.
Starting the project in plugin mode
Each of the projects contains a file build.xml that creates a jar file from the project a copies it into the plugin dir in the main project (de.cridmanager.core). Start the task copyJarToCore for this. If you start the project without the dev parameter (see above), it will load all plugins available inside the plugin directory, just as the released program will do. Delete jar files that you don't want to run.
Currently there's no ant task compiling and copying all projects at once.

