Difference between revisions of "Developer Guide"

From OpenKM Documentation
Jump to: navigation, search
Line 8: Line 8:
 
* Subversion eclipse plugin at http://subclipse.tigris.org/update_1.6.x
 
* Subversion eclipse plugin at http://subclipse.tigris.org/update_1.6.x
 
* Maven to eclipse plugin at http://m2eclipse.sonatype.org/update
 
* Maven to eclipse plugin at http://m2eclipse.sonatype.org/update
 
 
* Java JDK 1.6  at http://java.sun.com/javase/downloads/index.jsp
 
* Java JDK 1.6  at http://java.sun.com/javase/downloads/index.jsp
 
  
 
== Configuring maven ==
 
== Configuring maven ==
Line 16: Line 14:
  
 
Really we'll use maven in operating system console only for some special operations like installing external libraries.  
 
Really we'll use maven in operating system console only for some special operations like installing external libraries.  
 
  
 
In GNU Linux Ubuntu for example you could be good adding it in .bashrc
 
In GNU Linux Ubuntu for example you could be good adding it in .bashrc
 
  export PATH=$PATH:/home/jllort/software/apache-maven-2.2.1/bin
 
  export PATH=$PATH:/home/jllort/software/apache-maven-2.2.1/bin
 
  
 
== Configuring java to eclipse ==
 
== Configuring java to eclipse ==
 
Go to '''Window''' / '''Preferences''' / '''Java''' / '''Installed JRE'''. You must have JDK 1.6 defined here.
 
Go to '''Window''' / '''Preferences''' / '''Java''' / '''Installed JRE'''. You must have JDK 1.6 defined here.
 
  
 
[[File:Okm_dev_guide_004.jpeg‎]]
 
[[File:Okm_dev_guide_004.jpeg‎]]
 
  
  
 
[[File:Okm_dev_guide_005.jpeg‎]]
 
[[File:Okm_dev_guide_005.jpeg‎]]
 
 
  
 
== Checkout OpenKM from svn ==
 
== Checkout OpenKM from svn ==
 
Go to '''File''' / '''New''' / '''Other''' and select '''Maven''' / '''Checkout Maven Projects from SCM'''
 
Go to '''File''' / '''New''' / '''Other''' and select '''Maven''' / '''Checkout Maven Projects from SCM'''
 
  
 
[[File:Okm_dev_guide_001.jpeg‎]]
 
[[File:Okm_dev_guide_001.jpeg‎]]
 
  
 
Select the '''svn''' type and typewrite the url https://openkm.svn.sourceforge.net/svnroot/openkm/branches/4.0/openkm to refer version 4.0.
 
Select the '''svn''' type and typewrite the url https://openkm.svn.sourceforge.net/svnroot/openkm/branches/4.0/openkm to refer version 4.0.
 
  
 
[[File:Okm_dev_guide_002.jpeg‎]]
 
[[File:Okm_dev_guide_002.jpeg‎]]
 
  
 
[[File:Okm_dev_guide_003.jpeg‎]]
 
[[File:Okm_dev_guide_003.jpeg‎]]
Line 53: Line 41:
  
 
After OpenKM it'll be donwloaded, automatically it'll be compiled
 
After OpenKM it'll be donwloaded, automatically it'll be compiled
 
  
 
== Installing external libraries to maven repository ==
 
== Installing external libraries to maven repository ==
Line 59: Line 46:
 
Go to your OpenKM project path in your file system.  
 
Go to your OpenKM project path in your file system.  
 
Come into ext-libs and execute install.sh ( Windows users simply open this file with text editor and execute the command )
 
Come into ext-libs and execute install.sh ( Windows users simply open this file with text editor and execute the command )
 
  
 
== Execute packaging ==
 
== Execute packaging ==
Line 95: Line 81:
  
 
For better developement we recomend not deploying OpenKM.war file it's better setting in $JBOSS_HOME/server/default/deploy some alias to target/OpenKM folder
 
For better developement we recomend not deploying OpenKM.war file it's better setting in $JBOSS_HOME/server/default/deploy some alias to target/OpenKM folder
 
  
 
[[File:Okm_dev_guide_011.jpeg‎]]
 
[[File:Okm_dev_guide_011.jpeg‎]]
 
  
 
In case you're making strong changes in OpenKM UI ( GWT ) we recomend disabling pom compile directive  
 
In case you're making strong changes in OpenKM UI ( GWT ) we recomend disabling pom compile directive  
Line 104: Line 88:
 
<source lang="xml">
 
<source lang="xml">
 
<plugin>
 
<plugin>
        <groupId>org.codehaus.mojo</groupId>
+
    <groupId>org.codehaus.mojo</groupId>
 
         <artifactId>gwt-maven-plugin</artifactId>
 
         <artifactId>gwt-maven-plugin</artifactId>
 
         <version>1.1</version>
 
         <version>1.1</version>
Line 119: Line 103:
 
           </execution>
 
           </execution>
 
         </executions>
 
         </executions>
      </plugin>
+
    </plugin>
 
</source>
 
</source>
 
  
 
You might be interested in running frontend and backend GWT packaging from eclipse. Go to run configurations and add in maven build
 
You might be interested in running frontend and backend GWT packaging from eclipse. Go to run configurations and add in maven build
Line 138: Line 121:
 
<set-property name="user.agent" value="gecko"/>
 
<set-property name="user.agent" value="gecko"/>
 
</source>
 
</source>
 
  
 
==== Changes between developer guide 4.0 to 5.0 ====
 
==== Changes between developer guide 4.0 to 5.0 ====
 
* GWT 1.7.1
 
* GWT 1.7.1
 
  
 
==== Changes between developer guide 2.0 to 4.0 ====
 
==== Changes between developer guide 2.0 to 4.0 ====
 
* Changed to Eclipse Galileo
 
* Changed to Eclipse Galileo
 
* Now we use maven not jboss tools
 
* Now we use maven not jboss tools
 
  
 
==== Changes between developer guide 1.2 to 2.0 ====
 
==== Changes between developer guide 1.2 to 2.0 ====
Line 157: Line 137:
 
* Added new generateback.sh and generateback.bat to GWT admin.
 
* Added new generateback.sh and generateback.bat to GWT admin.
 
* Upgraded jboss server to version 4.2.2GA
 
* Upgraded jboss server to version 4.2.2GA
 
  
 
==== Changes between developer guide 1.0 and 1.1 to 1.2 ====
 
==== Changes between developer guide 1.0 and 1.1 to 1.2 ====
Line 165: Line 144:
 
* Configured generate.sh to deploy to tmp jboss with OpenKM.ear deployed to fast developing.
 
* Configured generate.sh to deploy to tmp jboss with OpenKM.ear deployed to fast developing.
 
* Added gecko to Main.gwt.xml to fast compiling only gecko when is uncommented.
 
* Added gecko to Main.gwt.xml to fast compiling only gecko when is uncommented.
 
  
 
==== Developers support on environment changes ====
 
==== Developers support on environment changes ====
Line 173: Line 151:
 
We think development enviroment now is fine, and we doubt change it on new version.
 
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
 
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
 
  
 
[[Category: OpenKM 4.0]]  
 
[[Category: OpenKM 4.0]]  
 
[[Category: OpenKM 5.0]]
 
[[Category: OpenKM 5.0]]

Revision as of 18:46, 21 January 2010

You need to install Maven, eclipse IDE and some plugins.

For OpenKM 4.0 and 5.0

Configuring maven

Refer to maven installation at http://maven.apache.org/download.html#Installation

Really we'll use maven in operating system console only for some special operations like installing external libraries.

In GNU Linux Ubuntu for example you could be good adding it in .bashrc

export PATH=$PATH:/home/jllort/software/apache-maven-2.2.1/bin

Configuring java to eclipse

Go to Window / Preferences / Java / Installed JRE. You must have JDK 1.6 defined here.

Okm dev guide 004.jpeg


Okm dev guide 005.jpeg

Checkout OpenKM from svn

Go to File / New / Other and select Maven / Checkout Maven Projects from SCM

Okm dev guide 001.jpeg

Select the svn type and typewrite the url https://openkm.svn.sourceforge.net/svnroot/openkm/branches/4.0/openkm to refer version 4.0.

Okm dev guide 002.jpeg

Okm dev guide 003.jpeg


Be patient, first time you downloading OpenKM from svn, you're downloading all libraries to your maven repository. It could need some hours depending your Internet connection.

After OpenKM it'll be donwloaded, automatically it'll be compiled

Installing external libraries to maven repository

Open an operating system console. Go to your OpenKM project path in your file system. Come into ext-libs and execute install.sh ( Windows users simply open this file with text editor and execute the command )

Execute packaging

Into eclipe select openkm root folder.

Open contextual menu and select Run As / Maven Package OpenKM.War it'll be appears created under target folder


Okm dev guide 006.jpeg


Configuring jboss server

Go to servers tab. Using contextual menus select Add / server

Select jboss server


Okm dev guide 007.jpeg


Okm dev guide 008.jpeg


Okm dev guide 009.jpeg


Okm dev guide 010.jpeg


Recomendations

We recomend donwloading jboss+openkm from sourceforge, remove OpenKM.war and develop with this jboss server configuration.

For better developement we recomend 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

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

<plugin>
    <groupId>org.codehaus.mojo</groupId>
        <artifactId>gwt-maven-plugin</artifactId>
        <version>1.1</version>
        <configuration>
            <runTarget>es.git.openkm.frontend.Main/index.html</runTarget>
        </configuration>
        <executions>
          <execution>
            <goals>
               <!-- <goal>compile</goal> -->
              <!-- <goal>generateAsync</goal>  -->
              <goal>test</goal>
            </goals>
          </execution>
        </executions>
    </plugin>

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 012.jpeg


Okm dev guide 013.jpeg


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"/>

Changes between developer guide 4.0 to 5.0

  • GWT 1.7.1

Changes between developer guide 2.0 to 4.0

  • Changed to Eclipse Galileo
  • Now we use maven not jboss tools

Changes between developer guide 1.2 to 2.0

  • Changed IDE to Eclipse Europa / Jboss tools, before was Jboss IDE.
  • GWT 1.5.3 is needed to compile, before was version 1.4.6
  • Changed packaging to new jboss tools packaging.
  • Changed GWT generating to temporary jboss folder to project folders to developing.
  • Added new generateback.sh and generateback.bat to GWT admin.
  • Upgraded jboss server to version 4.2.2GA

Changes between developer guide 1.0 and 1.1 to 1.2

  • GWT 1.4.6 is needed to compile, before was version 1.3.3.
  • Changes on GWT shell configuration, now not uses GWTDS variable ( code deleted ).
  • Configured generate.sh to deploy to tmp jboss with OpenKM.ear deployed to fast developing.
  • Added gecko to Main.gwt.xml to fast compiling only gecko when is uncommented.

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