Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
13 changes: 13 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Line-ending rules for files where endings are functional.
# (Pattern follows PR #214 by NicoPiel.)

# Unix start scripts must stay LF
/gradlew text eol=lf
oieserver text eol=lf
configure-from-env text eol=lf

# Windows scripts must stay CRLF
*.bat text eol=crlf

# Binary files are left untouched
*.jar binary
11 changes: 7 additions & 4 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,18 @@ jobs:
java-package: 'jdk+fx'
distribution: 'zulu'

- name: Set up Gradle
uses: gradle/actions/setup-gradle@ed408507eac070d1f99cc633dbcf757c94c7933a # v4.4.3
with:
validate-wrappers: true
Comment on lines +35 to +38

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the benefit of using this over the built-in wrapper? Wrapper validation?


- name: Build OIE (signed)
if: github.ref == 'refs/heads/main'
working-directory: server
run: ant -f mirth-build.xml
run: ./gradlew build

- name: Build OIE (unsigned)
if: github.ref != 'refs/heads/main'
working-directory: server
run: ant -f mirth-build.xml -DdisableSigning=true -Dcoverage=true
run: ./gradlew build -PdisableSigning=true -Pcoverage=true

- name: Package distribution
run: tar czf openintegrationengine.tar.gz -C server/ setup --transform 's|^setup|openintegrationengine/|'
Expand Down
27 changes: 15 additions & 12 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ donkey/donkey-test
# /client/src/com/mirth/connect/client/ui/panels/reference/

# /client/src/com/mirth/connect/client/ui/util/
/client/src/com/mirth/connect/client/ui/util/DocParser.java
/client/src/main/java/com/mirth/connect/client/ui/util/DocParser.java

# /client/src/com/mirth/connect/connectors/

Expand All @@ -205,7 +205,7 @@ donkey/donkey-test
# /client/src/com/mirth/connect/connectors/ws/

# /client/src/com/mirth/connect/plugins/
/client/src/com/mirth/connect/plugins/sampledashboardcolumn
/client/src/main/java/com/mirth/connect/plugins/sampledashboardcolumn

# /client/src/com/mirth/connect/plugins/dashboardstatus/

Expand Down Expand Up @@ -554,14 +554,14 @@ donkey/donkey-test
# /server/src/com/mirth/connect/model/util/

# /server/src/com/mirth/connect/plugins/
/server/src/com/mirth/connect/plugins/Graphical Mapper Transformer Step.xml
/server/src/com/mirth/connect/plugins/consoleconnectorstatus
/server/src/com/mirth/connect/plugins/Console Connector Status Monitor Plugin.xml
/server/src/com/mirth/connect/plugins/extendedhl7vocab
/server/src/com/mirth/connect/plugins/Extended HL7 Vocabulary.xml
/server/src/com/mirth/connect/plugins/Sample Dashboard Column Plugin.xml
/server/src/com/mirth/connect/plugins/ExtensionParser.xml
/server/src/com/mirth/connect/plugins/ExtensionRepositoryParser.java
/server/src/main/resources/com/mirth/connect/plugins/Graphical Mapper Transformer Step.xml
/server/src/main/java/com/mirth/connect/plugins/consoleconnectorstatus
/server/src/main/resources/com/mirth/connect/plugins/Console Connector Status Monitor Plugin.xml
/server/src/main/java/com/mirth/connect/plugins/extendedhl7vocab
/server/src/main/resources/com/mirth/connect/plugins/Extended HL7 Vocabulary.xml
/server/src/main/resources/com/mirth/connect/plugins/Sample Dashboard Column Plugin.xml
/server/src/main/resources/com/mirth/connect/plugins/ExtensionParser.xml
/server/src/main/java/com/mirth/connect/plugins/ExtensionRepositoryParser.java

# /server/src/com/mirth/connect/plugins/dashboardstatus/

Expand Down Expand Up @@ -612,7 +612,7 @@ donkey/donkey-test
# /server/src/com/mirth/connect/server/

# /server/src/com/mirth/connect/server/builders/
/server/src/com/mirth/connect/server/builders/VocalEZParser.java
/server/src/main/java/com/mirth/connect/server/builders/VocalEZParser.java

# /server/src/com/mirth/connect/server/controllers/

Expand All @@ -635,7 +635,7 @@ donkey/donkey-test
# /server/src/com/mirth/connect/server/util/javascript/

# /server/src/com/mirth/connect/util/
/server/src/com/mirth/connect/util/GenerateExtensionUpdate.java
/server/src/main/java/com/mirth/connect/util/GenerateExtensionUpdate.java

# /server/src/org/

Expand All @@ -650,3 +650,6 @@ donkey/donkey-test
# /server/src/org/mozilla/javascript/

# /server/src/org/mozilla/javascript/xmlimpl/
server/setup.tar.gz
dependency-check-report.html
dependency-check-report.json
1 change: 0 additions & 1 deletion .sdkmanrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# Enable auto-env through the sdkman_auto_env config
# Add key=value pairs of SDKs to use below
java=17.0.17.fx-zulu
ant=1.10.14
41 changes: 39 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,45 @@ git checkout -b feature/your-feature-name
```

### 5. Install Tooling
OIE specifies the working versions of Java and Ant in [.sdkmanrc](./.sdkmanrc). To take advantage of this, install [SDKMAN](https://sdkman.io/) and run `sdk env install`
in the project's root directory.
OIE specifies the working Java version in [.sdkmanrc](./.sdkmanrc). To take advantage of this, install [SDKMAN](https://sdkman.io/) and run `sdk env install`
in the project's root directory. No other tooling is required.

### 5a. Build
The build is driven by Gradle through the included wrapper; no separate Gradle install is needed:
```bash
./gradlew build -PdisableSigning=true # full build without jar signing
./gradlew test # run the unit tests (-Pcoverage=true for JaCoCo)
./gradlew dist # build the distribution extension zips
```
On Windows use `gradlew.bat` instead of `./gradlew`. The assembled distribution lands in `server/setup`, the same location the previous Ant build used. For release artifacts, run a clean build: `./gradlew clean build dist`. Windows with SDKMan may generate an error about the file path being too long in the javadoc step, skip this by adding `-x :server:userApiJavadoc` to your Gradle command.

Dependencies are pinned and checksum-verified. To change a dependency version: edit `gradle/libs.versions.toml`, then refresh the checksum metadata **with a cold dependency cache and CI's flags**:
```bash
GRADLE_USER_HOME=$(mktemp -d) ./gradlew --write-verification-metadata sha256 build dist -PdisableSigning=true -Pcoverage=true
```
The cold cache matters: a warm cache skips re-resolving already-cached parent POMs, so they never get recorded, and the build then fails verification only in CI (this bit us once during the migration). The run downloads everything once and takes a few minutes. Only when adding a **new** artifact that ships in the distribution does `gradle/vendored-layout.json` need a one-line placement entry, and the build fails with a message telling you so.

### Changing build logic

The build's correctness is guarded by output comparison, not by unit
tests of the build scripts. When you change build logic (staging,
packaging, jar definitions), confirm the change does not alter the
product: build `server/setup` before and after, and compare the two
trees. The [oie-build-parity](https://github.com/pacmano1/oie-build-parity)
tooling does this at the archive-entry level (and can reproduce the
original byte-identical comparison against the pre-Gradle Ant baseline).
Only the changes you intended should appear.

### Run and debug

```bash
./gradlew :server:createDerbyDb # one-time: create the embedded database
./gradlew :server:devRun # run the server from the development tree
./gradlew :server:devLauncher # run the server the way production starts it (from server/setup)
./gradlew :client:devClient # run the administrator client against https://localhost:8443
```

Add `--debug-jvm` to any of these to suspend on JVM start and attach a debugger on port 5005. The JDK module flags come from `server/conf/default_modules.vmoptions`, the same file the production launcher uses. For IDEs, import the repository as a Gradle project (IntelliJ does this natively; Eclipse via Buildship); the old `.classpath`/`.project` files are gone on purpose.

### 6. Implement your changes

Expand Down
10 changes: 6 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ FROM ubuntu:noble-20251013 AS builder
WORKDIR /app
# sdkman requires bash
SHELL ["/bin/bash", "-c"]
ARG ANT_BUILD_ARGS="-DdisableSigning=true"
ARG GRADLE_BUILD_ARGS="-PdisableSigning=true"

# Stage 1a: Install dependencies
# Install necessary tools
Expand All @@ -26,10 +26,12 @@ RUN apt-get update\

# Stage 1b: Build the application
# Copy the entire source tree (excluding .dockerignore files), and build
# (file encoding is pinned to UTF-8 in gradle.properties)
COPY . .
WORKDIR /app/server
RUN source "$HOME/.sdkman/bin/sdkman-init.sh" \
&& ANT_OPTS="-Dfile.encoding=UTF8" ant -f mirth-build.xml ${ANT_BUILD_ARGS}
RUN --mount=type=cache,target=/root/.gradle/caches,sharing=locked \
--mount=type=cache,target=/root/.gradle/wrapper,sharing=locked \
source "$HOME/.sdkman/bin/sdkman-init.sh" \
&& ./gradlew --no-daemon build ${GRADLE_BUILD_ARGS}

##########################################
#
Expand Down
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
- [Why Open Integration Engine?](#why-open-integration-engine)
- [Core Features](#core-features)
- [Who It’s For](#who-its-for)
- [Building from Source](#building-from-source)
- [Project Values](#project-values)
- [Community and Governance](#community-and-governance)
- [History and Roadmap](#history-and-roadmap)
Expand Down Expand Up @@ -70,6 +71,19 @@ The **Open Integration Engine Project** is an open-source initiative committed t

---

## Building from Source

The build is driven by Gradle through the committed wrapper; the only prerequisite is JDK 17 (see [.sdkmanrc](.sdkmanrc)):

```bash
./gradlew build # full build + tests; distribution lands in server/setup
./gradlew clean build dist # release form, plus extension zips in server/dist
```

On Windows use `gradlew.bat`. See [CONTRIBUTING.md](CONTRIBUTING.md) for the full command reference, the dependency policy, and how to run the server for development.

---

## Project Values

- **Community-Driven Development** – Innovation through global collaboration
Expand Down
Loading
Loading