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