1 <?xml version="1.0" encoding="UTF-8"?>
2 <!-- Common definitions of Java compilation for Scilab -->
3 <project name="common">
5 <!-- Base of Scilab source tree -->
6 <property name="base.dir" location="../../" />
8 <!-- Where the module should be created (modules/xxx/jar) -->
9 <property name="build.jar.dir" value="jar/" />
11 <!-- Where the thirdparty libraries could be found -->
12 <property name="thirdparty.dir" location="${base.dir}/thirdparty/" />
14 <!-- The building directory -->
15 <property name="build.dir" location="build/"/>
17 <!-- Where builded classes will be generated -->
18 <property name="classes.dir" location="${build.dir}/classes" />
20 <!-- Where we store cache files -->
21 <property name="cache.dir" location="${build.dir}/cachefile" />
23 <!-- Where we can find the sources -->
24 <property name="src.dir" location="src/java/" />
26 <!-- Check style definitions -->
27 <property name = "checkstyle.config.file" value = "${base.dir}/checkstyle/scilab_checkstyle_convention.xml" />
28 <property name = "checkstyle.stylesheet" value = "${thirdparty.dir}/checkstyle/contrib/checkstyle-noframes-sorted.xsl" />
29 <property name = "checkstyle.report.dir" value = "${build.dir}/checkstyle" />
30 <property name = "checkstyle.xml.report.file" value = "${checkstyle.report.dir}/checkstyle_errors.xml" />
31 <property name = "checkstyle.html.report.file" value = "${checkstyle.report.dir}/checkstyle_errors.htm" />
33 <property name="modules.dir" value="${base.dir}/modules" />
35 <property file="${base.dir}/scilab-lib.properties"/>
37 <!-- Loading of the thirdparty libraries
38 We could specify one by one library that we are using -->
39 <!-- <path id="classpath">
40 <fileset dir="${thirdparty.dir}" includes="**/*.jar"/>
42 <classpath id="compile.classpath"
43 path="${oro.jar}:${xalan.jar}"
47 <path id="checkstyle.classpath">
48 <pathelement location="${checkstyle.jar}"/>
51 <path id="compile.classpath">
53 <pathelement location="${library.localization.dir}/${library.localization.name}"/>
54 <pathelement location="${library.shell.dir}/${library.shell.name}"/>
55 <pathelement location="${library.history_manager.dir}/${library.history_manager.name}"/>
56 <pathelement location="${library.completion.dir}/${library.completion.name}"/>
57 <pathelement location="${library.console.dir}/${library.console.name}"/>
58 <pathelement location="${library.action_binding.dir}/${library.action_binding.name}"/>
60 <pathelement location="${library.gui.dir}/${library.gui.name}"/>
61 <pathelement location="${library.jvm.dir}/${library.jvm.name}"/>
62 <pathelement location="${library.renderer.dir}/${library.renderer.name}"/>
63 <pathelement location="${library.graphic_export.dir}/${library.graphic_export.name}"/>
65 <pathelement location="${commons-logging.jar}"/>
67 <pathelement location="${flexdock.jar}"/>
69 <pathelement location="${gluegen.jar}"/>
71 <pathelement location="${jrosetta-API.jar}"/>
73 <pathelement location="${jrosetta-engine.jar}"/>
75 <pathelement location="${jogl.jar}"/>
79 <taskdef resource="checkstyletask.properties" classpathref="checkstyle.classpath"/>
81 <!-- Checkstyle process -->
85 depends = "checkstyle-init"
86 description = "Generates a report of code convention violations.">
88 config = "${checkstyle.config.file}"
89 failOnViolation = "false">
92 includes = "**/*.java"/>
93 <!-- Location of cache-file. -->
95 key = "checkstyle.cache.file"
96 file = "${cache.dir}"/>
97 <formatter type="plain"/>
100 toFile = "${checkstyle.xml.report.file}"/>
103 in = "${checkstyle.xml.report.file}"
104 out = "${checkstyle.html.report.file}"
105 style = "${checkstyle.stylesheet}" />
108 <!-- Create the build directory -->
110 <target name="checkstyle-init">
111 <mkdir dir="${checkstyle.report.dir}"/>
114 <!-- Delete the build directory -->
116 <target name="checkstyle-clean">
117 <delete dir="${checkstyle.report.dir}"/>
121 <mkdir dir="${classes.dir}"/>
122 <mkdir dir="${build.jar.dir}"/>
123 <!-- Create the time stamp -->
127 <!-- Clean sources -->
128 <target name="clean" description="clean sources">
129 <delete dir="${build.dir}"/>
130 <delete dir="${build.jar.dir}"/>
131 <delete file="${build.jar.dir}/${library.name}"/>
134 <!-- Compile sources -->
135 <target name="compile" description="Build sources" depends="init">
138 destdir="${classes.dir}"
139 classpathref="compile.classpath"
148 <!-- Create the jar -->
149 <target name="jar" description="Build the jar file" depends="compile">
151 <jar destfile="${build.jar.dir}/${library.name}" basedir="${classes.dir}">