Developing Mirth Connect in Eclipse - rbeckman-nextgen/test-mc GitHub Wiki

  1. Mirth Connect
  2. Home
  3. Development (Official)

Mirth Connect : Developing Mirth Connect in Eclipse

Created by Gerald Bortis, last modified by Nick Rupley on Jun 01, 2016

Introduction

Mirth Connect consists of six related projects: server, donkey, client (Administrator), manager (Server Manager), command (CLI), and webadmin (Web Dashboard). This article describes how to checkout the source for these projects into Eclipse.

Prerequisites

Instructions

  1. From Eclipse, go to File > New > Other... > SVN > Checkout Projects from SVN.

  2. Create a new repository location with "https://svn.mirthcorp.com/connect/".

  3. Select the trunk/server directory and click Finish.

  4. Repeat the above steps with the client, command, manager, donkey, and webadmin directories under trunk.

  5. You should now have six separate projects in Eclipse named Client, Command, Manager, Donkey, WebAdmin, and Server. You will notice that several of the projects have build errors. This is because you need to run an initial build that will copy artifacts across projects.

  6. Open the Ant view (Window -> Show View -> Ant), and drag mirth-build.xml into the view.

  7. Double-click the mirth-connect Ant task to execute the default "build" target.

    Icon Note that if you need the embedded Derby database to be recreated because of any changes in the trunk code, you should delete the mirthdb directory in appdata.

  8. When the build completes, refresh and clean the Client, Command, Manager, Donkey, WebAdmin, and Server projects.

  9. Under the Run button you should have four new run configurations for each project. Select the Mirth Connect Server. Once you see the splash screen appear in your console, you can start the Mirth Connect Client.

Comments:

Repository has changed to https://svn.mirthcorp.com/connect

Posted by satyam at Aug 31, 2012 02:24

Jacob, Thanks for the update. I was not 100% sure if me, as a newbie, was doing it right.

 

Posted by ensing at Oct 29, 2012 16:25

hi Jacob,

I have installed a distribution of Mirth 3.

I extracted the mirth-client.jar from under client-lib folder.

I have also downloaded the mirth 3 source from SVN/tags/3.0.0 have tried to change few things in the ui/file LoginPanel.java/form underclient/ui.

I have compliled the file successfully and picked up the classes and have replaced the class files back into extracted mirth-client.jar into its respective folder.

I removed all files under META-INF except manifest.mf

I edited the file mafest.mf and deleted all signatures keeping the class names intact.

Then I repackaged into mirth-client.jar.

Then I signed it using the keystore which I got under the source code under server/keystore.jks

I replaced the original mirth-client.jar into the distribution with the new mirth-client.jar undet client-lib folder.

Now, when I try to run the client I get this error -

"jar resources in jnlp file are not signed by the same certificate"

I dont know exactly what would be the better way of getting around this error. Please help

Souvick

Posted by souvicks at Nov 15, 2013 06:59

Step 4 – What about generator and simplesender? I see those on the svn server but they are not mentioned in the instructions.

Posted by dmooney at Oct 27, 2014 13:42

I tried building Mirth Connect using Ant from the command line.  But that failed with the following error message:

jspc:


BUILD FAILED
C:\users\cvanvranken\Documents\Github\mirth-3.1.1\trunk\server\mirth-build.xml:30: The following error occurred while executing this line:

C:\users\cvanvranken\Documents\Github\mirth-3.1.1\trunk\webadmin\build.xml:47: jasper2 doesn't support the "addWebXmlMappings" attribute

I submitted a support ticket and was told I should build inside of Eclipse with the Ant View

  • After Importing Mirth Connect Projects into Eclipse
  • Open the Ant view within Eclipse, and drag mirth-build.xml into the Ant view. Next double click on it (the "mirth-connect" item at root of the tree) to start building the project.
Posted by cvanvranken at Mar 19, 2015 13:06

Enter keystore passphrase ? Wath's the key?

Posted by w123012306 at Apr 02, 2015 01:43

Since version 3.2, JDK 7 needs to be used to compile MC

Posted by daniel at May 01, 2015 06:20

Checking out with JDK 8 and Eclipse Mars found I had to add this setting in eclipse.ini to allow it to be checked out from SVN repo:

-Djsse.enableSNIExtension=false

 

Posted by fparth at Aug 12, 2016 10:08

trunk now needs JDK 8 to compile, e.g. with the use of lambda expressions in:

com.mirth.connect.client.ui.components.tag.MirthTagWebController.updatePopupWindow(String)

Posted by daniel at Jan 17, 2017 08:30

I have tried to follow these instructions.  My console generates a lot of text that starts as follows:

Buildfile: E:\workspace2\Server\mirth-build.xml
init:
build-donkey:
init:
clean:
[delete] Deleting directory E:\workspace2\donkey\classes
[delete] Deleting directory E:\workspace2\donkey\setup
compile:
[mkdir] Created dir: E:\workspace2\donkey\classes
[javac] Compiling 164 source files to E:\workspace2\donkey\classes
[javac] Note: Some input files use unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.
build-model:
[jar] Building jar: E:\workspace2\donkey\setup\donkey-model.jar
build-server:
[jar] Building jar: E:\workspace2\donkey\setup\donkey-server.jar
[copy] Copying 24 files to E:\workspace2\donkey\setup\lib
create-setup:
[mkdir] Created dir: E:\workspace2\donkey\setup\docs
[copy] Copying 1 file to E:\workspace2\donkey\setup\docs
build:
[delete] Deleting directory E:\workspace2\server\lib\donkey
[copy] Copying 1 file to E:\workspace2\server\lib\donkey
[copy] Copying 1 file to E:\workspace2\server\lib\donkey
[copy] Copying 4 files to E:\workspace2\server\lib\donkey...

There are a lot of warnings, including warnings like this: Warning: E:\workspace2\server\lib\extensions\datapruner does not exist.

But nothing says "BUILD FAILED."

Eventually, the build ends with the following:

...test-run:
init:
test-init:
test-compile:
[mkdir] Created dir: E:\workspace2\client\test_classes
[javac] Compiling 1 source file to E:\workspace2\client\test_classes
test-run:
init:
remove-classes:
init:
remove-classes:
[delete] Deleting directory E:\workspace2\donkey\classes
[delete] Deleting directory E:\workspace2\donkey\test_classes
init:
remove-classes:
[delete] Deleting directory E:\workspace2\server\classes
[delete] Deleting directory E:\workspace2\server\test_classes
init:
remove-classes:
[delete] Deleting directory E:\workspace2\client\classes
[delete] Deleting directory E:\workspace2\client\test_classes
BUILD SUCCESSFUL
Total time: 2 minutes 35 seconds

However, the Eclipse neon.3 package explorer shows a red explanation point (warning) for Client and Server, red "x"s on the lower left corner of the file folder icons for Command and Manager, and WebAdmin.

When I attempt to run the server by right-clicking on "Mirth Connect Server.launch 8075" in the server package, and selecting "Run as / Mirth Connect Server" I get a dialog box telling me that the project has errors. If I proceed with the launch, I get an immediate message telling me "could not find or load main class com.mirth.connect.server.Mirth

On the "Create, manage, and run configurations" dialog I have the following:

The run configuration for Server has project: Server, Main class com.mirth.connect.server.Mirth, and no checkboxes checked for including system libraries or inherited mains when searching for a main class.

The VM arguments are -Xmx512m (line) -Djava.awt.headless=true (line) -Dapple.awt.UIElement=true, and working directory set to the default of ${workspace_loc:Server}

The JRE is set to Project JRE (jdk1.8.0_112)

The Classpath shows JRE System Library under Bootstrap Entires and Server (default classpath) under User Entries.

The Source is "Default".

Environment tab is empty.

Common tab has Shared file: \Server and allocate console is checked. 

I am unfamiliar with Ant, somewhat familiar with Maven.  I'm sure I'm making some obvious mistake. Can anyone tell me what it might be? Any assistance appreciated.

Thanks.

 Mitch

 

Posted by mitch_nchin at Nov 08, 2017 10:32

I don't follow what is going on, but after going through the build again (and getting similar results) I am now able to run the server, and the Eclipse GUI does not show exclamation points or "x"s. I note that the version is reported as 3.6.0.

 

Posted by mitch_nchin at Nov 08, 2017 15:47

Well, another newbie question.  I have Mirth server running in eclipse.  I attempted to add logger calls in DonkeyMessageController.java.

On startup, the server prints INFO messages to the eclipse "console" window, and a logger.info("Test"); from within a Javascript transformer shows up when I process a message on a channel.  However, a call from inside DonkeyMessageController to logger.info("From DonkeyMessageController"); does not produce output in the eclipse console, even though creating a PrintWriter and writing to it from within DonkeyMessageController.java "reprocessMessages" does write to an external file.

I'm clear that I'm missing something about internal calls to logger, but not clear on what.  Any ideas welcome. Thanks.

Posted by mitch_nchin at Nov 14, 2017 10:25

Document generated by Confluence on Nov 11, 2019 08:40

Atlassian

⚠️ **GitHub.com Fallback** ⚠️