Advertisement
Guest User

Untitled

a guest
Jun 24th, 2017
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 4.74 KB | None | 0 0
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!-- You may freely edit this file. See commented blocks below for -->
  3. <!-- some examples of how to customize the build. -->
  4. <!-- (If you delete it and reopen the project it will be recreated.) -->
  5. <!-- By default, only the Clean and Build commands use this build script. -->
  6. <!-- Commands such as Run, Debug, and Test only use this build script if -->
  7. <!-- the Compile on Save feature is turned off for the project. -->
  8. <!-- You can turn off the Compile on Save (or Deploy on Save) setting -->
  9. <!-- in the project's Project Properties dialog box.-->
  10. <project name="Boletin1" default="default" basedir=".">
  11.     <description>Builds, tests, and runs the project Boletin1.</description>
  12.     <import file="nbproject/build-impl.xml"/>
  13.  
  14.      <path id="cobertura.classpath">
  15.          <fileset dir="${basedir}">
  16.            <include name="lib/cobertura-1.9.3/cobertura.jar" />
  17.            <include name="lib/cobertura-1.9.3/lib/**/*.jar" />
  18.          </fileset>
  19.        </path>
  20.  
  21.        <taskdef classpathref="cobertura.classpath" resource="tasks.properties"/>
  22.  
  23.        <target name="cobertura-instrument" depends="init,compile-test,-pre-test-run">
  24.          <cobertura-instrument todir="${build.test.cobertura.classes.dir}">
  25.            <fileset dir="${build.classes.dir}">
  26.              <include name="**/*.class"/>
  27.            </fileset>
  28.          </cobertura-instrument>
  29.        </target>
  30.  
  31.        <target name="test-coverage"
  32.               depends="init,compile-test,-pre-test-run,cobertura-instrument, -do-test-run,test-report,-post-test-run,-test-browse"/>
  33.  
  34.        <target name="cobertura-coverage-report" depends="init, test-coverage">
  35.          <cobertura-report srcdir="${src.dir}" destdir="${cobertura.report.dir}"/>
  36.          <delete file="Serialized" failonerror="false"/>
  37.          <delete file="cobertura.ser" failonerror="false"/>
  38.        </target>
  39.     <!--
  40.  
  41.    There exist several targets which are by default empty and which can be
  42.    used for execution of your tasks. These targets are usually executed
  43.    before and after some main targets. They are:
  44.  
  45.      -pre-init:                 called before initialization of project properties
  46.      -post-init:                called after initialization of project properties
  47.      -pre-compile:              called before javac compilation
  48.      -post-compile:             called after javac compilation
  49.      -pre-compile-single:       called before javac compilation of single file
  50.      -post-compile-single:      called after javac compilation of single file
  51.      -pre-compile-test:         called before javac compilation of JUnit tests
  52.      -post-compile-test:        called after javac compilation of JUnit tests
  53.      -pre-compile-test-single:  called before javac compilation of single JUnit test
  54.      -post-compile-test-single: called after javac compilation of single JUunit test
  55.      -pre-jar:                  called before JAR building
  56.      -post-jar:                 called after JAR building
  57.      -post-clean:               called after cleaning build products
  58.  
  59.    (Targets beginning with '-' are not intended to be called on their own.)
  60.  
  61.    Example of inserting an obfuscator after compilation could look like this:
  62.  
  63.        <target name="-post-compile">
  64.            <obfuscate>
  65.                <fileset dir="${build.classes.dir}"/>
  66.            </obfuscate>
  67.        </target>
  68.  
  69.    For list of available properties check the imported
  70.    nbproject/build-impl.xml file.
  71.  
  72.  
  73.    Another way to customize the build is by overriding existing main targets.
  74.    The targets of interest are:
  75.  
  76.      -init-macrodef-javac:     defines macro for javac compilation
  77.      -init-macrodef-junit:     defines macro for junit execution
  78.      -init-macrodef-debug:     defines macro for class debugging
  79.      -init-macrodef-java:      defines macro for class execution
  80.      -do-jar-with-manifest:    JAR building (if you are using a manifest)
  81.      -do-jar-without-manifest: JAR building (if you are not using a manifest)
  82.      run:                      execution of project
  83.      -javadoc-build:           Javadoc generation
  84.      test-report:              JUnit report generation
  85.  
  86.    An example of overriding the target for project execution could look like this:
  87.  
  88.        <target name="run" depends="Boletin1-impl.jar">
  89.            <exec dir="bin" executable="launcher.exe">
  90.                <arg file="${dist.jar}"/>
  91.            </exec>
  92.        </target>
  93.  
  94.    Notice that the overridden target depends on the jar target and not only on
  95.    the compile target as the regular run target does. Again, for a list of available
  96.    properties which you can use, check the target you are overriding in the
  97.    nbproject/build-impl.xml file.
  98.  
  99.    -->
  100. </project>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement