Vinay Vishal | 5717147 | 2018-09-18 20:22:00 +0530 | [diff] [blame] | 1 | <?xml version="1.0" encoding="UTF-8"?> |
| 2 | <!-- |
| 3 | |
| 4 | Copyright (c) 2017, 2018 Oracle and/or its affiliates. All rights reserved. |
| 5 | |
| 6 | This program and the accompanying materials are made available under the |
| 7 | terms of the Eclipse Public License v. 2.0, which is available at |
| 8 | http://www.eclipse.org/legal/epl-2.0. |
| 9 | |
| 10 | This Source Code may also be made available under the following Secondary |
| 11 | Licenses when the conditions for such availability set forth in the |
| 12 | Eclipse Public License v. 2.0 are satisfied: GNU General Public License, |
| 13 | version 2 with the GNU Classpath Exception, which is available at |
| 14 | https://www.gnu.org/software/classpath/license.html. |
| 15 | |
| 16 | SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0 |
| 17 | |
| 18 | --> |
| 19 | |
| 20 | <!-- You may freely edit this file. See commented blocks below for --> |
| 21 | <!-- some examples of how to customize the build. --> |
| 22 | <!-- (If you delete it and reopen the project it will be recreated.) --> |
| 23 | <!-- By default, only the Clean and Build commands use this build script. --> |
| 24 | <!-- Commands such as Run, Debug, and Test only use this build script if --> |
| 25 | <!-- the Compile on Save feature is turned off for the project. --> |
| 26 | <!-- You can turn off the Compile on Save (or Deploy on Save) setting --> |
| 27 | <!-- in the project's Project Properties dialog box.--> |
| 28 | <project name="MyEjb-app-client" default="default" basedir="."> |
| 29 | <description>Builds, tests, and runs the project MyEjb-app-client.</description> |
| 30 | <import file="nbproject/build-impl.xml"/> |
| 31 | <!-- |
| 32 | |
David Matějček | f4dc06a | 2021-05-17 12:10:57 +0200 | [diff] [blame^] | 33 | There exist several targets which are by default empty and which can be |
| 34 | used for execution of your tasks. These targets are usually executed |
| 35 | before and after some main targets. They are: |
Vinay Vishal | 5717147 | 2018-09-18 20:22:00 +0530 | [diff] [blame] | 36 | |
| 37 | -pre-init: called before initialization of project properties |
| 38 | -post-init: called after initialization of project properties |
| 39 | -pre-compile: called before javac compilation |
| 40 | -post-compile: called after javac compilation |
| 41 | -pre-compile-single: called before javac compilation of single file |
| 42 | -post-compile-single: called after javac compilation of single file |
| 43 | -pre-compile-test: called before javac compilation of JUnit tests |
| 44 | -post-compile-test: called after javac compilation of JUnit tests |
| 45 | -pre-compile-test-single: called before javac compilation of single JUnit test |
| 46 | -post-compile-test-single: called after javac compilation of single JUunit test |
| 47 | -pre-jar: called before JAR building |
| 48 | -post-jar: called after JAR building |
| 49 | -post-clean: called after cleaning build products |
| 50 | |
| 51 | (Targets beginning with '-' are not intended to be called on their own.) |
| 52 | |
| 53 | Example of inserting an obfuscator after compilation could look like this: |
| 54 | |
| 55 | <target name="-post-compile"> |
| 56 | <obfuscate> |
| 57 | <fileset dir="${build.classes.dir}"/> |
| 58 | </obfuscate> |
| 59 | </target> |
| 60 | |
David Matějček | f4dc06a | 2021-05-17 12:10:57 +0200 | [diff] [blame^] | 61 | For list of available properties check the imported |
| 62 | nbproject/build-impl.xml file. |
Vinay Vishal | 5717147 | 2018-09-18 20:22:00 +0530 | [diff] [blame] | 63 | |
| 64 | |
| 65 | Another way to customize the build is by overriding existing main targets. |
David Matějček | f4dc06a | 2021-05-17 12:10:57 +0200 | [diff] [blame^] | 66 | The targets of interest are: |
Vinay Vishal | 5717147 | 2018-09-18 20:22:00 +0530 | [diff] [blame] | 67 | |
| 68 | -init-macrodef-javac: defines macro for javac compilation |
| 69 | -init-macrodef-junit: defines macro for junit execution |
| 70 | -init-macrodef-debug: defines macro for class debugging |
| 71 | -init-macrodef-java: defines macro for class execution |
| 72 | -do-jar-with-manifest: JAR building (if you are using a manifest) |
| 73 | -do-jar-without-manifest: JAR building (if you are not using a manifest) |
David Matějček | f4dc06a | 2021-05-17 12:10:57 +0200 | [diff] [blame^] | 74 | run: execution of project |
Vinay Vishal | 5717147 | 2018-09-18 20:22:00 +0530 | [diff] [blame] | 75 | -javadoc-build: Javadoc generation |
| 76 | test-report: JUnit report generation |
| 77 | |
| 78 | An example of overriding the target for project execution could look like this: |
| 79 | |
| 80 | <target name="run" depends="MyEjb-app-client-impl.jar"> |
| 81 | <exec dir="bin" executable="launcher.exe"> |
| 82 | <arg file="${dist.jar}"/> |
| 83 | </exec> |
| 84 | </target> |
| 85 | |
David Matějček | f4dc06a | 2021-05-17 12:10:57 +0200 | [diff] [blame^] | 86 | Notice that the overridden target depends on the jar target and not only on |
| 87 | the compile target as the regular run target does. Again, for a list of available |
Vinay Vishal | 5717147 | 2018-09-18 20:22:00 +0530 | [diff] [blame] | 88 | properties which you can use, check the target you are overriding in the |
David Matějček | f4dc06a | 2021-05-17 12:10:57 +0200 | [diff] [blame^] | 89 | nbproject/build-impl.xml file. |
Vinay Vishal | 5717147 | 2018-09-18 20:22:00 +0530 | [diff] [blame] | 90 | |
| 91 | --> |
| 92 | </project> |