java/nekurak.net-ear/build.xml
author František Kučera <franta-hg@frantovo.cz>
Tue Apr 23 21:43:37 2013 +0200 (2013-04-23)
changeset 204 bebec432330a
permissions -rw-r--r--
oprava chatu, tabulátory
franta-hg@31
     1
<?xml version="1.0" encoding="UTF-8"?>
franta-hg@31
     2
<!-- You may freely edit this file. See commented blocks below for -->
franta-hg@31
     3
<!-- some examples of how to customize the build. -->
franta-hg@31
     4
<!-- (If you delete it and reopen the project it will be recreated.) -->
franta-hg@31
     5
<!-- By default, only the Clean and Build commands use this build script. -->
franta-hg@31
     6
<!-- Commands such as Run, Debug, and Test only use this build script if -->
franta-hg@31
     7
<!-- the Compile on Save feature is turned off for the project. -->
franta-hg@31
     8
<!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
franta-hg@31
     9
<!-- in the project's Project Properties dialog box.-->
franta-hg@31
    10
<project name="nekurak.net-ear" default="default" basedir="." xmlns:ear="http://www.netbeans.org/ns/j2ee-earproject/2">
franta-hg@31
    11
    <description>Builds, tests, and runs the project nekurak.net-ear.</description>
franta-hg@31
    12
    <import file="nbproject/build-impl.xml"/>
franta-hg@31
    13
    <!--
franta-hg@31
    14
franta-hg@31
    15
    There exist several targets which are by default empty and which can be
franta-hg@31
    16
    used for execution of your tasks. These targets are usually executed
franta-hg@31
    17
    before and after some main targets. They are:
franta-hg@31
    18
franta-hg@31
    19
      pre-init:                 called before initialization of project properties
franta-hg@31
    20
      post-init:                called after initialization of project properties
franta-hg@31
    21
      pre-compile:              called before javac compilation
franta-hg@31
    22
      post-compile:             called after javac compilation
franta-hg@31
    23
      pre-dist:                 called before archive building
franta-hg@31
    24
      post-dist:                called after archive building
franta-hg@31
    25
      post-clean:               called after cleaning build products
franta-hg@31
    26
      pre-run-deploy:           called before deploying
franta-hg@31
    27
      post-run-deploy:          called after deploying
franta-hg@31
    28
franta-hg@31
    29
    Example of pluging an obfuscator after the compilation could look like
franta-hg@31
    30
franta-hg@31
    31
	<target name="post-compile">
franta-hg@31
    32
	    <obfuscate>
franta-hg@31
    33
		<fileset dir="${build.classes.dir}"/>
franta-hg@31
    34
	    </obfuscate>
franta-hg@31
    35
	</target>
franta-hg@31
    36
franta-hg@31
    37
    For list of available properties check the imported
franta-hg@31
    38
    nbproject/build-impl.xml file.
franta-hg@31
    39
franta-hg@31
    40
franta-hg@31
    41
    Other way how to customize the build is by overriding existing main targets.
franta-hg@31
    42
    The target of interest are:
franta-hg@31
    43
franta-hg@31
    44
      do-dist:                archive building
franta-hg@31
    45
      run:                    execution of project
franta-hg@31
    46
franta-hg@31
    47
    Example of overriding the target for project execution could look like
franta-hg@31
    48
franta-hg@31
    49
	<target name="run" depends="<PROJNAME>-impl.jar">
franta-hg@31
    50
	    <exec dir="bin" executable="launcher.exe">
franta-hg@31
    51
		<arg file="${dist.jar}"/>
franta-hg@31
    52
	    </exec>
franta-hg@31
    53
	</target>
franta-hg@31
    54
franta-hg@31
    55
    Notice that overridden target depends on jar target and not only on
franta-hg@31
    56
    compile target as regular run target does. Again, for list of available
franta-hg@31
    57
    properties which you can use check the target you are overriding in
franta-hg@31
    58
    nbproject/build-impl.xml file.
franta-hg@31
    59
franta-hg@31
    60
    -->
franta-hg@31
    61
franta-hg@31
    62
</project>