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 |
|
---|
79 | <target name="deps-javaee-jar" depends="init" unless="${no.dependencies}">
|
---|
80 | <ant dir="${project.DocumentRepositoryEJB}" target="dist" inheritall="false" antfile="${project.DocumentRepositoryEJB}/build.xml"/>
|
---|
81 | <basename property="DocumentRepositoryEJB.su.name" file="${project.DocumentRepositoryEJB}"/>
|
---|
82 | <property name="DocumentRepositoryEJB.su.dir" value="${src.dir}/../jbiServiceUnits/${DocumentRepositoryEJB.su.name}"/>
|
---|
83 | <unzip src="${reference.DocumentRepositoryEJB.dist}" dest="${src.dir}/../jbiServiceUnits/${DocumentRepositoryEJB.su.name}">
|
---|
84 | <patternset>
|
---|
85 | <include name="**/*.wsdl"/>
|
---|
86 | <include name="**/*.WSDL"/>
|
---|
87 | <include name="**/*.xsd"/>
|
---|
88 | <include name="**/*.XSD"/>
|
---|
89 | <include name="META-INF/jbi.xml"/>
|
---|
90 | </patternset>
|
---|
91 | </unzip>
|
---|
92 | <unzip src="${reference.DocumentRepositoryEJB.dist}" dest="${src.dir}/../jbiServiceUnits/META-INF/DocumentRepositoryEJB">
|
---|
93 | <patternset>
|
---|
94 | <include name="META-INF/catalog.xml"/>
|
---|
95 | </patternset>
|
---|
96 | </unzip>
|
---|
97 | <jbi-javaee-dist projectName="DocumentRepositoryEJB" subprojJar="${reference.DocumentRepositoryEJB.dist}" subprojDir="${project.DocumentRepositoryEJB}" suExtractDir="${DocumentRepositoryEJB.su.dir}" subprojResource="${resource.DocumentRepositoryEJB}"/>
|
---|
98 | </target>
|
---|
99 |
|
---|
100 | <target name="deps-jar" depends="init" unless="${no.dependencies}">
|
---|
101 | <ant dir="${project.AdapterBPEL}" target="dist_se" inheritall="false" antfile="${project.AdapterBPEL}/build.xml"/>
|
---|
102 | <property name="AdapterBPEL.su.name" value="AdapterBPEL"/>
|
---|
103 | <unzip src="${reference.AdapterBPEL.dist_se}" dest="${src.dir}/../jbiServiceUnits/${AdapterBPEL.su.name}">
|
---|
104 | <patternset>
|
---|
105 | <include name="**/*.wsdl"/>
|
---|
106 | <include name="**/*.WSDL"/>
|
---|
107 | <include name="**/*.xsd"/>
|
---|
108 | <include name="**/*.XSD"/>
|
---|
109 | <include name="META-INF/jbi.xml"/>
|
---|
110 | <include name="META-INF/catalog.xml"/>
|
---|
111 | </patternset>
|
---|
112 | </unzip>
|
---|
113 |
|
---|
114 | <property name="AdapterBPEL.su.dir" value="${src.dir}/../jbiServiceUnits/${AdapterBPEL.su.name}"/>
|
---|
115 | <copy file="${AdapterBPEL.su.dir}/META-INF/jbi.xml" todir="${AdapterBPEL.su.dir}"/>
|
---|
116 | <copy todir="${src.dir}/../jbiServiceUnits/META-INF/${AdapterBPEL.su.name}">
|
---|
117 | <fileset dir="${AdapterBPEL.su.dir}/META-INF"/>
|
---|
118 | </copy>
|
---|
119 |
|
---|
120 | <property name="project.AdapterSubjectDiscoveryBPEL.Absolute" location="${project.AdapterSubjectDiscoveryBPEL}"/>
|
---|
121 | <ant dir="${project.AdapterSubjectDiscoveryBPEL.Absolute}" target="dist_se" inheritall="false" antfile="${project.AdapterSubjectDiscoveryBPEL.Absolute}/build.xml"/>
|
---|
122 | <property name="AdapterSubjectDiscoveryBPEL.su.name" value="AdapterSubjectDiscoveryBPEL"/>
|
---|
123 | <unzip src="${reference.AdapterSubjectDiscoveryBPEL.dist_se}" dest="${src.dir}/../jbiServiceUnits/${AdapterSubjectDiscoveryBPEL.su.name}">
|
---|
124 | <patternset>
|
---|
125 | <include name="**/*.wsdl"/>
|
---|
126 | <include name="**/*.WSDL"/>
|
---|
127 | <include name="**/*.xsd"/>
|
---|
128 | <include name="**/*.XSD"/>
|
---|
129 | <include name="META-INF/jbi.xml"/>
|
---|
130 | <include name="META-INF/catalog.xml"/>
|
---|
131 | </patternset>
|
---|
132 | </unzip>
|
---|
133 | <property name="AdapterSubjectDiscoveryBPEL.su.dir" value="${src.dir}/../jbiServiceUnits/${AdapterSubjectDiscoveryBPEL.su.name}"/>
|
---|
134 | <copy file="${AdapterSubjectDiscoveryBPEL.su.dir}/META-INF/jbi.xml" todir="${AdapterSubjectDiscoveryBPEL.su.dir}"/>
|
---|
135 | <copy todir="${src.dir}/../jbiServiceUnits/META-INF/${AdapterSubjectDiscoveryBPEL.su.name}">
|
---|
136 | <fileset dir="${AdapterSubjectDiscoveryBPEL.su.dir}/META-INF"/>
|
---|
137 | </copy>
|
---|
138 |
|
---|
139 | <property name="project.AdapterPolicyEngineBPEL.Absolute" location="${project.AdapterPolicyEngineBPEL}"/>
|
---|
140 | <ant dir="${project.AdapterPolicyEngineBPEL.Absolute}" target="dist_se" inheritall="false" antfile="${project.AdapterPolicyEngineBPEL.Absolute}/build.xml"/>
|
---|
141 | <property name="AdapterPolicyEngineBPEL.su.name" value="AdapterPolicyEngineBPEL"/>
|
---|
142 | <unzip src="${reference.AdapterPolicyEngineBPEL.dist_se}" dest="${src.dir}/../jbiServiceUnits/${AdapterPolicyEngineBPEL.su.name}">
|
---|
143 | <patternset>
|
---|
144 | <include name="**/*.wsdl"/>
|
---|
145 | <include name="**/*.WSDL"/>
|
---|
146 | <include name="**/*.xsd"/>
|
---|
147 | <include name="**/*.XSD"/>
|
---|
148 | <include name="META-INF/jbi.xml"/>
|
---|
149 | <include name="META-INF/catalog.xml"/>
|
---|
150 | </patternset>
|
---|
151 | </unzip>
|
---|
152 | <property name="AdapterPolicyEngineBPEL.su.dir" value="${src.dir}/../jbiServiceUnits/${AdapterPolicyEngineBPEL.su.name}"/>
|
---|
153 | <copy file="${AdapterPolicyEngineBPEL.su.dir}/META-INF/jbi.xml" todir="${AdapterPolicyEngineBPEL.su.dir}"/>
|
---|
154 | <copy todir="${src.dir}/../jbiServiceUnits/META-INF/${AdapterPolicyEngineBPEL.su.name}">
|
---|
155 | <fileset dir="${AdapterPolicyEngineBPEL.su.dir}/META-INF"/>
|
---|
156 | </copy>
|
---|
157 |
|
---|
158 | </target>
|
---|
159 |
|
---|
160 | <target name="jbi-build" depends="init,init-deploy,deps-jar, deps-javaee-jar" description="Build Service Assembly.">
|
---|
161 | <mkdir dir="${src.dir}"/>
|
---|
162 | <copy todir="${src.dir}/../jbiServiceUnits" overwrite="true">
|
---|
163 | <fileset dir="${src.dir}"/>
|
---|
164 | </copy>
|
---|
165 | <mkdir dir="${build.dir}/META-INF"/>
|
---|
166 |
|
---|
167 | <copy todir="${build.dir}/META-INF/${AdapterBPEL.su.name}">
|
---|
168 | <fileset dir="${src.dir}/../jbiServiceUnits/META-INF/${AdapterBPEL.su.name}"/>
|
---|
169 | </copy>
|
---|
170 | <copy todir="${build.dir}/META-INF/${AdapterPolicyEngineBPEL.su.name}">
|
---|
171 | <fileset dir="${src.dir}/../jbiServiceUnits/META-INF/${AdapterPolicyEngineBPEL.su.name}"/>
|
---|
172 | </copy>
|
---|
173 | <copy todir="${build.dir}/META-INF/${AdapterSubjectDiscoveryBPEL.su.name}">
|
---|
174 | <fileset dir="${src.dir}/../jbiServiceUnits/META-INF/${AdapterSubjectDiscoveryBPEL.su.name}"/>
|
---|
175 | </copy>
|
---|
176 |
|
---|
177 | <jar compress="true" jarfile="${build.dir}/BCDeployment.jar">
|
---|
178 | <fileset dir="${src.dir}/../jbiServiceUnits">
|
---|
179 | <exclude name="**/catalog.xml"/>
|
---|
180 | <exclude name="**/jbi.xml"/>
|
---|
181 | </fileset>
|
---|
182 | </jar>
|
---|
183 | <jbi-build-service-assembly/>
|
---|
184 | <delete file="${build.dir}/BCDeployment.jar"/>
|
---|
185 | <dirname property="dist.jar.dir" file="${dist.jar}"/>
|
---|
186 | <mkdir dir="${dist.jar.dir}"/>
|
---|
187 | <jar compress="${jar.compress}" jarfile="${dist.jar}" filesetmanifest="merge">
|
---|
188 | <fileset dir="${build.dir}" excludes="jar/*"/>
|
---|
189 | </jar>
|
---|
190 | </target>
|
---|
191 |
|
---|
192 | <target name="deps-clean" depends="init" unless="${no.dependencies}">
|
---|
193 | <property name="project.AdapterSubjectDiscoveryBPEL.Absolute" location="${project.AdapterSubjectDiscoveryBPEL}"/>
|
---|
194 | <property name="project.AdapterPolicyEngineBPEL.Absolute" location="${project.AdapterPolicyEngineBPEL}"/>
|
---|
195 |
|
---|
196 | <ant dir="${project.AdapterBPEL}" target="clean" inheritall="false" antfile="${project.AdapterBPEL}/build.xml"/>
|
---|
197 | <ant dir="${project.DocumentRepositoryEJB}" target="clean" inheritall="false" antfile="${project.DocumentRepositoryEJB}/build.xml"/>
|
---|
198 | <ant dir="${project.AdapterPolicyEngineBPEL.Absolute}" target="clean" inheritall="false" antfile="${project.AdapterPolicyEngineBPEL.Absolute}/build.xml"/>
|
---|
199 | <ant dir="${project.AdapterSubjectDiscoveryBPEL.Absolute}" target="clean" inheritall="false" antfile="${project.AdapterSubjectDiscoveryBPEL.Absolute}/build.xml"/>
|
---|
200 |
|
---|
201 |
|
---|
202 | </target>
|
---|
203 |
|
---|
204 |
|
---|
205 | </project>
|
---|
206 |
|
---|
207 |
|
---|
208 |
|
---|
209 |
|
---|
210 |
|
---|
211 |
|
---|
212 |
|
---|