Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3
Note
titleIncomplete

This page needs your help to finish.

Tips on how to configure Eclipse to contribute to sipXconfig project.

Tip

If you are building sipXecs older than 4.5, look at this page's history for any specific details.

General Remarks

You should feel free to use whatever developement environment suits your needs. If you happen to use NetBeans, emacs or anything else please share your experience. Let sipx-dev@sipfoundry.org us know if you would like to keep configuration files for your environment in sipXconfig subversion repository.

...

  1. Go to Windows->Preference screen
  2. Select Java->Build Path->Classpath Variables and add the following
Panel

SIPX_SRC_TOPSRCDIR=path to top source directory SIPX

SIPXCONFIG_BUILD_TOP=path to top build directory

If you are working on sipXconfig 4.0 or earlier you also need:

Panel

SIPX_CONFIG=path to sipXconfig directory - SIPX_SRC_TOP/sipXconfig
SIPX_COMMONS=path to sipXcommons directory - SIPX_SRC_TOP/sipXcommons
SIPX_BUILD=path to sipXconfig build output - SIPX_BUILD_TOP/sipXconfig

The sipXconfig directory is located where you checked it out using Subversion or git.
You need a separate Eclipse workspace for each Eclipse branch, since each branch will have a different SIPX_SRC_TOP setting.

Panel

JAVA_LIBDIR=path to the default jar installation directory

On most systems it will be: /usr/share/java. If your distribution is using jpackage-utils to install java packages you can probably find the proper value for this property by running:

Panel

grep JAVA_LIBDIR /etc/java/java.conf

If you have source code for Tapestry, Spring, and other modules, then set the LIB_SRC variable to point to the parent directory of the directory in which sources are kept, for example:

Panel

LIB_SRC=/opt/libsrc

...

SRCDIR=SIPX_SRCDIR/sipXconfig used to avoid some circular imports in Eclipse
SIPX_BUILDDIR=path to top build directory
SIPX_JAVADIR=path to the share/java directory where you install sipxecs. Example: /usr/local/sipx/share/java
LIBSRC=path where you want to store source code for all the dependencies. Not required, but very useful for stepping through code. Example: /home/dhubler/libsrc

You need a separate Eclipse workspace for each source code directory, since each branch will have a different SIPX_SRCDIR setting.

Classpath variables used in other projects:

Panel

SIPX_PREFIX=path to top install directory
OPENFIRE-ROOT=path to openfire root (usually /opt/openfire)

...

Other plugins have to be downloaded and install manually (by copying the plugin to /path/to/eclipse/plugins directory).

Checkstyle Plugin

Step 1. Install checkstyle plugin from with update URL: http://eclipse-cs.sf.net/update/
Step 2. Go to Window->Preferences->Checkstyle
Step 3. Click "New..." in the "Global Check Configurations" and add new "External Configuration File" entry call "sipxecs" with location specifying path to your-source-directory/config/checkstyle/checktyle.xml. Before leaving this dialog, click on "Additional properties", and specify your-source-directory/config/checkstyle for variable "top.dir"
Step 4. Click on the new "sipxecs" Check Configuration and "Set as Default" button.

Image Added

Projects

The last step is opening sipXconfig projects. All necessary configuration files are kept in subversion repository (these are .project and .classpath file in sipXconfig subdirectories) - it's easy to open projects in Eclipse by importing them.

  • go to File->Import...
  • select General->Existing Project into Workspace
  • browse for your sipXconfig sipXecs source code directory (the same as set in SIPX_CONFIG SRCDIR property above) and press OK
  • Eclipse 3.1 will find all sipXconfig eclipse projects (neoconf, web, profilegenerator etc.), older versions of Eclipse will prompt you for each project separatelypress Select All, and , select only the project you think you'll need. You will almost alway need sipXcommons project because most project will require that project to be loaded.
  • press Finish

All projects are automatically compiled in background. You are ready to go.

...

Please see this document for more details.

Eclipse on Gentoo

...

.

...