[507] | 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 | <project name="" default="default" basedir="." xmlns:web="http://www.netbeans.org/ns/j2ee-ejbjarproject/1">
|
---|
| 6 | <description>Builds, tests, and runs the project .</description>
|
---|
| 7 | <import file="nbproject/build-impl.xml"/>
|
---|
| 8 | <import file="../../../../build.lib.xml" />
|
---|
| 9 | <target name="build">
|
---|
| 10 | <property name="target-to-call" value="dist" />
|
---|
| 11 | <antcall target="call-target-in-isolation-if-out-of-date" />
|
---|
| 12 | </target>
|
---|
| 13 | <target name="clean-build" depends="clean,dist" />
|
---|
| 14 | <target name="clean-test" depends="clean,dist" />
|
---|
| 15 | <target name="build-test" depends="dist" />
|
---|
| 16 | <!--
|
---|
| 17 |
|
---|
| 18 | There exist several targets which are by default empty and which can be
|
---|
| 19 | used for execution of your tasks. These targets are usually executed
|
---|
| 20 | before and after some main targets. They are:
|
---|
| 21 |
|
---|
| 22 | pre-init: called before initialization of project properties
|
---|
| 23 | post-init: called after initialization of project properties
|
---|
| 24 | pre-compile: called before javac compilation
|
---|
| 25 | post-compile: called after javac compilation
|
---|
| 26 | pre-compile-single: called before javac compilation of single file
|
---|
| 27 | post-compile-single: called after javac compilation of single file
|
---|
| 28 | pre-dist: called before jar building
|
---|
| 29 | post-dist: called after jar building
|
---|
| 30 | post-clean: called after cleaning build products
|
---|
| 31 |
|
---|
| 32 | Example of pluging an obfuscator after the compilation could look like
|
---|
| 33 |
|
---|
| 34 | <target name="post-compile">
|
---|
| 35 | <obfuscate>
|
---|
| 36 | <fileset dir="${build.classes.dir}"/>
|
---|
| 37 | </obfuscate>
|
---|
| 38 | </target>
|
---|
| 39 |
|
---|
| 40 | For list of available properties check the imported
|
---|
| 41 | nbproject/build-impl.xml file.
|
---|
| 42 |
|
---|
| 43 |
|
---|
| 44 | Other way how to customize the build is by overriding existing main targets.
|
---|
| 45 | The target of interest are:
|
---|
| 46 |
|
---|
| 47 | init-macrodef-javac: defines macro for javac compilation
|
---|
| 48 | init-macrodef-debug: defines macro for class debugging
|
---|
| 49 | do-dist: jar archive building
|
---|
| 50 | run: execution of project
|
---|
| 51 | javadoc-build: javadoc generation
|
---|
| 52 |
|
---|
| 53 | Example of overriding the target for project execution could look like
|
---|
| 54 |
|
---|
| 55 | <target name="run" depends="<PROJNAME>-impl.jar">
|
---|
| 56 | <exec dir="bin" executable="launcher.exe">
|
---|
| 57 | <arg file="${dist.jar}"/>
|
---|
| 58 | </exec>
|
---|
| 59 | </target>
|
---|
| 60 |
|
---|
| 61 | Notice that overridden target depends on jar target and not only on
|
---|
| 62 | compile target as regular run target does. Again, for list of available
|
---|
| 63 | properties which you can use check the target you are overriding in
|
---|
| 64 | nbproject/build-impl.xml file.
|
---|
| 65 |
|
---|
| 66 | -->
|
---|
| 67 | <target name="-check-catd-context">
|
---|
| 68 | <condition property="no.catd.context">
|
---|
| 69 | <not>
|
---|
| 70 | <isset property="org.netbeans.modules.compapp.catd.context"/>
|
---|
| 71 | </not>
|
---|
| 72 | </condition>
|
---|
| 73 | </target>
|
---|
| 74 | <target name="-init-catd" if="no.catd.context">
|
---|
| 75 | <property name="org.netbeans.modules.compapp.catd.context" value=""/>
|
---|
| 76 | </target>
|
---|
| 77 | <target name="pre-init" depends="-check-catd-context,-init-catd"/>
|
---|
| 78 | <target name="deps-javaee-jar" depends="init" unless="${no.dependencies}">
|
---|
| 79 | <ant dir="${project.AdapterMpiEJB}" target="dist" inheritall="false" antfile="${project.AdapterMpiEJB}/build.xml"/>
|
---|
| 80 | <basename property="AdapterMpiEJB.su.name" file="${project.AdapterMpiEJB}"/>
|
---|
| 81 | <property name="AdapterMpiEJB.su.dir" value="${src.dir}/../jbiServiceUnits/${AdapterMpiEJB.su.name}"/>
|
---|
| 82 | <unzip src="${reference.AdapterMpiEJB.dist}" dest="${src.dir}/../jbiServiceUnits/${AdapterMpiEJB.su.name}">
|
---|
| 83 | <patternset>
|
---|
| 84 | <include name="**/*.wsdl"/>
|
---|
| 85 | <include name="**/*.WSDL"/>
|
---|
| 86 | <include name="**/*.xsd"/>
|
---|
| 87 | <include name="**/*.XSD"/>
|
---|
| 88 | <include name="META-INF/jbi.xml"/>
|
---|
| 89 | </patternset>
|
---|
| 90 | </unzip>
|
---|
| 91 | <unzip src="${reference.AdapterMpiEJB.dist}" dest="${src.dir}/../jbiServiceUnits/META-INF/AdapterMpiEJB">
|
---|
| 92 | <patternset>
|
---|
| 93 | <include name="META-INF/catalog.xml"/>
|
---|
| 94 | </patternset>
|
---|
| 95 | </unzip>
|
---|
| 96 | <jbi-javaee-dist projectName="AdapterMpiEJB" subprojJar="${reference.AdapterMpiEJB.dist}" subprojDir="${project.AdapterMpiEJB}" suExtractDir="${AdapterMpiEJB.su.dir}" subprojResource="${resource.AdapterMpiEJB}"/>
|
---|
| 97 | </target>
|
---|
| 98 | <target name="deps-clean" depends="init" unless="${no.dependencies}">
|
---|
| 99 | <ant dir="${project.AdapterMpiEJB}" target="clean" inheritall="false" antfile="${project.AdapterMpiEJB}/build.xml"/>
|
---|
| 100 | </target>
|
---|
| 101 | </project>
|
---|