|
||||||
|
|
||||||
|
Table of Contents
Developer Guide (version 2.0)If you are planing to create some OpenKM enhacement, please fell free to tell us across our contact form, because it’ll can be more easilly added on new OpenKM releases and you’ll be notified periodically by mail about some interesting changes on cvs coding that can facilitate your job. Developer requirements
The developer environment can be set in any Operating System (Linux, Windows, etc…) since it is a multi-platform system, but Linux is recommended, because is what it is being used. In order to set the developer environment it is needed to install Eclipse Europa for Java EE Developers & Jboss Tools plugins for eclipse, JBoss 4.2.2 version or higher, Java Development Kit 1.5, Google Web ToolKit 1.5.3 and source code.
Eclipse Europa for Java EE Developers
Some useful information about jboss tools could be found on:
Add “-XX:MaxPermSize=256m” to eclipse.ini on Eclipse Europa to correct some problem with memory. Finally the Java Development Kit (JDK) 1.5.X is available at java sun website ( download the JDK not de JRE ). CONFIGURING JBOSS SERVER ON ECLIPSE
At this point we assume that Eclipse, Jboss Tools plugins for eclipse, jboss, and jdk 1.5 are properly installed on your system.
It’s better to configure Jboss Sever 4.X before first time compilation, because some libraries links Jboss Server configuration.
For it we’ll add server configuration on Jboss Server View using New Server option on this tab. At end process you’ll get something like this: Downloading OpenKM source codeYou ought to access using anonymous CVS user (only authorized users can update files, before obtaining this credentials. Future developers on a first phase must give us their code directly in order to be validated to make sure that you have understood the OpenKM zen). OpenKM importing code from CVS repositoryImport project to eclipse option File / Import and select Checkout Project from CVS option
Put CVS repository values : Then select the module to check-out openkm And check out on your workspace with his original name , (i.e. Openkm). Select the directory where you want to checkout the code ( i.e. default workspace). And finally check out the code The code will be downloaded in a few minutes Runtime environment configurationLooking for JDK 1.5 versionFirst take a look to correct jdk version compiling on eclipse. Take a look at openkm Properties and on Java Build Path look at libraries. Make sure that the version of jdk 1.5. is correct. If this is not the case, press Edit button, and correct to jdk 1.5 path. Executing Xdoclet to generate classesOpenKM uses Xdoclet, you must execute it to generate some classes. Press Keys Shift + CTRL + F1 to run Xdoclet. Setting GWT libraries on OpenKMDownload the GWT 1.5.3 and copy the directory structure on openkm main folder. The directory structure will appear like this way
Refresh the eclipse project to reflect these new files copied, by pressing F5. Preventing some Project html errors we recomend you delete doc folder from GWT and some .html files on root. First time compiling project
If eclipse build automatically is not enabled, enable it Project / Build automatically. Note: Perhaps it will appear some XML error malformed, don’t worry eclipse validator seems not likes xml, because are parts to be merged by xdoclet. Now set visible eclipse project archives tab. And select some OpenKM folder on Navigator or Project Explorer eclipse tab. This enables project archives project selection ( note that if you’ve got several projects opened at same time, project archives selection depents on your folder selection ). Project archives is new jboss tool packaging that refreshing war, and ear packages on fly, synchronizing wiht classes and project resources.
Now compile the GWT project for it now we’ve got two external program call, one for frontend and other to administration. Opening external tools you’ll get something like this:
Note that windows users must change generate.sh to generate.bat ( the same to generaback.sh). Ensure that variables are set propertly for your system (take a look at your JAVA_HOME path).
Then Run external tool ( for frontend and backoffice ).
BE PATIENT THIS COULD TAKE SOME MINUTES !!!! At this point we’ve compiled and generated all project files. Configuring Jboss 4.2.XCreate file alias (on windows shortcut file) of openkm project configuration files on jboss home. It will be as follows: Files need to create alias are:
It’s nessary to create alias on deploy for some database definition, it’ll be as follows:
Optional files to create alias if you want to test property groups:
Configure security : Configure login-config.xml ( see installation guide or download the openkm project with jboss configured to see it ). Configure mail service: Configure mails.services and mail-service.xml ( see installation guide or dowload the openkm project with jboss configured to see it ). Running first time OpenKM on Jboss under eclipseOn Jboss Server View tab, select option add and remove projects then add OpenKM.ear to configured projects. Run the server from eclipse( make sure that jboss uses jdk 1.5). If everything runs smoothly openkm has created a new directory on Jboss_Home called “repository” No you can try OpenKM application from your web browser on http://localhost:8080/OpenKM/ Configuring OpenKM project for developmentRun Jboss server on debug mode on eclipse: Remove OpenKM.ear project from server. Select add and remove projects option and remove OpenKM.ear. Add java source to configuration launch. Select edit configuration launch option and go to source tab. Add a the OpenKM java project. Configure OpenKM project archives to explode on jboss deploy folder server. For it select project archives tab. Select OpenKM.war and select Edit Archive option. Enable explode archiving. Select OpenKM.ear and and select Edit Archive option. Change destination to your system jboss deploy path and Enable explode archiving. Note: ensure enable explode archiving option is enabled,sometimes jboss tools seems not setting well. On deploy folder (jboss server) must have a OpenKM.ear directory ( not OpenKM.ear file, if not appears take a look at configuration to see explode is yet enabled ). Now we can run on debug mode jboss with OpenKM, if all is ok you must see a screen like this. Note: Every changes made on java class is refreshed automatically, and every change on GWT code needs to run external tool to generate frontend or backend. For fastly compiling we use on development firefox, uncommenting gecko line on file Main.gwt.xml GWT compilation only for gecko browser runs fine. Don’t forget at finish to comment it and try application with IE or other browsers. Now are two files called Main.gwt.xml one for frontend and other to backend <!-- Compile for firefox only more fastly for developement --> <set-property name="user.agent" value="gecko"/> Now we’ll setting GWT Shell Open run window you’ll see some GWT - OpenKM ( jboss ) entry. Run it, but ensure that jboss is running too, because shell now is configured as -no server option !!! Changes between developer guide 1.2 to 2.0
Changes between developer guide 1.0 and 1.1 to 1.2
Developers support on environment changes
If you are a developer or simply you want to be informed when some changes are made and affect to developer environment, email us and we’ll tell you, because developer guide only it’ll be remixed when a new version it’ll be released at last. We think development enviroment now is fine, and we doubt change it on new version. Althought it, especially when we make repository upgrades is needed on development to recreate repository several times on a week, this could be unpleasant for some developer if no are informed about it, because one or two weeks could be especially difficult to get a good cvs compiling code without problems. Normally when we are upgrading repository, the developers that are making UI changes must not check-outs cvs code for some time |