Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.



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



Panel
borderWidth2
borderStylesolid

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.

...

Info

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

...

  • Download the Weasis code templates
  • In Window > Preferences > Java > Code Style > Code Templates , click on Import and select the weasis-code-style-template.xml file
  • Press OK after importing

Install egit and m2eclipse into

...

Eclipse (already included in recent versions) 

Install the plug-ins into Eclipse

...

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 6 8 location in the eclipse.ini file.

...

  • Getting the Source
    • For external Git client, see Building Weasis.
    • From Eclipse Git perspective: Window > Open Perspective > GIT Repository Exploring. Click on button "Clone a GIT repository".
    • In the New dialog, Add one of the following URIs:
      • githttps://github.com/nroduit/Weasis.git (public repository)
      • *https://weasis.repositoryhosting.com/git/weasis/weasis-dev.git* (read-write Git access  (private repository for developers, enter your login)
    • Press, Next and then Finnish
    • Open File > Import...
    • In the New dialog, select Maven > Existing Maven Projects, click Next and select the "Weasis" or "weasis-dev" directory

      Info
      titleNot necessary to get all the Maven projects visible into Eclipse

      Deselect All and select only the plugins your are interested in (at least weasis-launcher and weasis-framework).


    • Connect imported Maven projects to GIT: Select all the projects, right click "Share Project...", select GIT. In Dialog, select "Use or create repository on in parent folder of project"

      Info
      titleEgit tutorial:
       http://wiki.eclipse.org/EGit/User_Guide 


  • Building Weasis plug-ins
    • Select the weasis-framework project (or the pom.xml in the project)
    • Right click, Run as > Maven Install (Compiling and installing all the plug-ins in the local Maven repository)

      Info
      titleErrors on the projects. Try the following instructions:
      •  With m2e (from Eclipse 3.7), right click on the project and Maven > Update Project Configuration
      • Right click on the project and select Refresh
      • Project > Update All Maven Dependencies
      • Project > Clean all projects
      • Right click on the project and select Close Project and then Open Project


...

  • Building Weasis Distributions
    • Requires to install all the plug-ins (see Building Weasis plug-ins above)
    • If weasis-distributions project is not in the Package Explorer list, import it:
      • Open File > Import...
      • In the Import dialog, select Maven > Existing Maven Projects, click Next
      • Click on Browse and select the weasis-distributions folder (in yourWorkspace/weasis-framework)
      • Press Select All and Finnish
    • Select the weasis-distributions project
    • Right click, Run as > Maven Package
    • The distribution files are located in the target/dist folder of the project
    • See Building Weasis from source for more advanced options.

Anchor
debug
debug
Debug or Run from Eclipse

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

  • Open Run > Debug Configurations...
  • Create a new Java Application
  • In the Main tab, enter:
    • Project: weasis-launcher
    • Main Class: org.weasis.launcher.WeasisLauncher
  • In the Arguments tab
    • Program arguments, examples for loading DICOM locally:

      No Format
      $dicom:get -l "/home/user/Images/MRIX LUMBAR" "/home/user/Images/Dicom Test"
      $dicom:get -l "D:\\images\\dicom"
      


      Tip
      titleMore commands

      See Weasis commands


    • VM arguments, minimal configuration:

      No Format
      -Xms32m -Xmx512m -Dmaven.localRepository="your_path/.m2/repository" -Dgosh.args="-sc telnetd -p 17179 start" -Dmaven.localRepository="your_path/.m2/repository" 
      


      Info
      titlemaven.localRepository

      The maven.localRepository parameter is not required any more from weasis 2.6.0.

      Replace your_path by your real path and use standard URL syntax, ex : "C:/Documents%20and%20Settings/user/.m2/repository")


    • Other VM arguments

      No Format
      -Dfelix.config.properties=file:conf/config.properties
      -Djava.ext.dirs=""
      Dfelix.extended.config.properties=file:conf/ext-config.properties


      Info
      titleMeaning of the properties
      • felix.config.properties define defines the path location of config.properties (the OSGI configuration java.ext.dirs define the path of the external libraries of JRE. With an empty value, the libraries in the JRE ext folder are not loaded. Avoid having a conflict with JAI libraries if they are present in the JRE ext folder.and the list of plug-ins to install/start)
      • felix.extended.config.properties defines the location of ext-config.properties (extends/overrides config.properties)


      Tip
      titleLaunching the default profile of dicomizer

      -Dfelix.extended.config.properties=file:conf/ext-dicomizer.properties