New Java Help Browser for Scilab.
[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         <!-- 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"/>
41         </path>
42                 <classpath id="compile.classpath"
43                         path="${oro.jar}:${xalan.jar}"
44                 />
45         -->
46         
47         <path id="checkstyle.classpath">
48                 <pathelement location="${checkstyle.jar}"/>
49         </path>
50         
51         <path id="compile.classpath">
52         
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}"/>
59                 
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}"/>
64                 
65                 <pathelement location="${commons-logging.jar}"/>
66                 
67                 <pathelement location="${flexdock.jar}"/>
68                 
69                 <pathelement location="${gluegen.jar}"/>
70                 
71                 <pathelement location="${jrosetta-API.jar}"/>
72                 
73                 <pathelement location="${jrosetta-engine.jar}"/>
74
75                 <pathelement location="${jogl.jar}"/>
76                 
77                 <pathelement location="${jhall.jar}"/>
78
79         </path>
80         
81         <taskdef resource="checkstyletask.properties" classpathref="checkstyle.classpath"/>
82         
83         <!-- Checkstyle process -->
84         
85         <target
86                 name        = "checkstyle"
87                 depends     = "checkstyle-init"
88                 description = "Generates a report of code convention violations.">
89                 <checkstyle
90                         config          = "${checkstyle.config.file}"
91                         failOnViolation = "false">
92                         <fileset
93                                 dir      = "${src.dir}"
94                                 includes = "**/*.java"/>
95                         <!-- Location of cache-file. -->
96                         <property
97                                 key  = "checkstyle.cache.file"
98                                 file = "${cache.dir}"/>
99                         <formatter type="plain"/>
100                         <formatter
101                                 type   = "xml"
102                                 toFile = "${checkstyle.xml.report.file}"/>
103                 </checkstyle>
104                 <xslt
105                         in     = "${checkstyle.xml.report.file}"
106                         out    = "${checkstyle.html.report.file}"
107                         style  = "${checkstyle.stylesheet}" />
108         </target>
109         
110         <!-- Create the build directory -->
111         
112         <target name="checkstyle-init">
113                 <mkdir dir="${checkstyle.report.dir}"/>
114         </target>
115         
116         <!-- Delete the build directory -->
117         
118         <target name="checkstyle-clean">
119                 <delete dir="${checkstyle.report.dir}"/>
120         </target>
121         
122         <target name="init">
123                 <mkdir dir="${classes.dir}"/>
124                 <mkdir dir="${build.jar.dir}"/>
125                         <!-- Create the time stamp -->
126                 <tstamp/>
127         </target>
128         
129         <!-- Clean sources -->
130         <target name="clean" description="clean sources">
131                 <delete dir="${build.dir}"/>
132                 <delete dir="${build.jar.dir}"/>
133                 <delete file="${build.jar.dir}/${library.name}"/>
134         </target>
135         
136         <!-- Compile sources -->
137         <target name="compile" description="Build sources" depends="init">
138                 <javac
139                         srcdir="${src.dir}" 
140                         destdir="${classes.dir}" 
141                         classpathref="compile.classpath" 
142                         deprecation="on"
143                         debug="off"
144                         verbose="off"
145                         listfiles="on"
146                         source="5"
147                         />
148         </target>
149         
150         <!-- Create the jar -->
151         <target name="jar" description="Build the jar file" depends="compile">
152         
153                 <jar destfile="${build.jar.dir}/${library.name}" basedir="${classes.dir}">
154                 <manifest>
155                 </manifest>
156                 </jar>
157         </target>
158
159 </project>