[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 | <!--
|
---|
| 9 | There exist several targets which are by default empty and which can be
|
---|
| 10 | used for execution of your tasks. These targets are usually executed
|
---|
| 11 | before and after some main targets. They are:
|
---|
| 12 |
|
---|
| 13 | -pre-init called before initialization of project properties
|
---|
| 14 | -post-init called after initialization of project properties
|
---|
| 15 | -pre-compile called before javac compilation
|
---|
| 16 | -post-compile called after javac compilation
|
---|
| 17 | -pre-compile-single called before javac compilation of single file
|
---|
| 18 | -post-compile-single called after javac compilation of single file
|
---|
| 19 | -pre-dist called before jar building
|
---|
| 20 | -post-dist called after jar building
|
---|
| 21 | -post-clean called after cleaning build products
|
---|
| 22 |
|
---|
| 23 | Example of pluging an obfuscator after the compilation could look like
|
---|
| 24 |
|
---|
| 25 | <target name="post-compile">
|
---|
| 26 | <obfuscate>
|
---|
| 27 | <fileset dir="${build.classes.dir}"/>
|
---|
| 28 | </obfuscate>
|
---|
| 29 | </target>
|
---|
| 30 |
|
---|
| 31 | For list of available properties check the imported
|
---|
| 32 | nbproject/build-impl.xml file.
|
---|
| 33 |
|
---|
| 34 | Other way how to customize the build is by overriding existing main targets.
|
---|
| 35 | The target of interest are:
|
---|
| 36 |
|
---|
| 37 | init-macrodef-javac defines macro for javac compilation
|
---|
| 38 | init-macrodef-debug defines macro for class debugging
|
---|
| 39 | do-dist jar archive building
|
---|
| 40 | run execution of project
|
---|
| 41 | javadoc-build javadoc generation
|
---|
| 42 |
|
---|
| 43 | Example of overriding the target for project execution could look like
|
---|
| 44 |
|
---|
| 45 | <target name="run" depends="<PROJNAME>-impl.jar">
|
---|
| 46 | <exec dir="bin" executable="launcher.exe">
|
---|
| 47 | <arg file="${dist.jar}"/>
|
---|
| 48 | </exec>
|
---|
| 49 | </target>
|
---|
| 50 |
|
---|
| 51 | Notice that overridden target depends on jar target and not only on
|
---|
| 52 | compile target as regular run target does. Again, for list of available
|
---|
| 53 | properties which you can use check the target you are overriding in
|
---|
| 54 | nbproject/build-impl.xml file.
|
---|
| 55 | -->
|
---|
| 56 |
|
---|
| 57 | <target name="-do-dist" depends="init,-pre-dist">
|
---|
| 58 | <mkdir dir="${build.dir}"/>
|
---|
| 59 | <!--validation-->
|
---|
| 60 | <antcall target="validateBPEL"/>
|
---|
| 61 | <!-- copy all files from project source directory to build directory. -->
|
---|
| 62 | <copy todir="${build.dir}" preservelastmodified="true">
|
---|
| 63 | <fileset includes="**/*.bpel,**/*.wsdl,**/*.xsd, **/*.xsl, **/*.xslt, **/*.jar" dir="${src.dir}"/>
|
---|
| 64 | </copy>
|
---|
| 65 | <!-- Override to copy schemas that are being missed by NetBeans. -->
|
---|
| 66 | <copy todir="${build.dir}/META-INF/src/_references/_projects/Interfaces/src/schemas/HL7V3/" preservelastmodified="true">
|
---|
| 67 | <fileset dir="${project.Interfaces}/src/schemas/HL7V3/" excludes="**/NE2008/**"/>
|
---|
| 68 | </copy>
|
---|
| 69 | <generate-catalog-xml buildDirectory="${basedir}/${build.dir}" sourceDirectory="${basedir}/${src.dir}" projectClassPath="${javac.classpath}" classpathRef="ant.task.classpath"/>
|
---|
| 70 | <generate-jbi-xml buildDirectory="${basedir}/${build.dir}" sourceDirectory="${basedir}/${src.dir}" projectClassPath="${javac.classpath}" classpathRef="ant.task.classpath"/>
|
---|
| 71 | <jar compress="${jar.compress}" jarfile="${build.dir}/SEDeployment.jar">
|
---|
| 72 | <fileset includes="**/*.bpel,**/*.wsdl,**/*.xsd, **/*.xsl, **/*.xslt, **/*.jar" excludes="SEDeployment.jar" dir="${basedir}/${build.dir}"/>
|
---|
| 73 | <fileset dir="${basedir}/${build.dir}">
|
---|
| 74 | <include name="**/jbi.xml"/>
|
---|
| 75 | <include name="**/catalog.xml"/>
|
---|
| 76 | </fileset>
|
---|
| 77 | </jar>
|
---|
| 78 | </target>
|
---|
| 79 | <target name="validateBPEL" if="Validate.BPEL">
|
---|
| 80 | <validate-project buildDirectory="${basedir}/${build.dir}" sourceDirectory="${basedir}/${src.dir}" projectClassPath="${javac.classpath}" buildDependentProjectDir="${basedir}/${build.dir}/dependentProjectFiles" classpathRef="ant.task.classpath" allowBuildWithError="${allow.build.with.error}"/>
|
---|
| 81 | </target>
|
---|
| 82 | </project>
|
---|