Update of the test
[scilab.git] / scilab / build.incl.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!-- Common definitions of Java compilation for Scilab --> 
3 <project name="common">
4         
5         <!-- Base of Scilab source tree -->
6         <property name="base.dir"  location="../../" />
7         
8         <!-- Where the module should be created (modules/xxx/jar) -->
9         <property name="build.jar.dir"  value="jar/" />
10         
11         <!-- Where the thirdparty libraries could be found -->
12         <property name="thirdparty.dir" location="${base.dir}/thirdparty/" />
13         
14         <!-- The building directory -->
15         <property name="build.dir" location="build/"/>
16         
17         <!-- Where builded classes will be generated -->
18         <property name="classes.dir" location="${build.dir}/classes" />
19         
20         <!-- Where we store cache files -->
21         <property name="cache.dir" location="${build.dir}/cachefile" />
22         
23         <!-- Where we can find the sources -->
24         <property name="src.dir"  location="src/java/" />
25         
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" />
32         
33         <property name="modules.dir"                 value="${base.dir}/modules" />
34         
35         <property file="${base.dir}/scilab-lib.properties"/>
36
37         <property file="${base.dir}/scilab-lib-doc.properties"/>
38         
39
40         <path id="checkstyle.classpath">
41                 <pathelement location="${checkstyle.jar}"/>
42         </path>
43         
44         <path id="compile.classpath">
45         
46           <pathelement location="${library.localization.dir}/${library.localization.name}"/>
47                 <pathelement location="${library.shell.dir}/${library.shell.name}"/>
48                 <pathelement location="${library.history_manager.dir}/${library.history_manager.name}"/>
49                 <pathelement location="${library.completion.dir}/${library.completion.name}"/>
50                 <pathelement location="${library.console.dir}/${library.console.name}"/>
51                 <pathelement location="${library.action_binding.dir}/${library.action_binding.name}"/>
52                 
53                 <pathelement location="${library.gui.dir}/${library.gui.name}"/>
54                 <pathelement location="${library.jvm.dir}/${library.jvm.name}"/>
55                 <pathelement location="${library.renderer.dir}/${library.renderer.name}"/>
56                 <pathelement location="${library.graphic_export.dir}/${library.graphic_export.name}"/>
57                 
58                 <pathelement location="${commons-logging.jar}"/>
59                 
60                 <pathelement location="${flexdock.jar}"/>
61                 
62                 <pathelement location="${gluegen.jar}"/>
63                 
64                 <pathelement location="${jrosetta-API.jar}"/>
65                 
66                 <pathelement location="${jrosetta-engine.jar}"/>
67
68                 <pathelement location="${jogl.jar}"/>
69                 
70                 <pathelement location="${jhall.jar}"/>
71
72         <!-- Only usefull for the documentation -->     
73                 <pathelement location="${library.helptools.dir}/${library.helptools.name}"/>
74                 <pathelement location="${batik.jar}"/>
75
76                 <pathelement location="${saxon.jar}"/>
77
78                 <pathelement location="${fop.jar}"/>
79
80                 <pathelement location="${jeuclid-core.jar}"/>
81         </path>
82
83         <taskdef resource="checkstyletask.properties" classpathref="checkstyle.classpath"/>
84         
85         <!-- Checkstyle process -->
86         
87         <target
88                 name        = "checkstyle"
89                 depends     = "checkstyle-init"
90                 description = "Generates a report of code convention violations.">
91                 <checkstyle
92                         config          = "${checkstyle.config.file}"
93                         failOnViolation = "false">
94                         <fileset
95                                 dir      = "${src.dir}"
96                                 includes = "**/*.java"/>
97                         <!-- Location of cache-file. -->
98                         <property
99                                 key  = "checkstyle.cache.file"
100                                 file = "${cache.dir}"/>
101                         <formatter type="plain"/>
102                         <formatter
103                                 type   = "xml"
104                                 toFile = "${checkstyle.xml.report.file}"/>
105                 </checkstyle>
106                 <xslt
107                         in     = "${checkstyle.xml.report.file}"
108                         out    = "${checkstyle.html.report.file}"
109                         style  = "${checkstyle.stylesheet}" />
110         </target>
111         
112         <!-- Create the build directory -->
113         
114         <target name="checkstyle-init">
115                 <mkdir dir="${checkstyle.report.dir}"/>
116         </target>
117         
118         <!-- Delete the build directory -->
119         
120         <target name="checkstyle-clean">
121                 <delete dir="${checkstyle.report.dir}"/>
122         </target>
123         
124         <target name="init">
125                 <mkdir dir="${classes.dir}"/>
126                 <mkdir dir="${build.jar.dir}"/>
127                         <!-- Create the time stamp -->
128                 <tstamp/>
129         </target>
130         
131         <!-- Clean sources -->
132         <target name="clean" description="clean sources">
133                 <delete dir="${build.dir}"/>
134                 <delete dir="${build.jar.dir}"/>
135                 <delete file="${build.jar.dir}/${library.name}"/>
136         </target>
137         
138         <!-- Compile sources -->
139         <target name="compile" description="Build sources" depends="init">
140                 <javac
141                         srcdir="${src.dir}" 
142                         destdir="${classes.dir}" 
143                         classpathref="compile.classpath" 
144                         deprecation="on"
145                         debug="off"
146                         verbose="off"
147                         listfiles="on"
148                         source="5"
149                         />
150         </target>
151
152         <!-- Create the jar -->
153         <target name="jar" description="Build the jar file" depends="compile">
154         
155                 <jar destfile="${build.jar.dir}/${library.name}" basedir="${classes.dir}">
156                 <manifest>
157                 </manifest>
158                 </jar>
159         </target>
160
161 </project>