samples/unionfs/build.xml
author Jaroslav Tulach <jaroslav.tulach@apidesign.org>
Thu, 30 Oct 2014 21:30:10 +0100
changeset 409 40cabcdcd2be
parent 340 9c1a298e51a9
permissions -rw-r--r--
Updating to NBMs from NetBeans 8.0.1 as some of them are required to run on JDK8
jtulach@135
     1
<?xml version="1.0" encoding="UTF-8"?>
jtulach@135
     2
<!-- You may freely edit this file. See commented blocks below for -->
jtulach@135
     3
<!-- some examples of how to customize the build. -->
jtulach@135
     4
<!-- (If you delete it and reopen the project it will be recreated.) -->
jtulach@340
     5
<!-- By default, only the Clean and Build commands use this build script. -->
jtulach@340
     6
<!-- Commands such as Run, Debug, and Test only use this build script if -->
jtulach@340
     7
<!-- the Compile on Save feature is turned off for the project. -->
jtulach@340
     8
<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
jtulach@340
     9
<!-- in the project's Project Properties dialog box.-->
jtulach@135
    10
<project name="unionfs" default="default" basedir=".">
jtulach@135
    11
    <description>Builds, tests, and runs the project unionfs.</description>
jtulach@135
    12
    <import file="nbproject/build-impl.xml"/>
jtulach@135
    13
    <!--
jtulach@135
    14
jtulach@135
    15
    There exist several targets which are by default empty and which can be 
jtulach@135
    16
    used for execution of your tasks. These targets are usually executed 
jtulach@135
    17
    before and after some main targets. They are: 
jtulach@135
    18
jtulach@135
    19
      -pre-init:                 called before initialization of project properties
jtulach@135
    20
      -post-init:                called after initialization of project properties
jtulach@135
    21
      -pre-compile:              called before javac compilation
jtulach@135
    22
      -post-compile:             called after javac compilation
jtulach@135
    23
      -pre-compile-single:       called before javac compilation of single file
jtulach@135
    24
      -post-compile-single:      called after javac compilation of single file
jtulach@135
    25
      -pre-compile-test:         called before javac compilation of JUnit tests
jtulach@135
    26
      -post-compile-test:        called after javac compilation of JUnit tests
jtulach@135
    27
      -pre-compile-test-single:  called before javac compilation of single JUnit test
jtulach@135
    28
      -post-compile-test-single: called after javac compilation of single JUunit test
jtulach@135
    29
      -pre-jar:                  called before JAR building
jtulach@135
    30
      -post-jar:                 called after JAR building
jtulach@135
    31
      -post-clean:               called after cleaning build products
jtulach@135
    32
jtulach@135
    33
    (Targets beginning with '-' are not intended to be called on their own.)
jtulach@135
    34
jtulach@135
    35
    Example of inserting an obfuscator after compilation could look like this:
jtulach@135
    36
jtulach@135
    37
        <target name="-post-compile">
jtulach@135
    38
            <obfuscate>
jtulach@135
    39
                <fileset dir="${build.classes.dir}"/>
jtulach@135
    40
            </obfuscate>
jtulach@135
    41
        </target>
jtulach@135
    42
jtulach@135
    43
    For list of available properties check the imported 
jtulach@135
    44
    nbproject/build-impl.xml file. 
jtulach@135
    45
jtulach@135
    46
jtulach@135
    47
    Another way to customize the build is by overriding existing main targets.
jtulach@135
    48
    The targets of interest are: 
jtulach@135
    49
jtulach@135
    50
      -init-macrodef-javac:     defines macro for javac compilation
jtulach@135
    51
      -init-macrodef-junit:     defines macro for junit execution
jtulach@135
    52
      -init-macrodef-debug:     defines macro for class debugging
jtulach@135
    53
      -init-macrodef-java:      defines macro for class execution
jaroslav@409
    54
      -do-jar:                  JAR building
jtulach@135
    55
      run:                      execution of project 
jtulach@135
    56
      -javadoc-build:           Javadoc generation
jtulach@135
    57
      test-report:              JUnit report generation
jtulach@135
    58
jtulach@135
    59
    An example of overriding the target for project execution could look like this:
jtulach@135
    60
jtulach@135
    61
        <target name="run" depends="unionfs-impl.jar">
jtulach@135
    62
            <exec dir="bin" executable="launcher.exe">
jtulach@135
    63
                <arg file="${dist.jar}"/>
jtulach@135
    64
            </exec>
jtulach@135
    65
        </target>
jtulach@135
    66
jtulach@135
    67
    Notice that the overridden target depends on the jar target and not only on 
jtulach@135
    68
    the compile target as the regular run target does. Again, for a list of available 
jtulach@135
    69
    properties which you can use, check the target you are overriding in the
jtulach@135
    70
    nbproject/build-impl.xml file. 
jtulach@135
    71
jtulach@135
    72
    -->
jtulach@135
    73
</project>