forked from lucee/Lucee
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
105 lines (85 loc) · 3.93 KB
/
build.xml
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
<?xml version="1.0" encoding="UTF-8"?>
<project default="core" basedir="." name="Lucee"
xmlns:resolver="antlib:org.apache.maven.resolver.ant">
<property name="version" value="6.0.4.21-SNAPSHOT"/>
<taskdef uri="antlib:org.apache.maven.resolver.ant" resource="org/apache/maven/resolver/ant/antlib.xml">
<classpath>
<fileset dir="../ant/lib" includes="maven-resolver-ant-tasks-*.jar"/>
</classpath>
</taskdef>
<import file="../ant/build-core.xml"/>
<resolver:remoterepo id="repo" url="https://raw.githubusercontent.com/lucee/mvn/master/releases"
type="default" releases="true" snapshots="false"/>
<resolver:remoterepo id="ossrh" url="https://oss.sonatype.org/content/repositories/snapshots/"
type="default" releases="true" snapshots="false"/>
<resolver:remoterepo id="central" url="https://repo.maven.apache.org/maven2"
type="default" releases="true" snapshots="false"/>
<resolver:remoterepos id="resolver.repositories">
<resolver:remoterepo refid="central"/>
<resolver:remoterepo refid="ossrh"/>
<resolver:remoterepo refid="repo"/>
</resolver:remoterepos>
<target name="withTestcases">
<property name="testcases" value="true"/>
<property name="compileTestBox" value="true"/>
</target>
<resolver:pom file="pom.xml" id="pom"/>
<target name="setEnv" depends="setupNashorn">
<path id="compile.classpath"/>
<resolver:resolve>
<dependencies>
<pom refid="pom"/>
</dependencies>
<path refid="compile.classpath" classpath="compile"/>
</resolver:resolve>
<pathconvert property="dependencies" refid="compile.classpath"/>
<property name="runtime_classpath" value="${java.class.path}:${dependencies}"/>
<property name="outputDir" location="target/classes"/>
<property name="target" location="target"/>
<property name="baseDir" location=".."/>
<property name="rootDir" location=".."/>
<delete dir="${target}"/>
<mkdir dir="${outputDir}"/>
</target>
<target name="check-java-version">
<condition property="java11+">
<javaversion atleast="11"/>
</condition>
</target>
<!-- java 15 onwards doesn't bundle a javascript engine, nashorn is compiled for java 11, i.e. don't use for jdk 8 -->
<target name="setupNashorn" depends="check-java-version" if="java11+">
<path id="nashorn.classpath">
<pathelement path="../ant/lib/nashorn-core-15.4.jar"/>
<pathelement path="../ant/lib/asm-9.5.jar"/>
<pathelement path="../ant/lib/asm-util-9.5.jar"/>
<pathelement path="../ant/lib/asm-commons-9.5.jar"/>
<pathelement path="../ant/lib/asm-tree-9.5.jar"/>
</path>
<pathconvert property="nashorn_classpath" refid="nashorn.classpath"/>
</target>
<target name="core" depends="withTestcases,setEnv" description="build Lucee and run testcases">
<property name="buildLoaderJar" value="true"/>
<echots message="Full Build, build .lco and .jar and run testcases"/>
<antcall target="buildLoaderAnt">
<param name="compileTestBox" value="true"/><!-- needed for cfml build archives-->
<param name="buildLoaderJar" value="true"/>
</antcall>
<delete dir="${outputDir}"/>
</target>
<target name="fast" depends="setEnv" description="build only Lucee itself">
<property name="target" location="target"/>
<echots message="Fast Build, only build .lco and .jar"/>
<antcall target="buildLoaderFast">
<param name="compileTestBox" value="false"/><!-- needed for cfml build archives-->
<param name="buildLoaderJar" value="true"/>
</antcall>
<delete dir="${outputDir}"/>
</target>
<target name="quick" depends="setEnv" description="build only Lucee itself, only the .lco file">
<echots message="Quick Build, only build .lco"/>
<antcall target="buildLoaderFast">
<param name="compileTestBox" value="false"/><!-- needed for cfml build archives-->
</antcall>
<delete dir="${outputDir}"/>
</target>
</project>