@@ -72,3 +72,109 @@ On Windows use `;` instead of `:` inside the Java classpath. Maven commands work
7272| Numerical check fails | Record the exact resolved version, JVM and error; do not simply loosen the tolerance |
7373
7474The dependency is pinned to stable 1.2.6. Record the resolved binary checksum when reporting numerical differences or reproducing a result.
75+
76+ ## 6. Use NMDEV in your own application
77+
78+ Create a directory containing the following ` pom.xml ` and save your valid
79+ license as ` nm.lic ` in that directory. Keep the settings.xml server from step 2.
80+
81+ ``` xml
82+ <project xmlns =" http://maven.apache.org/POM/4.0.0"
83+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
84+ xsi : schemaLocation =" http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" >
85+ <modelVersion >4.0.0</modelVersion >
86+ <groupId >example</groupId >
87+ <artifactId >my-nmdev-app</artifactId >
88+ <version >1.0.0</version >
89+ <properties >
90+ <project .build.sourceEncoding>UTF-8</project .build.sourceEncoding>
91+ <maven .compiler.source>8</maven .compiler.source>
92+ <maven .compiler.target>8</maven .compiler.target>
93+ </properties >
94+ <repositories >
95+ <repository >
96+ <id >github-nmdev</id >
97+ <url >https://maven.pkg.github.com/nmltd/nmdev</url >
98+ <releases ><enabled >true</enabled ></releases >
99+ <snapshots ><enabled >false</enabled ></snapshots >
100+ </repository >
101+ </repositories >
102+ <dependencies >
103+ <dependency >
104+ <groupId >dev.nm</groupId >
105+ <artifactId >nmdev</artifactId >
106+ <version >1.2.6</version >
107+ </dependency >
108+ </dependencies >
109+ <build >
110+ <plugins >
111+ <plugin >
112+ <groupId >org.apache.maven.plugins</groupId >
113+ <artifactId >maven-compiler-plugin</artifactId >
114+ <version >3.14.1</version >
115+ </plugin >
116+ <plugin >
117+ <groupId >org.codehaus.mojo</groupId >
118+ <artifactId >exec-maven-plugin</artifactId >
119+ <version >3.5.0</version >
120+ <configuration ><mainClass >example.FirstMatrix</mainClass ></configuration >
121+ </plugin >
122+ </plugins >
123+ </build >
124+ </project >
125+ ```
126+
127+ Save this as ` src/main/java/example/FirstMatrix.java ` :
128+
129+ ``` java
130+ package example ;
131+
132+ import dev.nm.algebra.linear.matrix.doubles.matrixtype.dense.DenseMatrix ;
133+
134+ public final class FirstMatrix {
135+ public static void main (String [] args ) {
136+ DenseMatrix a = new DenseMatrix (new double [][] {{1 , 2 }, {3 , 4 }});
137+ System . out. println(" Rows = " + a. nRows() + " , columns = " + a. nCols());
138+ System . out. println(" Entry (2, 1) = " + a. get(2 , 1 ));
139+ }
140+ }
141+ ```
142+
143+ From the directory containing ` pom.xml ` and ` nm.lic ` , run:
144+
145+ ``` bash
146+ mvn -U clean compile exec:java
147+ ```
148+
149+ Expected output:
150+
151+ ``` text
152+ Rows = 2, columns = 2
153+ Entry (2, 1) = 3.0
154+ ```
155+
156+ NMDEV matrix indices start at 1. Java arrays still start at 0. The combined
157+ customer JAR contains its runtime dependencies; this application does not need
158+ the private parent POM, nmutils/nmlicense dependencies, or an obfuscation plugin.
159+
160+ ## 7. Customer setup checklist
161+
162+ - Obtain package access for the GitHub account that owns your token. A token
163+ alone does not grant access to a package your account cannot read.
164+ - Create a classic token with ` read:packages ` ; authorize organization SSO when
165+ your organization requires it. Keep it in your local secret manager/environment.
166+ - On macOS/Linux use ` ~/.m2/settings.xml ` ; on Windows use
167+ ` %USERPROFILE%\\.m2\\settings.xml ` . Create the directory/file if absent and
168+ merge the server entry without deleting other configured servers.
169+ - Obtain a trial or commercial license through [ NM Dev] ( https://nm.dev/products/nmdev ) .
170+ Request the modules used by your application and replace expired trials.
171+ - Package authentication happens during Maven download. License validation
172+ happens when Java executes. Fix the failing stage independently.
173+ - A 404 can also indicate inaccessible private packages. Check the exact
174+ ` dev.nm:nmdev:1.2.6 ` coordinates and account permissions before changing code.
175+ - Verify the first matrix example, then run the tutorials relevant to your task.
176+ - When requesting help, include Java/Maven/OS versions, exact dependency version,
177+ working directory, command and error text. Remove tokens and license contents.
178+
179+ Public API reference: https://nmltd.github.io/nmdev/ . Release notes:
180+ https://github.com/nmltd/nmdev/releases/tag/v1.2.6 (repository access may be required).
0 commit comments