forked from jruby/jruby-ossl
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.xml
57 lines (50 loc) · 1.95 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
<?xml version="1.0" encoding="UTF-8"?>
<project basedir="." default="build" name="jopenssl">
<property environment="env"/>
<property file="build.properties"/>
<property name="src.java" value="src/java"/>
<property name="target" value="target"/>
<property name="target.classes" value="${target}/classes"/>
<property name="target.classes.test" value="${target}/test-classes"/>
<property name="lib.dir" value="lib"/>
<property name="jruby.jar" value="${jruby.home}/lib/jruby.jar"/>
<property name="version.source" value="1.5"/>
<property name="version.target" value="1.5"/>
<path id="build.classpath">
<fileset dir="${lib.dir}" includes="*.jar" excludes="jopenssl.jar,jruby.jar"/>
<pathelement location="${jruby.jar}"/>
</path>
<target name="init">
<mkdir dir="${target}"/>
<mkdir dir="${target.classes}"/>
</target>
<target name="clean">
<delete dir="target"/>
</target>
<target depends="init" name="build" description="Compiles Java source files">
<javac debug="true" destdir="${target.classes}" source="${version.source}" target="${version.target}">
<classpath refid="build.classpath"/>
<src path="${src.java}"/>
</javac>
</target>
<target depends="build" name="jar" description="Build a JAR file with the generated Java class files">
<path id="bcpath">
<fileset dir="${lib.dir}" includes="bc*.jar"/>
</path>
<pathconvert property="bcjars" pathsep=" " refid="bcpath">
<map from="${basedir}/${lib.dir}/" to=""/>
</pathconvert>
<jar destfile="${lib.dir}/jopenssl.jar" basedir="${target.classes}">
<manifest>
<attribute name="Built-By" value="${user.name}"/>
<attribute name="Class-Path" value="${bcjars}"/>
</manifest>
</jar>
</target>
<target name="test" depends="jar">
<exec executable="${jruby.home}/bin/jruby" failonerror="true">
<arg value="-Ilib:test"/>
<arg value="test/test_openssl.rb"/>
</exec>
</target>
</project>