Skip to content

Commit 4c1a69a

Browse files
committed
client: Fix maven to replace nonoss spring ctx xml for nonoss build
Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
1 parent 2fb346a commit 4c1a69a

1 file changed

Lines changed: 39 additions & 17 deletions

File tree

client/pom.xml

Lines changed: 39 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@
203203
<artifactId>maven-war-plugin</artifactId>
204204
<version>2.3</version>
205205
<configuration>
206-
<webXml>./WEB-INF/web.xml</webXml>
206+
<webXml>./target/generated-webapp/WEB-INF/web.xml</webXml>
207207
<warSourceDirectory>./target/generated-webapp</warSourceDirectory>
208208
</configuration>
209209
</plugin>
@@ -245,6 +245,12 @@
245245
</goals>
246246
<configuration>
247247
<target>
248+
<copy
249+
todir="${basedir}/target/generated-webapp/WEB-INF/">
250+
<fileset dir="${basedir}/WEB-INF/">
251+
<include name="web.xml" />
252+
</fileset>
253+
</copy>
248254
<copy
249255
todir="${basedir}/target/generated-webapp/WEB-INF/classes">
250256
<fileset dir="${basedir}/WEB-INF/classes">
@@ -325,22 +331,38 @@
325331
</target>
326332
</configuration>
327333
</execution>
328-
<execution>
329-
<id>process-nonoss</id>
330-
<phase>process-resources</phase>
331-
<goals>
332-
<goal>run</goal>
333-
</goals>
334-
<configuration>
335-
<target if="${nonoss}">
336-
<echo>test</echo>
337-
<replaceregexp
338-
file="${basedir}/target/generated-webapp/WEB-INF/classes/environment.properties"
339-
match="cloud-stack-components-specification=.*"
340-
replace="cloud-stack-components-specification=components-nonoss.xml" byline="true" />
341-
</target>
342-
</configuration>
343-
</execution>
334+
<execution>
335+
<id>process-nonoss</id>
336+
<phase>process-resources</phase>
337+
<goals>
338+
<goal>run</goal>
339+
</goals>
340+
<configuration>
341+
<target if="${nonoss}">
342+
<echo>test</echo>
343+
<replaceregexp
344+
file="${basedir}/target/generated-webapp/WEB-INF/classes/environment.properties"
345+
match="cloud-stack-components-specification=.*"
346+
replace="cloud-stack-components-specification=components-nonoss.xml" byline="true" />
347+
</target>
348+
</configuration>
349+
</execution>
350+
<execution>
351+
<id>process-nonoss-spring-context</id>
352+
<phase>process-resources</phase>
353+
<goals>
354+
<goal>run</goal>
355+
</goals>
356+
<configuration>
357+
<target if="${nonoss}">
358+
<echo>test</echo>
359+
<replaceregexp
360+
file="${basedir}/target/generated-webapp/WEB-INF/web.xml"
361+
match="classpath:applicationContext.xml, classpath:componentContext.xml"
362+
replace="classpath:applicationContext.xml, classpath:nonossComponentContext.xml" byline="true" />
363+
</target>
364+
</configuration>
365+
</execution>
344366
</executions>
345367
</plugin>
346368
<!-- there are the jasypt libs requires by some of the python scripts -->

0 commit comments

Comments
 (0)