apply version 2.7 copyright
[jalview.git] / nbbuild.xml
1 <?xml version="1.0" encoding="UTF-8"?><!--
2     Jalview - A Sequence Alignment Editor and Viewer (Version 2.7)
3     Copyright (C) 2011 J Procter, AM Waterhouse, G Barton, M Clamp, S Searle
4    
5     This file is part of Jalview.
6    
7     Jalview is free software: you can redistribute it and/or
8     modify it under the terms of the GNU General Public License 
9     as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
10    
11     Jalview is distributed in the hope that it will be useful, but 
12     WITHOUT ANY WARRANTY; without even the implied warranty 
13     of MERCHANTABILITY or FITNESS FOR A PARTICULAR 
14     PURPOSE.  See the GNU General Public License for more details.
15    
16     You should have received a copy of the GNU General Public License along with Jalview.  If not, see <http://www.gnu.org/licenses/>.
17  -->
18
19 <!-- You may freely edit this file. See commented blocks below for -->
20 <!-- some examples of how to customize the build. -->
21 <!-- (If you delete it and reopen the project it will be recreated.) -->
22 <!-- By default, only the Clean and Build commands use this build script. -->
23 <!-- Commands such as Run, Debug, and Test only use this build script if -->
24 <!-- the Compile on Save feature is turned off for the project. -->
25 <!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
26 <!-- in the project's Project Properties dialog box.-->
27 <project name="jalview" default="default" basedir=".">
28     <description>Builds, tests, and runs the project jalview.</description>
29     <import file="nbproject/build-impl.xml"/>
30     <target name="-pre-compile">
31         <ant antfile="build.xml" target="buildindices">
32         <property name="outputDir" value="build/classes"/>    
33         <property name="packageDir" value="build/dist"/>    
34         </ant>
35         
36     </target>
37     <!--
38
39     There exist several targets which are by default empty and which can be 
40     used for execution of your tasks. These targets are usually executed 
41     before and after some main targets. They are: 
42
43       -pre-init:                 called before initialization of project properties
44       -post-init:                called after initialization of project properties
45       -pre-compile:              called before javac compilation
46       -post-compile:             called after javac compilation
47       -pre-compile-single:       called before javac compilation of single file
48       -post-compile-single:      called after javac compilation of single file
49       -pre-compile-test:         called before javac compilation of JUnit tests
50       -post-compile-test:        called after javac compilation of JUnit tests
51       -pre-compile-test-single:  called before javac compilation of single JUnit test
52       -post-compile-test-single: called after javac compilation of single JUunit test
53       -pre-jar:                  called before JAR building
54       -post-jar:                 called after JAR building
55       -post-clean:               called after cleaning build products
56
57     (Targets beginning with '-' are not intended to be called on their own.)
58
59     Example of inserting an obfuscator after compilation could look like this:
60
61         <target name="-post-compile">
62             <obfuscate>
63                 <fileset dir="${build.classes.dir}"/>
64             </obfuscate>
65         </target>
66
67     For list of available properties check the imported 
68     nbproject/build-impl.xml file. 
69
70
71     Another way to customize the build is by overriding existing main targets.
72     The targets of interest are: 
73
74       -init-macrodef-javac:     defines macro for javac compilation
75       -init-macrodef-junit:     defines macro for junit execution
76       -init-macrodef-debug:     defines macro for class debugging
77       -init-macrodef-java:      defines macro for class execution
78       -do-jar-with-manifest:    JAR building (if you are using a manifest)
79       -do-jar-without-manifest: JAR building (if you are not using a manifest)
80       run:                      execution of project 
81       -javadoc-build:           Javadoc generation
82       test-report:              JUnit report generation
83
84     An example of overriding the target for project execution could look like this:
85
86         <target name="run" depends="jalview-impl.jar">
87             <exec dir="bin" executable="launcher.exe">
88                 <arg file="${dist.jar}"/>
89             </exec>
90         </target>
91
92     Notice that the overridden target depends on the jar target and not only on 
93     the compile target as the regular run target does. Again, for a list of available 
94     properties which you can use, check the target you are overriding in the
95     nbproject/build-impl.xml file. 
96
97     -->
98 </project>