-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathbuild.xml
More file actions
98 lines (89 loc) · 4.8 KB
/
Copy pathbuild.xml
File metadata and controls
98 lines (89 loc) · 4.8 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
<?xml version="1.0" encoding="UTF-8"?>
<project name="ModbusProcessSimulator" default="default" basedir=".">
<description>Build Modbus Process Simulator (standalone fat JAR).</description>
<property name="lib.dir" location="lib"/>
<property name="releases.dir" location="releases"/>
<property name="standalone.basename" value="ModbusProcessSimulator-v1.9.0-standalone"/>
<target name="-post-init">
<mkdir dir="${lib.dir}"/>
<get dest="${lib.dir}/jython-standalone.jar" src="https://repo1.maven.org/maven2/org/python/jython-standalone/2.7.0/jython-standalone-2.7.0.jar" skipexisting="true"/>
<get dest="${lib.dir}/jfreechart.jar" src="https://repo1.maven.org/maven2/org/jfree/jfreechart/1.0.15/jfreechart-1.0.15.jar" skipexisting="true"/>
<get dest="${lib.dir}/jcommon.jar" src="https://repo1.maven.org/maven2/org/jfree/jcommon/1.0.23/jcommon-1.0.23.jar" skipexisting="true"/>
<get dest="${lib.dir}/rxtx.jar" src="https://repo1.maven.org/maven2/dev/prokop/rxtx/rxtx/2.2.2/rxtx-2.2.2.jar" skipexisting="true"/>
<get dest="${lib.dir}/flatlaf.jar" src="https://repo1.maven.org/maven2/com/formdev/flatlaf/3.7.2/flatlaf-3.7.2.jar" skipexisting="true"/>
<get dest="${lib.dir}/flatlaf-extras.jar" src="https://repo1.maven.org/maven2/com/formdev/flatlaf-extras/3.7.2/flatlaf-extras-3.7.2.jar" skipexisting="true"/>
<get dest="${lib.dir}/jsvg.jar" src="https://repo1.maven.org/maven2/com/github/weisj/jsvg/2.1.0/jsvg-2.1.0.jar" skipexisting="true"/>
</target>
<target name="-post-clean">
</target>
<target name="-post-compile">
<copy todir="${build.classes.dir}/br/com/uniaogeek/modbus/simulator/examples/automations">
<fileset dir="Examples/ScriptLibrary" includes="*.py"/>
</copy>
</target>
<target name="functional-test" depends="compile">
<mkdir dir="${build.test.classes.dir}"/>
<javac srcdir="${test.src.dir}"
destdir="${build.test.classes.dir}"
source="${javac.source}"
target="${javac.target}"
encoding="${source.encoding}"
includeantruntime="false">
<classpath>
<path path="${javac.test.classpath}"/>
</classpath>
</javac>
<java classname="br.com.uniaogeek.modbus.simulator.link.FunctionalTestSuite" fork="true" failonerror="true">
<classpath>
<path path="${run.test.classpath}"/>
</classpath>
</java>
</target>
<property name="legacy.src.dir" location="tools/legacy-import/src"/>
<property name="legacy.build.dir" location="build/legacy-import"/>
<property name="legacy.jar" location="dist/tools/legacy-import.jar"/>
<target name="legacy-import-tool" description="Build the separate legacy project importer">
<mkdir dir="${legacy.build.dir}"/>
<javac srcdir="${legacy.src.dir}"
destdir="${legacy.build.dir}"
release="17"
encoding="UTF-8"
includeantruntime="false"/>
<copy todir="${legacy.build.dir}">
<fileset dir="${legacy.src.dir}" excludes="**/*.java"/>
</copy>
<mkdir dir="dist/tools"/>
<jar destfile="${legacy.jar}" basedir="${legacy.build.dir}">
<manifest>
<attribute name="Main-Class" value="br.com.uniaogeek.modbus.simulator.legacy.LegacyProjectImporter"/>
</manifest>
</jar>
<echo message="Legacy importer packaged into ${legacy.jar}"/>
</target>
<target name="-post-jar">
<property name="store.jar.name" value="${standalone.basename}"/>
<property name="store.dir" value="dist"/>
<property name="store.jar" value="${store.dir}/${store.jar.name}.jar"/>
<mkdir dir="${store.dir}/lib"/>
<copy todir="${store.dir}/lib" overwrite="true">
<fileset dir="${lib.dir}" includes="*.jar"/>
</copy>
<echo message="Packaging ${application.title} into ${store.jar}"/>
<jar destfile="${store.dir}/temp_final.jar" filesetmanifest="skip">
<zipgroupfileset file="${dist.jar}"/>
<zipgroupfileset dir="dist/lib" includes="*.jar"/>
<manifest>
<attribute name="Main-Class" value="${main.class}"/>
</manifest>
</jar>
<zip destfile="${store.jar}">
<zipfileset src="${store.dir}/temp_final.jar"
excludes="META-INF/*.SF, META-INF/*.DSA, META-INF/*.RSA"/>
</zip>
<delete file="${store.dir}/temp_final.jar"/>
<mkdir dir="${releases.dir}"/>
<copy file="${store.jar}" todir="${releases.dir}" overwrite="true"/>
<echo message="Copied standalone JAR to ${releases.dir}/${standalone.basename}.jar"/>
</target>
<import file="nbproject/build-impl.xml"/>
</project>