{style}
.panel {-moz-border-radius: 7px;
border-radius: 7px;}
.panelMacro table {-moz-border-radius: 15px;
border-radius: 15px;}
{style}


This page is intended for developers who want to contribute to Weasis and it is a recommendation for developers who want to create their own plug-ins, see also How to build and install a plug-in.


We highly recommend the use of Eclipse IDE, because all the following instructions are based on it and some settings and the coding conventions can be imported directly into Eclipse. Nevertheless to have a better Maven integration, it is possible to use IntelliJ IDEA or Netbeans by configuring weasis-launcher as described in Debug or Run from Eclipse.

Prerequisites

  1. JDK 8 or higher
  2. Eclipse (recommended Eclipse IDE for Java Developers)
  3. Git, Eclipse egit plugin, or use external Git client - Included from Eclipse IDE for Java Developers 4.2.2
  4. m2eclipse plug-in (Maven integration for Eclipse) - Included from Eclipse IDE for Java Developers 3.7

Install Java and Eclipse

Configure Eclipse

Code Style And Convention

Weasis adheres to Sun's Code Conventions for the Java Programming Language

  1. Maximum line length is 120 characters (this is a deviation from the Java standards).
  2. Use spaces instead of tabs.
  3. Indendation size is 4 spaces.
  4. Do not insert a new line before opening brace. Insert a new line before closing brace.
  5. Use fully qualified import statements, i.e. do not use asterisks.

Install egit and m2eclipse into Eclipse (already included in recent versions) 

Install the plug-ins into Eclipse

Configure m2eclipse

m2eclipse provides comprehensive Maven integration for Eclipse. See http://maven.apache.org/guides/index.html

If you get the error message "Eclipse is running in a JRE, but a JDK is required" when starting Eclipse, you must specify the JDK 8 location in the eclipse.ini file.

  1. Maven has a settings file located in the Maven installation and/or user home directory that configure environmental specifics such as: HTTP proxy server, repository manager location, server authentication and passwords and other configuration properties.
    If the setting file does not exist in the user home directory, copy it from the conf folder of the Maven distribution. The default user location user.home/.m2/settings.xml is recommended if you use also the common Maven distribution (see Building Weasis from command line).
  2. Verify the Maven configuration of Eclipse in Window > Preferences > Maven > User Settings using the correct setting.xml file.

Getting the Source and Building Weasis From Eclipse

Debug or Run from Eclipse

For debugging Weasis, you need to create a Debug configuration: