root/trunk/build.xml

Revision 3977, 2.4 kB (checked in by michael, 3 years ago)

Better OSGi support

Line 
1 <project name="xtc" default="help" xmlns:ivy="antlib:org.apache.ivy.ant">
2         <!-- Sarugo common ant configuration -->
3         <property name="ant.lib.dir" value="ant" />
4         <property name="ant.server" value="http://ant.sarugo.org" />
5         <property name="build.common.url" value="${ant.server}/build-common.xml" />
6         <property name="build.common.file" value="${ant.lib.dir}/build-common.xml" />
7         <condition property="build.common.available">
8                 <available file="${build.common.file}" type="file" />
9         </condition>
10
11         <target name="download-build.common">
12                 <get ignoreerrors="true" src="${build.common.url}" dest="${build.common.file}" usetimestamp="true" />
13         </target>
14
15         <import file="${build.common.file}" optional="true" />
16
17         <target name="bootstrap" description="Download build dependencies and libraries">
18                 <mkdir dir="${ant.lib.dir}" />
19                 <antcall target="download-build.common" />
20                 <antcall target="common.bootstrap" />
21         </target>
22
23         <target name="project.package">
24                 <mkdir dir="${dist.dir}" />
25                 <jar destfile="${dist.dir}/${project.name}-${build.rev}.jar">
26                         <fileset dir="${build.dir}/main/java">
27                                 <include name="**/*.class" />
28                                 <exclude name="org/sarugo/xtc/restlet/**/*.class" />
29                         </fileset>
30                         <fileset dir="${build.dir}/main/resources">
31                                 <exclude name="META-INF/MANIFEST.MF" />
32                         </fileset>
33                 </jar>
34                 <jar destfile="${dist.dir}/${project.name}-restlet-${build.rev}.jar">
35                         <fileset dir="${build.dir}/main/java">
36                                 <include name="org/sarugo/xtc/restlet/*.class" />
37                         </fileset>
38                 </jar>
39                 <jar destfile="${dist.dir}/${project.name}-fop-${build.rev}.jar">
40                         <fileset dir="${build.dir}/main/java">
41                                 <include name="org/sarugo/xtc/restlet/fop/*.class" />
42                         </fileset>
43                 </jar>
44         <ivy:retrieve pattern="${build.dir}/main/osgi/[artifact]-[revision].[ext]" conf="lib" useOrigin="true" />
45         <jar destfile="${dist.dir}/${project.name}-osgi-${build.rev}.jar" filesetmanifest="merge">
46             <fileset dir="${build.dir}/main/java" />
47             <fileset dir="${build.dir}/main/resources" />
48             <fileset dir="${build.dir}/main/osgi" />
49         </jar>
50                 <!-- Use ivy to copy the runtime dependencies to distribution directory -->
51                 <ivy:retrieve pattern="${dist.dir}/[artifact]-[revision].[ext]" conf="default" useOrigin="true" />
52                 <property name="skip.common.package" value="true" />
53         </target>
54
55         <target name="help">
56                 <echo message="Run ant -p to see a list of targets." />
57         </target>
58
59 </project>
Note: See TracBrowser for help on using the browser.