src/Tools/jEdit/build.xml
author wenzelm
Mon, 20 Oct 2008 17:02:03 +0200
changeset 34328 be2e9e6726af
parent 34320 883dc8fc3328
child 34329 8622e3a0274e
permissions -rw-r--r--
added application.args (Why does it end up in pricate properties?);
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
34320
883dc8fc3328 basic Netbeans project setup;
wenzelm
parents:
diff changeset
     1
<?xml version="1.0" encoding="UTF-8"?>
883dc8fc3328 basic Netbeans project setup;
wenzelm
parents:
diff changeset
     2
<!-- You may freely edit this file. See commented blocks below for -->
883dc8fc3328 basic Netbeans project setup;
wenzelm
parents:
diff changeset
     3
<!-- some examples of how to customize the build. -->
883dc8fc3328 basic Netbeans project setup;
wenzelm
parents:
diff changeset
     4
<!-- (If you delete it and reopen the project it will be recreated.) -->
883dc8fc3328 basic Netbeans project setup;
wenzelm
parents:
diff changeset
     5
<project name="Isabelle-jEdit" default="default" basedir=".">
883dc8fc3328 basic Netbeans project setup;
wenzelm
parents:
diff changeset
     6
    <description>Builds, tests, and runs the project Isabelle-jEdit.</description>
883dc8fc3328 basic Netbeans project setup;
wenzelm
parents:
diff changeset
     7
    <import file="nbproject/build-impl.xml"/>
883dc8fc3328 basic Netbeans project setup;
wenzelm
parents:
diff changeset
     8
    <!--
883dc8fc3328 basic Netbeans project setup;
wenzelm
parents:
diff changeset
     9
883dc8fc3328 basic Netbeans project setup;
wenzelm
parents:
diff changeset
    10
    There exist several targets which are by default empty and which can be 
883dc8fc3328 basic Netbeans project setup;
wenzelm
parents:
diff changeset
    11
    used for execution of your tasks. These targets are usually executed 
883dc8fc3328 basic Netbeans project setup;
wenzelm
parents:
diff changeset
    12
    before and after some main targets. They are: 
883dc8fc3328 basic Netbeans project setup;
wenzelm
parents:
diff changeset
    13
883dc8fc3328 basic Netbeans project setup;
wenzelm
parents:
diff changeset
    14
      -pre-init:                 called before initialization of project properties
883dc8fc3328 basic Netbeans project setup;
wenzelm
parents:
diff changeset
    15
      -post-init:                called after initialization of project properties
883dc8fc3328 basic Netbeans project setup;
wenzelm
parents:
diff changeset
    16
      -pre-compile:              called before javac compilation
883dc8fc3328 basic Netbeans project setup;
wenzelm
parents:
diff changeset
    17
      -post-compile:             called after javac compilation
883dc8fc3328 basic Netbeans project setup;
wenzelm
parents:
diff changeset
    18
      -pre-compile-single:       called before javac compilation of single file
883dc8fc3328 basic Netbeans project setup;
wenzelm
parents:
diff changeset
    19
      -post-compile-single:      called after javac compilation of single file
883dc8fc3328 basic Netbeans project setup;
wenzelm
parents:
diff changeset
    20
      -pre-compile-test:         called before javac compilation of JUnit tests
883dc8fc3328 basic Netbeans project setup;
wenzelm
parents:
diff changeset
    21
      -post-compile-test:        called after javac compilation of JUnit tests
883dc8fc3328 basic Netbeans project setup;
wenzelm
parents:
diff changeset
    22
      -pre-compile-test-single:  called before javac compilation of single JUnit test
883dc8fc3328 basic Netbeans project setup;
wenzelm
parents:
diff changeset
    23
      -post-compile-test-single: called after javac compilation of single JUunit test
883dc8fc3328 basic Netbeans project setup;
wenzelm
parents:
diff changeset
    24
      -pre-jar:                  called before JAR building
883dc8fc3328 basic Netbeans project setup;
wenzelm
parents:
diff changeset
    25
      -post-jar:                 called after JAR building
883dc8fc3328 basic Netbeans project setup;
wenzelm
parents:
diff changeset
    26
      -post-clean:               called after cleaning build products
883dc8fc3328 basic Netbeans project setup;
wenzelm
parents:
diff changeset
    27
883dc8fc3328 basic Netbeans project setup;
wenzelm
parents:
diff changeset
    28
    (Targets beginning with '-' are not intended to be called on their own.)
883dc8fc3328 basic Netbeans project setup;
wenzelm
parents:
diff changeset
    29
883dc8fc3328 basic Netbeans project setup;
wenzelm
parents:
diff changeset
    30
    Example of inserting an obfuscator after compilation could look like this:
883dc8fc3328 basic Netbeans project setup;
wenzelm
parents:
diff changeset
    31
883dc8fc3328 basic Netbeans project setup;
wenzelm
parents:
diff changeset
    32
        <target name="-post-compile">
883dc8fc3328 basic Netbeans project setup;
wenzelm
parents:
diff changeset
    33
            <obfuscate>
883dc8fc3328 basic Netbeans project setup;
wenzelm
parents:
diff changeset
    34
                <fileset dir="${build.classes.dir}"/>
883dc8fc3328 basic Netbeans project setup;
wenzelm
parents:
diff changeset
    35
            </obfuscate>
883dc8fc3328 basic Netbeans project setup;
wenzelm
parents:
diff changeset
    36
        </target>
883dc8fc3328 basic Netbeans project setup;
wenzelm
parents:
diff changeset
    37
883dc8fc3328 basic Netbeans project setup;
wenzelm
parents:
diff changeset
    38
    For list of available properties check the imported 
883dc8fc3328 basic Netbeans project setup;
wenzelm
parents:
diff changeset
    39
    nbproject/build-impl.xml file. 
883dc8fc3328 basic Netbeans project setup;
wenzelm
parents:
diff changeset
    40
883dc8fc3328 basic Netbeans project setup;
wenzelm
parents:
diff changeset
    41
883dc8fc3328 basic Netbeans project setup;
wenzelm
parents:
diff changeset
    42
    Another way to customize the build is by overriding existing main targets.
883dc8fc3328 basic Netbeans project setup;
wenzelm
parents:
diff changeset
    43
    The targets of interest are: 
883dc8fc3328 basic Netbeans project setup;
wenzelm
parents:
diff changeset
    44
883dc8fc3328 basic Netbeans project setup;
wenzelm
parents:
diff changeset
    45
      -init-macrodef-javac:     defines macro for javac compilation
883dc8fc3328 basic Netbeans project setup;
wenzelm
parents:
diff changeset
    46
      -init-macrodef-junit:     defines macro for junit execution
883dc8fc3328 basic Netbeans project setup;
wenzelm
parents:
diff changeset
    47
      -init-macrodef-debug:     defines macro for class debugging
883dc8fc3328 basic Netbeans project setup;
wenzelm
parents:
diff changeset
    48
      -init-macrodef-java:      defines macro for class execution
883dc8fc3328 basic Netbeans project setup;
wenzelm
parents:
diff changeset
    49
      -do-jar-with-manifest:    JAR building (if you are using a manifest)
883dc8fc3328 basic Netbeans project setup;
wenzelm
parents:
diff changeset
    50
      -do-jar-without-manifest: JAR building (if you are not using a manifest)
883dc8fc3328 basic Netbeans project setup;
wenzelm
parents:
diff changeset
    51
      run:                      execution of project 
883dc8fc3328 basic Netbeans project setup;
wenzelm
parents:
diff changeset
    52
      -javadoc-build:           Javadoc generation
883dc8fc3328 basic Netbeans project setup;
wenzelm
parents:
diff changeset
    53
      test-report:              JUnit report generation
883dc8fc3328 basic Netbeans project setup;
wenzelm
parents:
diff changeset
    54
883dc8fc3328 basic Netbeans project setup;
wenzelm
parents:
diff changeset
    55
    An example of overriding the target for project execution could look like this:
883dc8fc3328 basic Netbeans project setup;
wenzelm
parents:
diff changeset
    56
883dc8fc3328 basic Netbeans project setup;
wenzelm
parents:
diff changeset
    57
        <target name="run" depends="Isabelle-jEdit-impl.jar">
883dc8fc3328 basic Netbeans project setup;
wenzelm
parents:
diff changeset
    58
            <exec dir="bin" executable="launcher.exe">
883dc8fc3328 basic Netbeans project setup;
wenzelm
parents:
diff changeset
    59
                <arg file="${dist.jar}"/>
883dc8fc3328 basic Netbeans project setup;
wenzelm
parents:
diff changeset
    60
            </exec>
883dc8fc3328 basic Netbeans project setup;
wenzelm
parents:
diff changeset
    61
        </target>
883dc8fc3328 basic Netbeans project setup;
wenzelm
parents:
diff changeset
    62
883dc8fc3328 basic Netbeans project setup;
wenzelm
parents:
diff changeset
    63
    Notice that the overridden target depends on the jar target and not only on 
883dc8fc3328 basic Netbeans project setup;
wenzelm
parents:
diff changeset
    64
    the compile target as the regular run target does. Again, for a list of available 
883dc8fc3328 basic Netbeans project setup;
wenzelm
parents:
diff changeset
    65
    properties which you can use, check the target you are overriding in the
883dc8fc3328 basic Netbeans project setup;
wenzelm
parents:
diff changeset
    66
    nbproject/build-impl.xml file. 
883dc8fc3328 basic Netbeans project setup;
wenzelm
parents:
diff changeset
    67
883dc8fc3328 basic Netbeans project setup;
wenzelm
parents:
diff changeset
    68
    -->
883dc8fc3328 basic Netbeans project setup;
wenzelm
parents:
diff changeset
    69
</project>