java/HrisniciSpameri/build.xml
author František Kučera <franta-hg@frantovo.cz>
Thu, 12 Feb 2009 01:02:12 +0100
changeset 10 025cde619dd9
parent 9 457918d6cd1f
child 13 850caaac1c42
permissions -rw-r--r--
Doladění Antu a další drobnosti.
franta-hg@9
     1
<?xml version="1.0" encoding="UTF-8"?>
franta-hg@9
     2
<!-- You may freely edit this file. See commented blocks below for -->
franta-hg@9
     3
<!-- some examples of how to customize the build. -->
franta-hg@9
     4
<!-- (If you delete it and reopen the project it will be recreated.) -->
franta-hg@9
     5
<!-- By default, only the Clean and Build commands use this build script. -->
franta-hg@9
     6
<!-- Commands such as Run, Debug, and Test only use this build script if -->
franta-hg@9
     7
<!-- the Compile on Save feature is turned off for the project. -->
franta-hg@9
     8
<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
franta-hg@9
     9
<!-- in the project's Project Properties dialog box.-->
franta-hg@9
    10
<project name="HrisniciSpameri" default="default" basedir=".">
franta-hg@9
    11
    <description>Builds, tests, and runs the project HrisniciSpameri.</description>
franta-hg@9
    12
    <import file="nbproject/build-impl.xml"/>
franta-hg@9
    13
    <!--
franta-hg@9
    14
franta-hg@9
    15
    There exist several targets which are by default empty and which can be 
franta-hg@9
    16
    used for execution of your tasks. These targets are usually executed 
franta-hg@9
    17
    before and after some main targets. They are: 
franta-hg@9
    18
franta-hg@9
    19
      -pre-init:                 called before initialization of project properties 
franta-hg@9
    20
      -post-init:                called after initialization of project properties 
franta-hg@9
    21
      -pre-compile:              called before javac compilation 
franta-hg@9
    22
      -post-compile:             called after javac compilation 
franta-hg@9
    23
      -pre-compile-single:       called before javac compilation of single file
franta-hg@9
    24
      -post-compile-single:      called after javac compilation of single file
franta-hg@9
    25
      -pre-compile-test:         called before javac compilation of JUnit tests
franta-hg@9
    26
      -post-compile-test:        called after javac compilation of JUnit tests
franta-hg@9
    27
      -pre-compile-test-single:  called before javac compilation of single JUnit test
franta-hg@9
    28
      -post-compile-test-single: called after javac compilation of single JUunit test
franta-hg@9
    29
      -pre-dist:                 called before archive building 
franta-hg@9
    30
      -post-dist:                called after archive building 
franta-hg@9
    31
      -post-clean:               called after cleaning build products 
franta-hg@9
    32
      -pre-run-deploy:           called before deploying
franta-hg@9
    33
      -post-run-deploy:          called after deploying
franta-hg@9
    34
franta-hg@9
    35
    Example of pluging an obfuscator after the compilation could look like 
franta-hg@9
    36
franta-hg@9
    37
        <target name="-post-compile">
franta-hg@9
    38
            <obfuscate>
franta-hg@9
    39
                <fileset dir="${build.classes.dir}"/>
franta-hg@9
    40
            </obfuscate>
franta-hg@9
    41
        </target>
franta-hg@9
    42
franta-hg@9
    43
    For list of available properties check the imported 
franta-hg@9
    44
    nbproject/build-impl.xml file. 
franta-hg@9
    45
franta-hg@9
    46
franta-hg@9
    47
    Other way how to customize the build is by overriding existing main targets.
franta-hg@9
    48
    The target of interest are: 
franta-hg@9
    49
franta-hg@9
    50
      init-macrodef-javac:    defines macro for javac compilation
franta-hg@9
    51
      init-macrodef-junit:   defines macro for junit execution
franta-hg@9
    52
      init-macrodef-debug:    defines macro for class debugging
franta-hg@9
    53
      do-dist:                archive building
franta-hg@9
    54
      run:                    execution of project 
franta-hg@9
    55
      javadoc-build:          javadoc generation 
franta-hg@9
    56
franta-hg@9
    57
    Example of overriding the target for project execution could look like 
franta-hg@9
    58
franta-hg@9
    59
        <target name="run" depends="<PROJNAME>-impl.jar">
franta-hg@9
    60
            <exec dir="bin" executable="launcher.exe">
franta-hg@9
    61
                <arg file="${dist.jar}"/>
franta-hg@9
    62
            </exec>
franta-hg@9
    63
        </target>
franta-hg@9
    64
franta-hg@9
    65
    Notice that overridden target depends on jar target and not only on 
franta-hg@9
    66
    compile target as regular run target does. Again, for list of available 
franta-hg@9
    67
    properties which you can use check the target you are overriding in 
franta-hg@9
    68
    nbproject/build-impl.xml file. 
franta-hg@9
    69
franta-hg@9
    70
    
franta-hg@9
    71
    -->
franta-hg@9
    72
franta-hg@9
    73
    <target name="-post-init">
franta-hg@10
    74
            <zip basedir="../../" excludes=".hg/** .hgignore java/HrisniciSpameri/build/** java/HrisniciSpameri/dist/** java/HrisniciSpameri/web/HrisniciSpameri-src.zip"  includes="**" encoding="UTF-8" comment="Kódování: UTF-8 | Autor: František Kučera | Web: http://frantovo.cz/ | Licence: GNU Affero GPL, verze 3" destfile="web/HrisniciSpameri-src.zip"/>
franta-hg@9
    75
    </target>
franta-hg@9
    76
franta-hg@9
    77
</project>