jLibrary

Open Source Document Management System from your Desktop

  • Developers
  • Help & Support
  • Enterprise
  • Documents & Articles
jLibrary » Development » Build deployment system (updated for jLibrary 1.1)

Information

Created in: 2007-06-03 13:44:14

Author: martin

Size: 3994 bytes

Last updated: 2007-06-03 13:44:14

Categories

Developers

You may be interested in...

jLibrary Developers Guide

jLibrary 1.0 build deployment system

First steps with jLibrary remote server

Build deployment system (updated for jLibrary 1.1)

General description

With jLibrary 1.1 (current development version) the build system has been migrated from Apache ant to Apache Maven. I have updated this build guide to the new version as the new features in jLibrary 1.1 really deprecate the old system. Also, the new version is hosted in the sourceforge.net SVN repository instead of the old CVS repository, so it´s quite important to make this explicitly clear.

You can still access the old build deployment system guide here though.

The new build system requires more steps than the old one, but it offers much more flexibility and specifically removes many of the dependencies that we had before, for example the old hardcoded dependencies in the base-deploy project which has disappeared. I have splitted this tutorial in several sections to make it easier to follow. As you will see, the tutorial is quite verbose and many of the sections are almost straightforward.

Also it´s worth to mention that jLibrary 1.1 uses the Maven PDE Plugin, therefore many of the steps that you will see for client deployment are almost a copy of the Maven PDE plugin getting started guide that you can read as introduction.

General Eclipse Setup

There is nothing really related with jLibrary in this section but with general Eclipse plugin deployment. You will install Eclipse and prepare it for plugin development.

  1. Download the Eclipse 3.2.2 SDK.
  2. Download the Eclipse RCP Runtime library for your platform.
  3. Download the Eclipse RCP delta pack.
  4. Download the GEF Runtime library.
  5. Install Eclipse. This tutorial assumes /eclipse as installation directory (this can be different in the screenshots though.).
  6. Install the GEF Runtime.
  7. Create a target directory at /eclipse/target. This uses to be a best practice for plugin development as you isolate your test bed system and your Eclipse installation.
  8. Extract the contents of the RCP Runtime library into /eclipse/target/eclipse
  9. Now the only tricky part. jLibrary requires some plugins that don´t come with the RCP Runtime binary and therefore you have to copy them by hand. Copy the following plugins into the /eclipse/target/eclipse/plugins folder:

    - org.eclipse.core.resources
    - org.eclipse.core.resources.compatibility
    - org.eclipse.core.runtime.compatibility
    - org.eclipse.core.runtime.compatibility.registry
    - org.eclipse.core.filesystem
    - org.eclipse.core.filbuffers
    - org.eclipse.draw2d
    - org.eclipse.gef
    - org.eclipse.jface.text
    - org.eclipse.text
    - org.eclipse.ui.forms
    - org.eclipse.ui.views
    - org.eclipse.ui.workbench.texteditor
    - org.eclipse.update.ui
    - org.eclipse.update.core

Downloading and configuring jLibrary

Once Eclipse is ready it is time to download jLibrary.

  1. First, download and install Maven 2 if you don´t have it yet.
  2. Create a plugins folder within your workspace (e.g. /eclipse/workspace/plugins). Maven PDE Plugin needs that folder to run.
  3. Download the jlibrary modules from SVN Using your favourite SVN client into /eclipse/workspace/plugins.



    You must finish with an filesystem structure
    like:

    /eclipse/workspace/plugins/org.jlibrary.client
    /eclipse/workspace/plugins/org.jlibrary.server
    ....

  4. Open the file /eclipse/workspace/plugins/org.jlibrary.client/buildConfiguration/build.properties. This file configures all the settings that the
    maven PDE plugin needs for building the org.jlibrary.client project. You need to change the values of the base and baseLocation properties pointing your
    Eclipse target parent and base installation, e.g. (base=/eclipse/target, baseLocation=/eclipse/target/eclipse).



    Additionally, you will to change all the settings to match your operating system and architecture.

  5. Now, open the file /eclipse/workspace/plugins/org.jlibrary.client/pom.xml and change the eclipseInstall property matching your target folder (e.g. /eclipse/target/eclipse). Normally you shoul not need to change the other values.


  6. Now open a command line console. Go to the plugins folder (/eclipse/workspace/plugins) and run the following command: mvn install. This command will build all the server and client projects. You will now find all the required jar and war files in the target folders within the different projects.

Running jLibrary client from the deployment

  1. After running mvn install (you can run this command only in the org.jlibrary.client folder, but remember to at least have built previously all the other projects)
    the Maven PDE plugin will create a jlibrary-build folder in your workspace directory (e.g. /eclipse/workspace/jlibrary-build). You will find there a zip file
    with the jlibrary client packaged for your platform. Uncompress the zipped file.
  2. Go into the jLibrary folder and run jlibrary.exe

Running jLibrary within Eclipse

  1. Define the target platform in Eclipse, under the preferences Window > Preferences > Plug-in Development > Target Platform,
    and replace the location value browsing to the location of your installed target (e.g. /eclipse/target/eclipse). This will load the new plug-ins.

  2. Import the org.jlibrary.client proyect into Eclipse. This project already has all the Eclipse artifacts (.project, .class,path, etc.) in the SVN so you shouldn´t need to do anything special to import it.

    If you are seeing missing libraries under the lib/ folder that means that you haven't run any maven command yet. There is a validate maven target that you can use to populate the lib/ folder with all the dependencies. In fact, each time that you change anything in a dependent project (like org.jlibrary.server for example) you have to run mvn validate from the command line. This command will repopulate all the libraries with the latest versions from the maven local repository.

    ( note also that mvn install first calls validate, so if you have followed this tutorial in order you won´t need to run any command at this point. )
  3. Open the jlibrary.product file.
  4. In the product wizard click the link Launch the product. This will launch jLibrary.

 


 

 

Copyright © 2004-2006 Martín Pérez Mariñán & others. Created with jLibrary. Design by Andreas Viklund.

Eclipse, Built on Eclipse and Eclipse Ready are trademarks of Eclipse Foundation, Inc.

SourceForge.net Logo Donate to this project
Built on EclipseTM RCP Hosted at sourceforge.net