-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.xml
More file actions
52 lines (43 loc) · 1.99 KB
/
Copy pathbuild.xml
File metadata and controls
52 lines (43 loc) · 1.99 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
<project name="common" default="dist">
<!-- <property name="java-build.src-dir" location="src"/> -->
<property name="asl.dir" value="../../apps/control/ant-script-library" />
<property name="repo-ivy.retrieve-pattern" value="${repo-ivy.lib-dir}/[conf]/[artifact]-[revision].[ext]" />
<property name="repo-ivy.settings-file" value="./mysettings.xml" />
<import file="${asl.dir}/asl-repo-ivy.xml" />
<import file="${asl.dir}/asl-java-build.xml" />
<import file="${asl.dir}/asl-java-test.xml" />
<import file="${asl.dir}/asl-java-report.xml" />
<import file="${asl.dir}/asl-java-package.xml" />
<target name="gen" description="generate">
<path id="gen.classpath">
<fileset dir="libsafe" includes="*.jar" />
<pathelement location="." />
</path>
<java classname="DomainModel" classpathref="gen.classpath" fork="true">
<arg value="workflow.SchemaGenerator.mwe2" />
<arg value="-p" />
<arg value="modelFile=src/main/resources/Example.schema" />
</java>
</target>
<target name="check.hsql">
<condition property="hsql.running">
<socket server="localhost" port="9001" />
</condition>
</target>
<target name="db-start" unless="hsql.running" depends="check.hsql">
<exec executable="cmd" spawn="true" osfamily="Windows" dir="data">
<arg line='/c start "Hsql DB" /min cmd /K java -cp ../lib/runtime/hsqldb-2.0.0.jar -Xmx512m org.hsqldb.Server'/>
</exec>
<exec executable="java" spawn="true" osfamily="unix" dir="data">
<arg line='-cp hsqldb.jar -Xmx512m org.hsqldb.Server'/>
</exec>
</target>
<target name="db-stop" if="hsql.running" depends="check.hsql" >
<exec executable="taskkill" spawn="true" osfamily="windows">
<arg line='/FI "WINDOWTITLE eq Hsql DB - *"'/>
</exec>
<exec executable="java" spawn="true" osfamily="unix" dir="${foundation.dir}/data">
<arg line="-cp ../lib/runtime/hsqldb-2.0.0.jar org.hsqldb.util.SqlTool --inlineRc URL=jdbc:hsqldb:hsql://localhost/test-db,USER=sa,password= --sql 'SHUTDOWN;'"/>
</exec>
</target>
</project>