-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
146 lines (129 loc) · 7.45 KB
/
Copy pathbuild.xml
File metadata and controls
146 lines (129 loc) · 7.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
<?xml version="1.0" encoding="UTF-8"?>
<!--
build.xml — ANT build script for NitroWebExpress™ (JWSTFJ21)
Author: Max Rupplin — MEARVK LLC
Targets:
compile — Compile all source/*.java
jar — Build fat JAR (nwe.jar)
run — Launch from compiled classes
run-jar — Launch from nwe.jar
update — Pull latest from GitHub + recompile + rebuild JAR
clean — Remove out/ and nwe.jar
test — Run port connectivity tests
strips — Validate learning strip TSV files exist
Usage:
ant compile
ant update
ant jar run-jar
-->
<project name="NitroWebExpress" default="compile" basedir=".">
<!-- Properties -->
<property name="src.dir" value="source"/>
<property name="out.dir" value="out"/>
<property name="jar.file" value="nwe.jar"/>
<property name="jars.dir" value="jars"/>
<property name="djl.dir" value="${jars.dir}/djl"/>
<property name="mysql.jar" value="${jars.dir}/mysql/mysql-connector-j-9.7.0.jar"/>
<property name="lanterna.jar" value="${jars.dir}/lanterna-3.1.5.jar"/>
<property name="java.release" value="25"/>
<property name="repo.url" value="https://github.com/mearvk/Java.Web.Server.Telnet.Front.Java.21"/>
<!-- Classpath -->
<path id="compile.classpath">
<fileset dir="${djl.dir}" includes="*.jar" erroronmissingdir="false"/>
<pathelement location="${mysql.jar}"/>
<pathelement location="${lanterna.jar}"/>
<pathelement location="${out.dir}"/>
</path>
<!-- ═══ CLEAN ═══════════════════════════════════════════════════════════ -->
<target name="clean" description="Remove compiled output and JAR">
<delete dir="${out.dir}" quiet="true"/>
<delete file="${jar.file}" quiet="true"/>
<echo message="Cleaned."/>
</target>
<!-- ═══ COMPILE ═════════════════════════════════════════════════════════ -->
<target name="compile" depends="structure" description="Compile all Java sources">
<mkdir dir="${out.dir}"/>
<javac srcdir="${src.dir}"
destdir="${out.dir}"
release="${java.release}"
includeantruntime="false"
fork="true"
failonerror="true">
<classpath refid="compile.classpath"/>
</javac>
<echo message="Compilation successful."/>
</target>
<!-- ═══ JAR ═════════════════════════════════════════════════════════════ -->
<target name="jar" depends="compile" description="Build fat JAR">
<jar destfile="${jar.file}" basedir="${out.dir}">
<manifest>
<attribute name="Main-Class" value="Main"/>
<attribute name="Class-Path" value="jars/djl/pytorch-native-cpu-2.5.1-linux-x86_64.jar"/>
</manifest>
<zipgroupfileset dir="${jars.dir}/mysql" includes="mysql-connector-j-9.7.0.jar"/>
<zipgroupfileset file="${lanterna.jar}"/>
<zipgroupfileset dir="${djl.dir}" includes="*.jar" excludes="*native*"/>
</jar>
<echo message="Built ${jar.file} (${jar.file})"/>
</target>
<!-- ═══ RUN ═════════════════════════════════════════════════════════════ -->
<target name="run" depends="compile" description="Run from compiled classes">
<java classname="Main" fork="true" failonerror="true">
<classpath refid="compile.classpath"/>
<jvmarg value="-Xms256m"/>
<jvmarg value="-Xmx1024m"/>
<jvmarg value="-XX:+UseZGC"/>
</java>
</target>
<!-- ═══ RUN-JAR ═════════════════════════════════════════════════════════ -->
<target name="run-jar" description="Run from nwe.jar">
<java jar="${jar.file}" fork="true" failonerror="true">
<jvmarg value="-Dnwe.root=${basedir}"/>
<jvmarg value="-Xms512m"/>
<jvmarg value="-Xmx4g"/>
<jvmarg value="-XX:+UseG1GC"/>
<jvmarg value="-XX:MaxGCPauseMillis=100"/>
</java>
</target>
<!-- ═══ UPDATE ══════════════════════════════════════════════════════════ -->
<target name="update" description="Pull latest, recompile, rebuild JAR">
<echo message="Pulling latest from GitHub..."/>
<exec executable="git" failonerror="true">
<arg value="pull"/>
<arg value="--rebase"/>
</exec>
<antcall target="clean"/>
<antcall target="jar"/>
<echo message="Update complete. Scripts, sources, and JAR rebuilt."/>
</target>
<!-- ═══ TEST ════════════════════════════════════════════════════════════ -->
<target name="test" description="Run port connectivity tests">
<exec executable="bash" failonerror="false">
<arg value="scripts/bash/49111/test.49111.check.sh"/>
</exec>
<exec executable="bash" failonerror="false">
<arg value="scripts/bash/strernary/test.20000.check.sh"/>
</exec>
<echo message="Tests complete."/>
</target>
<!-- ═══ STRUCTURE ═══════════════════════════════════════════════════════ -->
<target name="structure" description="Regenerate STRUCTURE.txt from codebase scan">
<exec executable="bash" failonerror="false">
<arg value="scripts/generate-structure.sh"/>
</exec>
</target>
<!-- ═══ STRIPS ══════════════════════════════════════════════════════════ -->
<target name="strips" description="Validate AI learning strips exist">
<available file="source/strernary/strips/base-learning-strip.tsv" property="strip.strernary"/>
<available file="source/ai/strips/base-learning-strip.tsv" property="strip.ai"/>
<available file="source/international/radio/strips/base-learning-strip.tsv" property="strip.radio"/>
<available file="source/city/analysis/strips/base-learning-strip.tsv" property="strip.city"/>
<available file="source/heuristics/strips/base-learning-strip.tsv" property="strip.heuristics"/>
<fail unless="strip.strernary" message="Missing: source/strernary/strips/"/>
<fail unless="strip.ai" message="Missing: source/ai/strips/"/>
<fail unless="strip.radio" message="Missing: source/international/radio/strips/"/>
<fail unless="strip.city" message="Missing: source/city/analysis/strips/"/>
<fail unless="strip.heuristics" message="Missing: source/heuristics/strips/"/>
<echo message="All learning strips present."/>
</target>
</project>