From 7ef4ca95cd98e17a99c838792897639c2e40143f Mon Sep 17 00:00:00 2001
From: Haksun Li <65719379+haksunlinm@users.noreply.github.com>
Date: Mon, 19 Oct 2026 03:32:47 -0400
Subject: [PATCH] Use published NM Dev distribution 1.2.7
---
.github/workflows/model-tutorials.yml | 2 +-
README.md | 8 +++++---
pom.xml | 4 +++-
scripts/MODEL_DEMOS.md | 2 +-
scripts/run-model-demos.py | 2 +-
scripts/run-offline.sh | 2 +-
web/Dockerfile | 2 +-
web/README.md | 2 +-
web/smoke.py | 2 +-
9 files changed, 15 insertions(+), 11 deletions(-)
diff --git a/.github/workflows/model-tutorials.yml b/.github/workflows/model-tutorials.yml
index a19621b..0be6174 100644
--- a/.github/workflows/model-tutorials.yml
+++ b/.github/workflows/model-tutorials.yml
@@ -29,7 +29,7 @@ jobs:
run: |
mvn -B -ntp -U -Dmaven.test.skip=true clean package
mkdir -p target/model-runner
- javac -cp 'target/classes:target/lib/*' -d target/model-runner scripts/ModelDemoRunner.java
+ javac -cp 'target/classes:target/lib/nmdev-dist-1.2.7.jar:target/lib/*' -d target/model-runner scripts/ModelDemoRunner.java
- uses: actions/upload-artifact@v4
with:
name: model-demo-runtime
diff --git a/README.md b/README.md
index 5ec0cbb..7ae7ce3 100644
--- a/README.md
+++ b/README.md
@@ -7,7 +7,9 @@
- **[Tools directory](https://tools.nmfin.tech/)** — the front page for this and future applications.
- **[Web application setup and deployment](web/README.md)** — local execution, saved reports, exports, shared components and Cloud Run.
-The public repository contains the example and application source. The underlying library is supplied by the obfuscated combined Maven artifact `tech.nmfin:algoquant-dist:3.3.2` and requires a valid NM license.
+The public repository contains the example and application source. The underlying library is supplied by the obfuscated combined Maven artifact `tech.nmfin:algoquant-dist:3.3.2` and requires a valid NM license. The examples explicitly use `dev.nm:nmdev-dist:1.2.7` from the same public Maven repository.
+
+NM Dev is declared before AlgoQuant in Maven and placed before `target/lib/*` in Java launch commands and the container classpath. This ensures NM Dev 1.2.7 takes precedence over the older classes embedded in AlgoQuant 3.3.2. Preserve this ordering in custom launch configurations; a wildcard alone has unspecified JAR order.
## AlgoQuant 3.3.2 historical-data tutorial
@@ -88,7 +90,7 @@ From the repository root:
```bash
mvn -U clean verify
java -Djava.awt.headless=true -Dlogback.configurationFile=web/logback.xml \
- -cp 'target/classes:target/lib/*' tech.nmfin.algoquant.web.ToolsWeb
+ -cp 'target/classes:target/lib/nmdev-dist-1.2.7.jar:target/lib/*' tech.nmfin.algoquant.web.ToolsWeb
```
Open [http://localhost:8080/sma2/](http://localhost:8080/sma2/) for SMA2, or [http://localhost:8080/](http://localhost:8080/) for the tools directory. The command above uses Unix classpath separators; use `;` instead of `:` on Windows.
@@ -188,7 +190,7 @@ mvn -B -ntp -Dmaven.test.skip=true clean package
Run a selected class from the repository root with your NM license on the classpath:
```bash
-java -cp 'license:target/classes:target/lib/*' tech.nmfin.algoquant.demo.model.tutorial.TutorialStrategyDemo
+java -cp 'license:target/classes:target/lib/nmdev-dist-1.2.7.jar:target/lib/*' tech.nmfin.algoquant.demo.model.tutorial.TutorialStrategyDemo
```
The imported demos cover charts, historical data, IB execution, simulation,
diff --git a/pom.xml b/pom.xml
index 99c1ad6..fe0640b 100644
--- a/pom.xml
+++ b/pom.xml
@@ -5,11 +5,13 @@
88
UTF-8
+ 1.2.7
tech.nmfin.algoquant.demo.model.technical.SMA2Demo010
github-nm-packageshttps://maven.pkg.github.com/nmltd/maven-packages
true
- junitjunit4.13.2testcom.google.code.gsongson2.13.2tech.nmfinalgoquant-dist3.3.2
+
+ dev.nmnmdev-dist${nmdev.version}junitjunit4.13.2testcom.google.code.gsongson2.13.2tech.nmfinalgoquant-dist3.3.2
org.apache.maven.pluginsmaven-compiler-plugin3.14.1
org.apache.maven.pluginsmaven-jar-plugin3.4.2
diff --git a/scripts/MODEL_DEMOS.md b/scripts/MODEL_DEMOS.md
index 949b39d..1077437 100644
--- a/scripts/MODEL_DEMOS.md
+++ b/scripts/MODEL_DEMOS.md
@@ -35,7 +35,7 @@ and a valid external license):
```bash
mkdir -p target/model-runner
-javac -cp 'target/classes:target/lib/*' -d target/model-runner scripts/ModelDemoRunner.java
+javac -cp 'target/classes:target/lib/nmdev-dist-1.2.7.jar:target/lib/*' -d target/model-runner scripts/ModelDemoRunner.java
export NM_LICENSE_FILE=/absolute/path/nm.lic
python3 scripts/run-model-demos.py --only SMA2Demo010 --seconds 180
```
diff --git a/scripts/run-model-demos.py b/scripts/run-model-demos.py
index 891fe53..3eb1b1a 100755
--- a/scripts/run-model-demos.py
+++ b/scripts/run-model-demos.py
@@ -69,7 +69,7 @@ def execute(item, output, seconds, heap):
if (ROOT / name).exists(): (work / name).symlink_to(ROOT / name, target_is_directory=True)
(work / 'log').mkdir(exist_ok=True)
(work / 'log/demo').mkdir(exist_ok=True)
- cp = os.pathsep.join([str(ROOT/'target/model-runner'), str(ROOT/'target/classes'), str(ROOT/'target/lib/*')])
+ cp = os.pathsep.join([str(ROOT/'target/model-runner'), str(ROOT/'target/classes'), str(ROOT/'target/lib/nmdev-dist-1.2.7.jar'), str(ROOT/'target/lib/*')])
command = ['xvfb-run', '-a', 'java', '-Xmx' + heap, '-Djava.awt.headless=false',
'-Dlogback.configurationFile=' + str(ROOT/'config/model-demo-logback.xml'),
'-Dsun.net.client.defaultConnectTimeout=20000', '-Dsun.net.client.defaultReadTimeout=30000',
diff --git a/scripts/run-offline.sh b/scripts/run-offline.sh
index 3a649c4..b1e1f0d 100644
--- a/scripts/run-offline.sh
+++ b/scripts/run-offline.sh
@@ -4,5 +4,5 @@ cd "$(dirname "$0")/.."
for example in SMA2Demo010 SMA2Demo011 SMA2Demo020 AccumulationDistributionLineDemo ChaikinMoneyFlowDemo SMA2DynamicDemo; do
echo "Running $example"
timeout 300 java -Djava.awt.headless=true -Dnm.license="${NM_LICENSE_FILE:-license/nm.lic}" \
- -cp 'target/classes:target/lib/*' "tech.nmfin.algoquant.demo.model.technical.$example" --quick
+ -cp 'target/classes:target/lib/nmdev-dist-1.2.7.jar:target/lib/*' "tech.nmfin.algoquant.demo.model.technical.$example" --quick
done
diff --git a/web/Dockerfile b/web/Dockerfile
index 4ca3260..b7b014b 100644
--- a/web/Dockerfile
+++ b/web/Dockerfile
@@ -7,4 +7,4 @@ COPY logback.xml /app/logback.xml
USER sma2
ENV PORT=8080 NM_LICENSE_FILE=/secrets/nm.lic SMA2_REPORT_DIRECTORY=/tmp/sma2-reports
EXPOSE 8080
-ENTRYPOINT ["java", "-Xmx640m", "-Djava.awt.headless=true", "-Dlogback.configurationFile=/app/logback.xml", "-cp", "/app/classes:/app/lib/*", "tech.nmfin.algoquant.web.ToolsWeb"]
+ENTRYPOINT ["java", "-Xmx640m", "-Djava.awt.headless=true", "-Dlogback.configurationFile=/app/logback.xml", "-cp", "/app/classes:/app/lib/nmdev-dist-1.2.7.jar:/app/lib/*", "tech.nmfin.algoquant.web.ToolsWeb"]
diff --git a/web/README.md b/web/README.md
index 2241c5b..f2d91c7 100644
--- a/web/README.md
+++ b/web/README.md
@@ -23,7 +23,7 @@ Configure Maven authentication and an external NM license as described in the [r
```bash
mvn -U clean verify
java -Djava.awt.headless=true -Dlogback.configurationFile=web/logback.xml \
- -cp 'target/classes:target/lib/*' tech.nmfin.algoquant.web.ToolsWeb
+ -cp 'target/classes:target/lib/nmdev-dist-1.2.7.jar:target/lib/*' tech.nmfin.algoquant.web.ToolsWeb
```
Open [http://localhost:8080/](http://localhost:8080/) for the tools directory or [http://localhost:8080/sma2/](http://localhost:8080/sma2/) for the app. On Windows, replace the classpath separator `:` with `;`.
diff --git a/web/smoke.py b/web/smoke.py
index be80332..3c1d21f 100644
--- a/web/smoke.py
+++ b/web/smoke.py
@@ -9,7 +9,7 @@
if not live: env['SMA2_DATA_MODE'] = 'synthetic'
else: env.pop('SMA2_DATA_MODE', None)
proc = subprocess.Popen(['java','-Djava.awt.headless=true','-Dlogback.configurationFile=web/logback.xml',
- '-cp','target/classes:target/lib/*','tech.nmfin.algoquant.web.ToolsWeb'], env=env)
+ '-cp','target/classes:target/lib/nmdev-dist-1.2.7.jar:target/lib/*','tech.nmfin.algoquant.web.ToolsWeb'], env=env)
base='http://127.0.0.1:'+port
def request(path, fields=None):