Removed unnecessary dependencies on org.apache.log4j
[simantics/platform.git] / tests / org.simantics.db.tests / build-installer.xml
1 <?xml version="1.0" encoding="UTF-8" standalone="no"?>\r<!--
2     Copyright (c) 2007, 2010 Association for Decentralized Information Management
3     in Industry THTH ry.
4     All rights reserved. This program and the accompanying materials
5     are made available under the terms of the Eclipse Public License v1.0
6     which accompanies this distribution, and is available at
7     http://www.eclipse.org/legal/epl-v10.html
8    
9     Contributors:
10         VTT Technical Research Centre of Finland - initial API and implementation
11  -->
12
13 <project default="clean-build" name="Create Runnable Jar for db generation">
14
15         <property name="project.name" value="org.simantics.db" />
16         <property name="version" value="0.7" />
17         <property name="src.dir" value="../org.simantics.ontology.installer/src" />
18         <property name="installer.dir" value="../org.simantics.db.build/" />
19         <property name="plugin.dir" value="${target.home}\plugins\" />
20
21         <property name="classes.dir" value="classes.dir" />
22         <property name="databoard.jar" value="org.simantics.databoard_0.5.2.jar" />
23         <property name="trove.jar" value="gnu.trove2_2.0.4.jar" />
24         <property name="db.jar" value="db-connector-${version}.jar" />
25         <property name="installer.jar" value="installer.jar" />
26
27         <property name="classpath-javac" value="${installer.dir}${db.jar}:${installer.dir}${databoard.jar}:${installer.dir}${trove.jar}" />
28         <property name="classpath-manifest" value="${db.jar} ${databoard.jar} ${trove.jar}" />
29
30         <target name="clean">
31                 <delete dir="${classes.dir}" quiet="true" />
32         </target>\r      <target name="databoard.jar" if="plugin.dir">
33                 <copy file="${plugin.dir}${databoard.jar}" toDir="${installer.dir}" />\r </target>
34         <target name="trove.dir" if="plugin.dir">
35                 <copy file="${plugin.dir}${trove.jar}" toDir="${installer.dir}" />
36         </target>
37
38         <target name="db.jar" depends="clean">
39                 <property name="origin.dir" value="../"/>
40                 <jar destfile="${installer.dir}${db.jar}">
41                         <fileset dir="${origin.dir}org.simantics.db/bin" includes="**/*.class" />
42                         <fileset dir="${origin.dir}org.simantics.db.common/bin" includes="**/*.class" />
43                         <fileset dir="${origin.dir}org.simantics.db.impl/bin" includes="**/*.class" />
44                         <fileset dir="${origin.dir}org.simantics.db.procore/bin" includes="**/*.class" />
45                         <fileset dir="${origin.dir}org.simantics.db.procore.protocol/bin" includes="**/*.class" />
46                         <fileset dir="${origin.dir}org.simantics.fastlz/bin" includes="**/*.class" excludes="**/bundle/*.java" />
47                         <fileset dir="${origin.dir}org.simantics.utils/bin" includes="**/*.class" />
48                         <fileset dir="${origin.dir}org.simantics.utils.thread/bin" includes="**/*.class" />
49                         <fileset dir="${origin.dir}org.simantics.utils.datastructures/bin" includes="**/*.class" />
50                         <fileset dir="${origin.dir}org.simantics.db.management/bin" includes="**/*.class" />
51                         <fileset dir="${origin.dir}org.simantics.db.services/bin" includes="**/*.class" />
52                         <fileset dir="${origin.dir}org.simantics.layer0.utils/bin" includes="**/*.class" />
53                         <manifest>
54                                 <!-- Who is building this jar? -->
55                                 <attribute name="Built-By" value="${user.name}"/>
56                                 <attribute name="Implementation-Vendor" value="VTT"/>
57                                 <attribute name="Implementation-Title" value="${project.name}"/>
58                                 <attribute name="Implementation-Version" value="${version}"/>
59                         </manifest>
60                 </jar>
61         </target>
62
63         <target name="compile" depends="db.jar">
64                 <mkdir dir="${classes.dir}" />
65                 <javac srcdir="${src.dir}" destdir="${classes.dir}" classpath="${classpath-javac}" />
66         </target>
67
68         <target name="installer-jar" depends="compile">
69                 <jar destfile="${installer.dir}${installer.jar}" basedir="${classes.dir}">
70                         <fileset dir="${src.dir}" includes="**/*.html,**/*.htm,**/*.txt,**/*.png" />
71                         <manifest>
72                                 <!-- Who is building this jar? -->
73                                 <attribute name="Built-By" value="${user.name}"/>
74                                 <attribute name="Implementation-Vendor" value="VTT"/>
75                                 <attribute name="Implementation-Title" value="org.simantics.ontology.installer"/>
76                                 <attribute name="Implementation-Version" value="${version}"/>
77                                 <attribute name="Main-Class" value="org.simantics.ontology.installer.Generate"/>
78                                 <attribute name="Class-Path" value="${classpath-manifest}"/>
79                         </manifest>
80                 </jar>
81         </target>
82
83         <target name="clean-build" depends="clean,installer-jar" />
84
85 </project>