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