Development Environment

From Giews

Jump to: navigation, search

To install the development environment, you can use either Eclipse or NetBeans.

If you prefer using NetBeans, please refer to this page.


Contents

[edit] Eclipse 3.3 with Eclipse Web Tools Project 3.0.2

Download here your version for Windows or Linux. Click here to find out how the eclipses are composed.

Or, if you can access the S-drive, use S:\GIEWS-Workstation3.0\tools\wtp3.zip (only windows!)

[edit] Eclipse Plugins

If you used the installer on the s-drive you don't have to add the updates. Otherwise: Open Eclipse. Go to Help/Software Updates/Find and Install/Search for new features to install. Click on the button import and import this xml below.

bookmarks.xml


If you are installing version 2.2.1 please see bug 205741 . This version requires that you add -XX:MaxPermSize=128m to the eclipse.ini file under the root folder.


When the "Install" dialog shows up, make sure the following entries are checked:

  • maven
  • spring ide dev
  • subversion
  • Web Tools Platform (WTP) Updates

Then press the Finish button. After the Update Manager finishes searching, you will be presented a dialog in which you can select the various subfeatures. maven: only select the Maven integration for Eclipse entry; spring ide dev: select the top most entry, since it only has one subfeature; subversion: select the two subentries Subversive SVN Team provider plugin and Subversive Client Libraries; Web Tools Platform (WTP) Updates; select the top most entry to include all of its leaves.


Note: Starting from version 1.1.3 Subversive includes JavaHL as a default Subversion client. This client is prepackaged by Windows native binaries only, which means that immediately after installation, default Subversion client can work on Windows only. If you want to use Subversive not under Windows OS after the installation you can go in the dialog Window -> Preferences -> Team -> SVN -> SVN Client and and you can switch to SVN Kit or Java SVN.

Note: Select only the subparts of the subversion plugin which are necessary. For instance you can select as well Mylin, but it is not needed and it will give problems.

[edit] Configure your eclipse shortcut

The maven plugin needs a jdk instead of an jre. Change the target of your shorcut like this:

  • C:\eclipses\wtp3\eclipse\eclipse.exe -vm "C:\Program Files\Java\jdk1.6.0_10\bin"

[edit] Fenix software from SVN

  • install eclipse with plugins
  • File... New -> other...
  • choose SVN folder -> select project from SVN
  • next (button)
  • create new repository location
  • next (button)
  • URL: https://svn.forge.osor.eu/svn/fenix (it used to be https://giews.svn.sourceforge.net/svnroot/giews/ when using sourceforge)
  • LABEL (use custom label): GIEWS
  • Authentication: (your username and password for SourceForge account) (save password if you want)
  • the client try to connect to the server
  • choose "trunk" folder
  • checkout the projects fenix-domain, fenix-gwt-dev, fenix-persistence, fenix-web
  • checkout as following repository resources as projects
  • finish (button)

[edit] Tomcat 6.0

The current Server project in Source Forge is assuming that you will have Tomcat 6.0 on your local machine and added this as a server within Eclipse.

  • download and install tomcat 6.0 on your computer
  • tell eclipse that you have this server by preferences/server etc
  • in eclipse you can add a server view (menu/windows/show view) and you will see the tomcat server with the fenix-web application

[edit] Install Maven

In order to use Maven also outside eclipse it is necessary to download and install Maven.


[edit] Set the Java settings

  • install java jdk 1.6 update 2 on your machine
  • download the latest jdk
  • go to window/preferences/java/Installed JRE/
  • point to your Java installation (note that you pointing your JRE to a JDK installation!)

Note: The fenix projects use the java settings of your workspace. The projects do not have project specific settings specified.

[edit] Finalizing

Repeat for the projects fenix-domain, fenix-persistence and fenix-web these steps:

  • select the project
  • right mouse click/Run as/Maven2 install
  • select the project again
  • Press F5 (refresh)

At bad days this step is not working using the maven plugin of Eclipse. Install Maven outside eclipse and run this command mvn install in the directory of each project.

  • in fenix-web, right-click on Fenix-Windows-Compile.launch, select Run As Fenix-Windows-Compile
  • select the project again
  • Press F5 (refresh)

[edit] Really Finalizing

  • go to the server tab (Window/Show view/server)
  • add fenix-web to the server (select server, right mouse, click/add remove projects)
  • publish the server
  • start the server
  • go to http://localhost:8080/fenix-web and you will see fenix in your browser!

[edit] Postgres and PostGis

You might want to install Postgres and PostGis. Here is the software and my report of the installation on XP: S:\GIEWS-Workstation3.0\tools\post gres gis

Go to the Postgis Installation page if you need to install fenix-geoserver + postgis.


[edit] Problem solving

In case of problems one or more of the following might help

  • Menu/Project/clean
  • select the project with problems and do refresh
  • select the project with problems, right mouse click/Run as/Maven2 clean. Next an install
  • download the latest jdk
  • mvn -U compile (on the prompt, in case of Maven problems, forces an update of Maven itself)

[edit] Known Problems

  • After a restart, exclipse is reporting that it has found fenix-domain or fenix-persistence twice.
    • right mouse click on fenix-web
    • select properties
    • select J2EE module dependencies
    • de-select fenix-domain and fenix-persistence
    • click ok and then again:
    • select fenix-domain and fenix-persistence
    • run fenix-web on your local tomcat eclipse server
    • go!
  • Whatever you do, fenix-web on the server is using an old version of fenix-domain or fenix-persistence
    • delete fenix-web from your server and clean your server
    • delete fenix-web from your workspace and check it out again from SVN
  • When you start the tomcat server after 45 seconds, if fenix isn't still up, it stops itself with a very annoying "timeout"
    • You can avoid this going in MenuBar - Window -Preferences - server and choosing the option Server timeout Delay with Unlimeted.


  • If you want to use the chart wizard you have to add this option: -Dserver -XX:MaxPermSize=256m (eventually -Dserver -XX:MaxPermSize=256m -ms256m -mx1024m) in Eclipse-Tomcat otherwise Tomcat could go in OutOfMemoryError


Image:Tomcat-Eclipse.png


  • Eclipse bails out with "OutOfMemoryError: PermGen space" error.

You may encounter this exception, especially if you're working on Linux or MacOSX, or if you're using many eclipse plugins at the same time. You can solve this problem by editing the eclipse.ini file and adding these lines:
-XX:+UseConcMarkSweepGC
-XX:+CMSPermGenSweepingEnabled
-XX:+CMSClassUnloadingEnabled
-XX:MaxPermSize=128m

Personal tools