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