-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.xml
158 lines (142 loc) · 5.37 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
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
147
148
149
150
151
152
153
154
155
156
157
158
<?xml version="1.0"?>
<project name="jspm" default="build" basedir="."
xmlns:if="ant:if"
xmlns:unless="ant:unless">
<target name="checkAntIfUnless">
<property name="antSupportsGenericIfUnless" value="true"/>
<fail message="ant 1.9.1 required: https://ant.apache.org/manual/ifunless.html" unless:set="antSupportsGenericIfUnless"/>
</target>
<echo taskname="which ant" message="${ant.version}" />
<echo taskname="which java" message="${java.vm.name} ${java.version}" />
<!--suppress AntMissingPropertiesFileInspection -->
<property file="local.properties" />
<property file="project.properties" />
<target name="compile">
<mkdir dir="build/classes" />
<javac srcdir="src"
destdir="build/classes"
includeAntRuntime="false"
deprecation="on"
debug="on"
optimize="off">
<compilerarg value="-encoding" />
<compilerarg value="ascii" />
</javac>
<javac srcdir="antsrc"
destdir="build/classes"
includeAntRuntime="false"
deprecation="on"
debug="on"
optimize="off">
<classpath>
<pathelement location="ant/lib/ant.jar" />
</classpath>
<compilerarg value="-encoding" />
<compilerarg value="ascii" />
</javac>
<copy file="antsrc/com/exedio/jspm/ant.properties" todir="build/classes/com/exedio/jspm" />
</target>
<target name="taskdef" depends="compile">
<taskdef
resource="com/exedio/jspm/ant.properties"
classpath="build/classes" />
</target>
<target name="test.jspm" depends="taskdef">
<jspm method="append" verbose="true" charset="us-ascii" sourceReferenceTargetPosition="90">
<fileset dir="testsrc" includes="com/exedio/jspm/test/Test.jspm" />
</jspm>
<jspm addSourceReferences="false">
<fileset dir="testsrc" includes="com/exedio/jspm/test/Mock.jspm" />
</jspm>
<jspm addSourceReferences="false">
<fileset dir="testsrc" includes="com/exedio/jspm/test/examples/*.jspm" />
</jspm>
</target>
<target name="jspm" depends="test.jspm" />
<target name="test.compile" depends="test.jspm">
<mkdir dir="build/testclasses" />
<javac srcdir="testsrc"
destdir="build/testclasses"
includeAntRuntime="false"
deprecation="on"
debug="on"
optimize="off">
<classpath>
<pathelement location="build/classes" />
<pathelement location="lib/opentest4j.jar" />
<pathelement location="lib/apiguardian-api.jar" />
<pathelement location="lib/junit-jupiter-api.jar" />
<pathelement location="lib/junit-platform-commons.jar" />
</classpath>
<compilerarg value="-Xlint" />
<compilerarg value="-encoding" />
<compilerarg value="ascii" />
</javac>
</target>
<target name="test.run" depends="test.compile, checkAntIfUnless">
<mkdir dir="build/testresults" />
<java taskname="junit" fork="yes" dir="${basedir}"
failonerror="true"
classname="org.junit.platform.console.ConsoleLauncher">
<arg line="--details ${test-details}" />
<arg line="--disable-ansi-colors" if:set="disable-ansi-colors" />
<classpath>
<pathelement location="build/classes" />
<pathelement location="build/testclasses" />
<pathelement location="lib/opentest4j.jar" />
<pathelement location="lib/junit-jupiter-api.jar" />
<pathelement location="lib/junit-jupiter-engine.jar" />
<pathelement location="lib/junit-platform-commons.jar" />
<pathelement location="lib/junit-platform-engine.jar" />
<pathelement location="lib/junit-platform-launcher.jar" />
<pathelement location="lib/junit-platform-console.jar" />
<pathelement location="lib/junit-platform-reporting.jar" />
</classpath>
<arg line="--fail-if-no-tests" />
<arg line="--scan-class-path build/testclasses" unless:set="test" />
<arg line="--select-class ${test}" if:set="test" unless:set="method" />
<arg line="--select-method ${test}#${method}" if:set="method" />
<arg line="--reports-dir build/testresults" />
<assertions><enable/></assertions>
</java>
</target>
<target name="test" depends="test.run" />
<target name="jar" depends="compile">
<jar jarfile="build/exedio-jspm.jar" basedir="build/classes" filesonly="true" duplicate="fail" strict="fail" level="9">
<manifest>
<attribute name="Specification-Title" value="exedio jspm"/>
<attribute name="Specification-Version" value="${build.tag}"/>
<attribute name="Specification-Vendor" value="exedio GmbH"/>
<attribute name="Implementation-Title" value="exedio jspm"/>
<attribute name="Implementation-Version" value="${build.tag}"/>
<attribute name="Implementation-Vendor" value="exedio GmbH"/>
</manifest>
</jar>
</target>
<target name="clean">
<delete dir="build" />
<delete>
<fileset dir="testsrc">
<include name="**/*_Jspm.java" />
</fileset>
</delete>
</target>
<target name="src" depends="jspm" description="creates all sources, so the IDE does not complain" />
<target name="build" depends="compile, jar, test" />
<target name="all" depends="build" />
<target name="publishlocally" depends="jar">
<ant dir="ivy" target="publishlocally" />
</target>
<target name="jenkins" depends="all">
<copy todir="${basedir}/build/success">
<fileset file="${basedir}/build/exedio-jspm.jar" />
<fileset file="${basedir}/exedio-jspm-log.txt" />
</copy>
<copy file="ivy/ivy.xml" todir="build/success" overwrite="true">
<filterset>
<filter token="BUILD_REVISION" value="${build.revision}" />
<filter token="BUILD_STATUS" value="${build.status}" />
</filterset>
</copy>
</target>
</project>