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