Development tips OpenKM 5.1

From OpenKM Documentation
Jump to: navigation, search

We recommend downloading JBoss+OpenKM from SourceForge, remove OpenKM.war and develop with this JBoss server configuration. For better development we recommend not deploying OpenKM.war file it's better setting in $JBOSS_HOME/server/default/deploy some alias to target/OpenKM folder:

Okm dev guide 011.jpeg

Nota clasica.png To create symbolic links in windows use juntion.exe

In case you're making strong changes in OpenKM UI (GWT) we recommend disabling pom compile directive

              <!-- <goal>generateAsync</goal> -->
              <!-- <goal>test</goal> -->

Nota clasica.png Important, depending the number of cores and memory decrease the number of gwt instances compiled at same time decreasing locarlWorkers, otherside your computer may hang

Nota idea.png Is possible to compile GWT modules individually by this way:
$ mvn gwt:compile -Dgwt.module=com.openkm.frontend.Main

You might be interested in running frontend and backend GWT packaging from eclipse. Go to run configurations and add in maven build

Okm dev guide 031.jpeg

Okm dev guide 032.jpeg

To achieve a faster compile we use to 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.

<!-- Compile for Firefox only -->
<set-property name="user.agent" value="gecko"/>

User contribution script

# @author: Kenneth Walter

#Cleans and re-compiles the source files
mvn -Dmaven.test.skip=true clean gwt:compile install $*

#Set the TARGET_DIRECTORY to the path of your JBoss installation
#This will only attempt to replace the existing WAR if the new WAR exists
if [ -f $FILE_TO_MOVE ]
   echo 'Deploying WAR to JBoss Directory'
   cp -v $FILE_TO_MOVE $TARGET_DIRECTORY/server/default/deploy/.
   echo 'Done'

More info about this script at Cannot create or use example extensions forum thread.