-
Notifications
You must be signed in to change notification settings - Fork 184
Expand file tree
/
Copy pathbuild.xml
More file actions
59 lines (48 loc) · 2.59 KB
/
Copy pathbuild.xml
File metadata and controls
59 lines (48 loc) · 2.59 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
<?xml version="1.0" encoding="UTF-8"?>
<!-- ====================================================================== -->
<!-- Ant build file (http://ant.apache.org/) for Ant 1.6.2 or above. -->
<!-- ====================================================================== -->
<project name="bsh" default="package" basedir=".">
<!-- ====================================================================== -->
<!-- Import maven-build.xml into the current project -->
<!-- ====================================================================== -->
<import file="maven-build.xml"/>
<!-- ====================================================================== -->
<!-- Help target -->
<!-- ====================================================================== -->
<target name="help">
<echo message="Please run: $ant -projecthelp"/>
</target>
<!-- ====================================================================== -->
<!-- Publishing generated docs to the beanshell.github.io site checkout -->
<!-- ====================================================================== -->
<!-- Expects a sibling checkout of beanshell/beanshell.github.io; override
with -Dsite.dir=... to point elsewhere. -->
<property name="site.dir" location="../beanshell.github.io"/>
<target name="check-jdk8">
<condition property="is.jdk8">
<equals arg1="${ant.java.version}" arg2="1.8"/>
</condition>
<fail unless="is.jdk8">
Javadoc must be generated with JDK 8 (this project's source/target level). On a
newer JDK the javadoc tool silently produces incomplete or empty output for
this codebase (e.g. it rejects 'yield' as a restricted identifier) while Ant
still reports BUILD SUCCESSFUL. Re-run with:
JAVA_HOME=$(/usr/libexec/java_home -v 1.8) ant publish-javadoc
</fail>
</target>
<target name="publish-javadoc" depends="check-jdk8,javadoc"
description="Generate Javadoc and copy it into ../beanshell.github.io/v3/javadoc">
<available file="${site.dir}" type="dir" property="site.dir.present"/>
<fail unless="site.dir.present">
${site.dir} was not found. publish-javadoc expects a sibling checkout of
beanshell/beanshell.github.io; override the location with -Dsite.dir=...
</fail>
<delete dir="${site.dir}/v3/javadoc" quiet="true"/>
<mkdir dir="${site.dir}/v3/javadoc"/>
<copy todir="${site.dir}/v3/javadoc">
<fileset dir="${maven.reporting.outputDirectory}/apidocs"/>
</copy>
<echo message="Javadoc published to ${site.dir}/v3/javadoc"/>
</target>
</project>