1 <?xml version="1.0" encoding="UTF-8" standalone="no"?>
\r<!--
2 Copyright (c) 2007, 2010 Association for Decentralized Information Management
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
10 VTT Technical Research Centre of Finland - initial API and implementation
13 <project default="clean-build" name="Create Runnable Jar for db generation">
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\" />
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="log4j.jar" value="org.apache.log4j_1.2.15.20080201.jar" />
25 <property name="db.jar" value="db-connector-${version}.jar" />
26 <property name="installer.jar" value="installer.jar" />
28 <property name="classpath-javac" value="${installer.dir}${db.jar}:${installer.dir}${databoard.jar}:${installer.dir}${trove.jar}:${installer.dir}${log4j.jar}" />
29 <property name="classpath-manifest" value="${db.jar} ${databoard.jar} ${trove.jar} ${log4j.jar}" />
32 <delete dir="${classes.dir}" quiet="true" />
33 </target>
\r <target name="databoard.jar" if="plugin.dir">
34 <copy file="${plugin.dir}${databoard.jar}" toDir="${installer.dir}" />
\r </target>
35 <target name="trove.dir" if="plugin.dir">
36 <copy file="${plugin.dir}${trove.jar}" toDir="${installer.dir}" />
39 <target name="log4j.jar" if="plugin.dir">
40 <copy file="${plugin.dir}${log4j.jar}" toDir="${installer.dir}" />
43 <target name="db.jar" depends="clean">
44 <property name="origin.dir" value="../"/>
45 <jar destfile="${installer.dir}${db.jar}">
46 <fileset dir="${origin.dir}org.simantics.db/bin" includes="**/*.class" />
47 <fileset dir="${origin.dir}org.simantics.db.common/bin" includes="**/*.class" />
48 <fileset dir="${origin.dir}org.simantics.db.impl/bin" includes="**/*.class" />
49 <fileset dir="${origin.dir}org.simantics.db.procore/bin" includes="**/*.class" />
50 <fileset dir="${origin.dir}org.simantics.db.procore.protocol/bin" includes="**/*.class" />
51 <fileset dir="${origin.dir}org.simantics.fastlz/bin" includes="**/*.class" excludes="**/bundle/*.java" />
52 <fileset dir="${origin.dir}org.simantics.utils/bin" includes="**/*.class" />
53 <fileset dir="${origin.dir}org.simantics.utils.thread/bin" includes="**/*.class" />
54 <fileset dir="${origin.dir}org.simantics.utils.datastructures/bin" includes="**/*.class" />
55 <fileset dir="${origin.dir}org.simantics.db.management/bin" includes="**/*.class" />
56 <fileset dir="${origin.dir}org.simantics.db.services/bin" includes="**/*.class" />
57 <fileset dir="${origin.dir}org.simantics.layer0.utils/bin" includes="**/*.class" />
59 <!-- Who is building this jar? -->
60 <attribute name="Built-By" value="${user.name}"/>
61 <attribute name="Implementation-Vendor" value="VTT"/>
62 <attribute name="Implementation-Title" value="${project.name}"/>
63 <attribute name="Implementation-Version" value="${version}"/>
68 <target name="compile" depends="db.jar">
69 <mkdir dir="${classes.dir}" />
70 <javac srcdir="${src.dir}" destdir="${classes.dir}" classpath="${classpath-javac}" />
73 <target name="installer-jar" depends="compile">
74 <jar destfile="${installer.dir}${installer.jar}" basedir="${classes.dir}">
75 <fileset dir="${src.dir}" includes="**/*.html,**/*.htm,**/*.txt,**/*.png" />
77 <!-- Who is building this jar? -->
78 <attribute name="Built-By" value="${user.name}"/>
79 <attribute name="Implementation-Vendor" value="VTT"/>
80 <attribute name="Implementation-Title" value="org.simantics.ontology.installer"/>
81 <attribute name="Implementation-Version" value="${version}"/>
82 <attribute name="Main-Class" value="org.simantics.ontology.installer.Generate"/>
83 <attribute name="Class-Path" value="${classpath-manifest}"/>
88 <target name="clean-build" depends="clean,installer-jar" />