Repository navigation
Expand file tree
/
Copy pathmaven.xml
More file actions
224 lines (187 loc) · 10.2 KB
/
Copy pathmaven.xml
File metadata and controls
224 lines (187 loc) · 10.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
<?xml version="1.0" encoding="UTF-8"?>
<!-- $Revision: 1.21 $ $Date: 2004-10-27 20:54:09 +0600 (Wed, 27 Oct 2004) $ -->
<project default="jar"
xmlns:j="jelly:core"
xmlns:u="jelly:util"
xmlns:maven="jelly:maven"
xmlns:deploy="deploy"
xmlns:ant="jelly:ant">
<preGoal name="itest:compile">
<u:file var="file" name="${maven.itest.src}"/>
<j:if test="${!file.exists()}">
<j:expr value="${context.setVariable('maven.itest.skip', 'true')}"/>
</j:if>
</preGoal>
<postGoal name="test:compile">
<!-- Temp dir to hold the contents of the mar -->
<mkdir dir="target/temp-mar/META-INF"/>
<mkdir dir="target/temp-mar/lib"/>
<mkdir dir="target/modules"/>
<!-- Copy the required content for the mar into the temp dir-->
<copy todir="target/temp-mar">
<fileset dir="target/classes">
<include name="**/org/apache/*/**/*.class"/>
<exclude name="**/org/apache/axis2/security/InteropScenarioClient.class"/>
</fileset>
</copy>
<!--include the license for jars-->
<ant:copy toDir="target/temp-mar/lib">
<ant:fileset dir="../../legal/rampart">
<ant:include name="*.txt"/>
</ant:fileset>
</ant:copy>
<copy file="../../LICENSE.txt"
tofile="target/temp-mar/META-INF/LICENSE.txt" overwrite="true"/>
<j:if test="${context.getVariable('maven.jar.override').toString().trim().equalsIgnoreCase('on')}">
<copy file="${dependencies.dir}/xmlsec-${xmlsec.version}.jar" todir="target/temp-mar/lib"/>
<copy file="${dependencies.dir}/bcprov-${bcprov.version}.jar" todir="target/temp-mar/lib"/>
<copy file="${dependencies.dir}/opensaml-${opensaml.version}.jar" todir="target/temp-mar/lib"/>
<copy file="${dependencies.dir}/wss4j-${wss4j.version}.jar" todir="target/temp-mar/lib"/>
<copy file="${dependencies.dir}/jaxen-${jaxen.version}.jar" todir="target/temp-mar/lib"/>
<copy file="${dependencies.dir}/xml-apis-${xml_apis.version}.jar" todir="target/temp-mar/lib"/>
<copy file="${dependencies.dir}/xercesImpl-${xerces.version}.jar" todir="target/temp-mar/lib"/>
<copy file="${dependencies.dir}/commons-codec-${commons.codec.version}.jar" todir="target/temp-mar/lib"/>
<copy file="${dependencies.dir}/axis2-rahas-${pom.currentVersion}.jar" todir="target/temp-mar/lib"/>
<copy file="${dependencies.dir}/axis2-secpolicy-${pom.currentVersion}.jar" todir="target/temp-mar/lib"/>
</j:if>
<j:if test="${context.getVariable('maven.jar.override').toString().trim().equalsIgnoreCase('off')}">
<copy file="${maven.repo.local}/xml-security/jars/xmlsec-${xmlsec.version}.jar" todir="target/temp-mar/lib"/>
<copy file="${maven.repo.local}/bouncycastle/jars/bcprov-${bcprov.version}.jar" todir="target/temp-mar/lib"/>
<copy file="${maven.repo.local}/opensaml/jars/opensaml-${opensaml.version}.jar" todir="target/temp-mar/lib"/>
<copy file="${maven.repo.local}/wss4j/jars/wss4j-${wss4j.version}.jar" todir="target/temp-mar/lib"/>
<copy file="${maven.repo.local}/jaxen/jars/jaxen-${jaxen.version}.jar" todir="target/temp-mar/lib"/>
<copy file="${maven.repo.local}/xml-apis/jars/xml-apis-${xml_apis.version}.jar" todir="target/temp-mar/lib"/>
<copy file="${maven.repo.local}/xerces/jars/xercesImpl-${xerces.version}.jar" todir="target/temp-mar/lib"/>
<copy file="${maven.repo.local}/commons-codec/jars/commons-codec-${commons.codec.version}.jar" todir="target/temp-mar/lib"/>
<copy file="${maven.repo.local}/org.apache.axis2/jars/axis2-rahas-${pom.currentVersion}.jar" todir="target/temp-mar/lib"/>
<copy file="${maven.repo.local}/org.apache.axis2/jars/axis2-secpolicy-${pom.currentVersion}.jar" todir="target/temp-mar/lib"/>
</j:if>
<copy file="src/META-INF/module.xml"
tofile="target/temp-mar/META-INF/module.xml" overwrite="true"/>
<copy file="src/META-INF/services/org.apache.neethi.builders.AssertionBuilder"
tofile="target/temp-mar/META-INF/services/org.apache.neethi.builders.AssertionBuilder" overwrite="true" />
<jar jarfile="target/rampart-${rampart_module_version}.mar" basedir="target/temp-mar/">
<include name="**/*"/>
</jar>
<copy file="target/rampart-${rampart_module_version}.mar" tofile="target/modules/rampart-${rampart_module_version}.mar"/>
<copy file="target/rampart-${rampart_module_version}.mar" tofile="${maven.repo.local}/org.apache.axis2/mars/rampart-${rampart_module_version}.mar"/>
<delete includeEmptyDirs="true">
<fileset dir="target/temp-mar"/>
</delete>
</postGoal>
<preGoal name="java:compile">
<j:if test="${context.getVariable('maven.test.skip') != 'true'}">
<j:set var="interop.dir" value="target/interop"/>
<j:set var="work.dir" value="${interop.dir}/work"/>
<j:set var="class.dir" value="${interop.dir}/classes"/>
<mkdir dir="${interop.dir}"/>
<mkdir dir="${work.dir}"/>
<mkdir dir="${class.dir}"/>
<!-- Run WSDL2Java -->
<java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true">
<classpath refid="maven.dependency.classpath"/>
<arg value="-uri"/>
<arg file="interop/ping.wsdl"/>
<arg value="-ss"/>
<arg value="-o"/>
<arg file="${work.dir}"/>
<arg value="-p"/>
<arg value="org.apache.axis2.oasis.ping"/>
<arg value="-d"/>
<arg value="xmlbeans"/>
<arg value="-g"/>
</java>
<!-- move/copy schema stuff into class.dir -->
<ant:move todir="${class.dir}">
<ant:fileset dir="${work.dir}/resources">
<ant:include name="**/schema*/**/*.xsb"/>
<ant:include name="**/schema*/**/*.class"/>
</ant:fileset>
</ant:move>
<!-- copy the service impl -->
<copy file="interop/org/apache/axis2/oasis/ping/PingPortSkeleton.java"
tofile="${work.dir}/src/org/apache/axis2/oasis/ping/PingPortSkeleton.java" overwrite="yes"/>
<!-- Password callback class for the interop service -->
<copy file="test-resources/PWCallback.java"
tofile="${work.dir}/src/org/apache/axis2/security/PWCallback.java" overwrite="yes"/>
<!-- Interop client -->
<copy file="interop/org/apache/axis2/security/InteropScenarioClient.java"
tofile="${work.dir}/src/org/apache/axis2/security/InteropScenarioClient.java" overwrite="yes"/>
<copy toDir="target/classes/META-INF/">
<fileset dir="src/META-INF">
<include name="**/services/*"/>
</fileset>
</copy>
<ant:path id="classes.dir" location="${class.dir}"/>
<maven:addPath id="maven.dependency.classpath" refid="classes.dir"/>
<ant:path id="src.dir" location="${work.dir}/src"/>
<maven:addPath id="maven.compile.src.set" refid="src.dir"/>
</j:if>
</preGoal>
<!--Create the service.aar" -->
<postGoal name="java:compile">
<j:if test="${context.getVariable('maven.test.skip') != 'true'}">
<!-- move/copy interop classes into class.dir -->
<ant:move todir="${class.dir}">
<ant:fileset dir="${basedir}/target/classes">
<ant:include name="**/ping/**/*.class"/>
<ant:include name="**/oasisOpen/**/*.class"/>
<ant:include name="**/xmlmime/**/*.class"/>
<ant:include name="**/PWCallback.class"/>
<ant:include name="**/InteropScenarioClient.class"/>
</ant:fileset>
</ant:move>
<delete includeEmptyDirs="true">
<fileset dir="${basedir}/target/classes/org/apache/axis2/oasis/"/>
<!--<fileset dir="${basedir}/target/classes/org/xmlsoap/"/>-->
<!--<fileset dir="${basedir}/target/classes/org/oasisOpen/"/>-->
</delete>
<j:set var="interop.dir" value="target/interop"/>
<j:set var="work.dir" value="${interop.dir}/work"/>
<j:set var="class.dir" value="${interop.dir}/classes"/>
<!-- Create the META-INF directory -->
<mkdir dir="${class.dir}/META-INF"/>
<!-- copy the services.xml-->
<copy file="interop/services.xml"
tofile="${class.dir}/META-INF/services.xml" overwrite="yes"/>
<!-- copy axis2.crypto.properties -->
<copy file="interop/axis2.crypto.properties"
tofile="${class.dir}/axis2.crypto.properties" overwrite="yes"/>
<!-- copy axis2.saml.properties -->
<copy file="interop/axis2.saml.properties"
tofile="${class.dir}/axis2.saml.properties" overwrite="yes"/>
<!-- copy axis2.saml3.properties -->
<copy file="interop/axis2.saml3.properties"
tofile="${class.dir}/axis2.saml3.properties" overwrite="yes"/>
<!-- copy axis2.saml4.properties -->
<copy file="interop/axis2.saml4.properties"
tofile="${class.dir}/axis2.saml4.properties" overwrite="yes"/>
<!-- copy x509.PFX.MSFT -->
<copy file="interop/x509.PFX.MSFT"
tofile="${class.dir}/x509.PFX.MSFT" overwrite="yes"/>
<!-- Copy interop.properties-->
<copy file="interop/interop.properties"
tofile="${class.dir}/interop.properties" overwrite="yes"/>
<!-- Copy interop.jks -->
<copy file="interop/interop2.jks"
tofile="${class.dir}/interop2.jks" overwrite="yes"/>
<jar jarfile="target/PingPort.aar" basedir="target/interop/classes">
<include name="**/*"/>
</jar>
</j:if>
</postGoal>
<preGoal name="jar:jar">
<mkdir dir="target/classes/META-INF/services"/>
<copy toDir="target/classes/META-INF/services" overwrite="yes">
<fileset dir="src/META-INF/services" />
</copy>
<j:if test="${context.getVariable('maven.test.skip') != 'true'}">
<delete includeEmptyDirs="true">
<fileset dir="target/classes/org/xmlsoap/"/>
<fileset dir="target/classes/org/oasis_open/"/>
<fileset dir="target/classes/org/w3/"/>
<fileset file="target/classes/org/apache/axis2/security/InteropScenarioClient.class"/>
</delete>
</j:if>
</preGoal>
</project>