-
Notifications
You must be signed in to change notification settings - Fork 278
Clone Build and Run from Source
This document describes how to build and run Mirth Connect from its source.
Clone the Mirth Connect GitHub repository:
git clone https://github.com/nextgenhealthcare/connect.git
Create a local branch from development for your changes (SourceTree application shown in images).
Download and install Eclipse.
- In Eclipse, File > Import > General > Existing Project into Workspace.
- Choose the root folder containing the git repo. This will contain subfolders for client, donkey, server, etc.
Select the main projects:
- Client
- Command
- Donkey
- Manager
- Server
- Webadmin
Click "Finish"
You now have Mirth Connect's source code loaded into Eclipse.
Mirth Connect uses Apache Ant for its build. In the Eclipse Menu show the Ant view:
- Window > Show View > Ant
The build file mirth-build.xml
will build:
- CLI
- Client
- Donkey
- Extensions (Server and Custom)
- Manager
- Server
- WebAdmin
Load the Mirth Connect build file:
- Drag
Server/mirth-build.xml
into the Ant view.
Ensure ANT is configured to use Java 1.8.
Click Apply
Note: If you need to build with another Java version (for example OpenJDK9), at the moment, you will need to edit the
build.xml
file and follow the instructions in the comments surrounded by "<!-- Uncomment the following and ... -->". There are several places in thebuild.xml
file where this needs to be performed.
Start a build of Mirth Connect:
- Double click "build [default]"
The full build will take some time, so the next section will detail how to make a good Bolognese sauce from scratch while you wait (kidding).
Once you see the glorious words "BUILD SUCCESSFUL" your build is complete.
You may need to refresh the projects in the Package Explorer to get it to recognize the build changes and remove any errors it sees.
The Mirth Connect project includes run configurations so the first thing to do is load Mirth Connect's Run Configurations:
- Eclipse menu > Run > Run Configurations...
Expand the Java Application section and you will see several Mirth Connect configurations:
- Start with "Mirth Connect Server"
Here you can change the configuration like Java arguments and what JRE to use. Mirth Connect should just work with Java 1.8. However, if you need to use a different Java version (ex: OpenJDK9) then you will need to provide extra VM arguments. The list of arguments is located in the file mcservice-java9+.vmoptions
:
server/docs/mcservice-java9+.vmoptions
Click "Run"
The first time the Server project runs it will create an appdata directory when Mirth Connect Server doesn't see one.
You should see the following if it was able to successfully start Mirth Connect Server:
ERROR 2020-04-29 16:27:29,327 [main] com.mirth.connect.server.extprops.ExtensionStatuses: Unable to find appdata directory: appdata
INFO 2020-04-29 16:27:48,474 [Main Server Thread] com.mirth.connect.server.Mirth: Mirth Connect 3.9.0 (Built on April 29, 2020) server successfully started.
INFO 2020-04-29 16:27:48,477 [Main Server Thread] com.mirth.connect.server.Mirth: This product was developed by NextGen Healthcare (https://www.nextgen.com) and its contributors (c)2005-2020.
INFO 2020-04-29 16:27:48,478 [Main Server Thread] com.mirth.connect.server.Mirth: Running Java HotSpot(TM) 64-Bit Server VM 1.8.0_241 on Mac OS X (10.14.6, x86_64), derby, with charset UTF-8.
INFO 2020-04-29 16:27:48,480 [Main Server Thread] com.mirth.connect.server.Mirth: Web server running at http://192.168.1.31:8080/ and https://192.168.1.31:8443/
Again, go to Run Configurations and this time select Mirth Connect Client.
Configure it as necessary then click "Run".
If all goes well, you should see the Mirth Connect Administrator.
Note, IDE builds of Mirth Connect are self-signed. This means the Mirth Connect Administrator Launcher will not be able to validate the chain of trust and, thus, will not launch the client without you taking extra measures like 1) signing your Mirth Connect Jars with a trusted certificate (recommended) or 2) if you are just testing for development, forcing the Mirth Connect Administrator Launcher to allow Jars signed with a self-signed certificate (the
-k
option).
After you've made your changes and you want to contribute them back to the open source project, you will need to commit and push your local branch to remote.
Lastly, create your pull request in GitHub to merge your branch into development.
- Home
- Frequently Asked Questions
- Source Code Contribution
- Java Licensing
- How to Contribute to the Wiki
- Administrator Launcher (MCAL)
-
Mirth Connect
-
Release Notes
- 4.5.0 - What's New
- 4.4.0 - What's New
- 4.3.0 - What's New
- 4.2.0 - What's New
- 4.1.0 - What's New
- 4.0.0 - What's New
- 3.12.0 - What's New
- 3.11.0 - What's New
- 3.10.0 - What's New
- 3.9.0 - What's New
- 3.8.0 - What's New
- 3.7.0 - What's New
- 3.6.0 - What's New
- 3.5.0 - What's New
- 3.4.0 - What's New
- 3.3.0 - What's New
- 3.2.0 - What's New
- 3.1.0 - What's New
- 3.0.0 - What's New
- Upgrading
-
Release Notes
- User Guide
- Commercial Extensions
- Examples and Tutorials