-
Notifications
You must be signed in to change notification settings - Fork 263
/
build-eap-utils.xml
105 lines (88 loc) · 4.07 KB
/
build-eap-utils.xml
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
<!--
INPUT parameters:
-->
<project name="build-eap-utils" xmlns:ac="net.sf.antcontrib" basedir="../">
<!-- Gets aall EAP configuration properties.
Input parameters:
- eap-config-file
- eap-configuration-property-result
Output properties for <code>eap-configuration-property-result</code> element:
- patch-cdi-extensions
- patch-webfragments
- modules-list-file
-->
<macrodef name="eap-configuration-properties">
<attribute name="eap-config-file" default=""/>
<element name="eap-configuration-property-result" optional="yes"/>
<sequential>
<!-- Read eap configuration file. -->
<fail message="EAP configuration file not found at path @{eap-config-file}.">
<condition>
<not>
<available file="@{eap-config-file}"/>
</not>
</condition>
</fail>
<!-- Read eap configuration properties. -->
<property file="@{eap-config-file}"/>
<eap-configuration-property-result-helper patch-cdi-extensions="${patches.cdi-extensions}" patch-webfragments="${patches.webfragments}" modules-list-file="${modules.list}">
<eap-configuration-property-result-helper-element>
<eap-configuration-property-result/>
</eap-configuration-property-result-helper-element>
</eap-configuration-property-result-helper>
</sequential>
</macrodef>
<!-- Used to pass patch flags value.
Input parameters:
- patch-cdi-extensions
- patch-webfragments
- modules-list-file
- eap-configuration-property-result-helper-element
-->
<macrodef name="eap-configuration-property-result-helper">
<attribute name="patch-cdi-extensions" default=""/>
<attribute name="patch-webfragments" default=""/>
<attribute name="modules-list-file" default=""/>
<element name="eap-configuration-property-result-helper-element" optional="yes"/>
<sequential>
<eap-configuration-property-result-helper-element/>
</sequential>
</macrodef>
<!-- Used to deploy static modules distribution file (zip) and some skinny wars.
Input parameters:
- eap-home -> The path to JBoss EAP home directory-
- static-modules-ditro-file -> The zip containing all static modules distribution.
- bpms-artifact -> The path for the BPMS (kie-wb) generated skinny war.
- brms-artifact -> The path for the BRMS (kie-drools-wb) generated skinny war.
- jbpm-dash-artifact -> The path for the jBPM Dashboard generated skinny war.
-->
<target name="deploy-on-eap">
<property name="jboss.home" value="${eap-home}"/>
<property name="jboss.deployments" value="${jboss.home}${file.separator}standalone${file.separator}deployments"/>
<echo level="info">Starting deployment into ${jboss.home}</echo>
<!-- Copy static modules file.-->
<unzip dest="${jboss.home}" src="${static-modules-ditro-file}" overwrite="true"/>
<!-- Copy the BPMS artifact, if specified, into EAP deployments directory. -->
<ac:if>
<available file="${bpms-artifact}"/>
<ac:then>
<copy file="${bpms-artifact}" todir="${jboss.deployments}"/>
</ac:then>
</ac:if>
<!-- Copy the BRMS artifact, if specified, into EAP deployments directory. -->
<ac:if>
<available file="${brms-artifact}"/>
<ac:then>
<copy file="${brms-artifact}" todir="${jboss.deployments}"/>
</ac:then>
</ac:if>
<!-- Copy the jBPM Dashboard artifact, if specified, into EAP deployments directory. -->
<ac:if>
<available file="${jbpm-dash-artifact}"/>
<ac:then>
<copy file="${jbpm-dash-artifact}" todir="${jboss.deployments}"/>
</ac:then>
</ac:if>
<echo level="info">Deployment into ${jboss.home} finished.</echo>
</target>
</project>