-
Notifications
You must be signed in to change notification settings - Fork 1
/
propertyDefaults.xml
272 lines (249 loc) · 15.4 KB
/
propertyDefaults.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
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
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
<?xml version="1.0" encoding="UTF-8"?>
<project name="propertyDefaults">
<description>
This file sets the property defaults. Included from other files.
</description>
<!--
Merge custom modifications from customejbca.home to
ejbca.home before reading the other configuration files.
-->
<property file="${ejbca.home}/conf/custom.properties" />
<property name="customejbca.home" location="${ejbca.home}/../ejbca-custom" />
<available file="${customejbca.home}" type="dir" property="customejbca.present" />
<condition property="customejbca.message" else="No custom changes to merge."
value="Merging available external modifications from ${customejbca.home} (unless done previously).">
<isset property="customejbca.present" />
</condition>
<condition property="customejbca.extensions" value="*" else="none-at-all">
<isset property="customejbca.present" />
</condition>
<condition property="customejbca.dir" value="${customejbca.home}" else="${ejbca.home}/conf"> <!-- This is just any dir that we know exists to avoid error messages.. -->
<isset property="customejbca.present" />
</condition>
<ant antfile="${ejbca.home}/echo.xml" target="customejbca.message"/>
<copy todir="${ejbca.home}" overwrite="true" failonerror="false">
<fileset dir="${customejbca.dir}">
<include name="**/*.${customejbca.extensions}" unless="runoncesetup.hasrun"/>
<exclude name="**/*" if="runoncesetup.hasrun"/>
</fileset>
</copy>
<!-- this property ensures that the copy operation is only made once -->
<property name="runoncesetup.hasrun" value="true"/>
<!--
Prepare for possible EJBCA plugins that should built and merged into the EAR
file.
-->
<property name="ejbca.plugin.gen.path" location="${tmp}/plugin-gen"/>
<property name="ejbca.plugin.tmp.path" location="${tmp}/plugin-tmp"/>
<property name="ejbca.plugin.conf.path" location="${ejbca.home}/conf/plugins"/>
<pathconvert property="ejbca.plugin.collection" setonempty="false">
<path>
<fileset dir="${ejbca.plugin.conf.path}" includes="*.properties" />
</path>
</pathconvert>
<!-- Load property files -->
<property file="${ejbca.home}/conf/ejbca.properties" />
<property file="${ejbca.home}/conf/install.properties"/>
<property file="${ejbca.home}/conf/protection.properties" />
<property file="${ejbca.home}/conf/database.properties" />
<property file="${ejbca.home}/conf/mail.properties" />
<property file="${ejbca.home}/conf/ocsp.properties" />
<property file="${ejbca.home}/conf/web.properties" />
<property file="${ejbca.home}/conf/cmptcp.properties" />
<property file="${ejbca.home}/conf/jaxws.properties" />
<property file="${ejbca.home}/conf/xkms.properties" />
<property file="${ejbca.home}/conf/externalra.properties" />
<property file="${ejbca.home}/conf/scepra.properties" />
<property file="${ejbca.home}/conf/externalra-gui.properties" />
<property file="${ejbca.home}/conf/certstore.properties" />
<property file="${ejbca.home}/conf/crlstore.properties" />
<property file="${ejbca.home}/conf/va.properties" />
<property file="${ejbca.home}/conf/va-publisher.properties" />
<!-- httpsserver.hostname must be set cause it's used in preprocess. It will only be set here if not set in any property file -->
<property name="httpsserver.hostname" value="localhost"/>
<!-- A little special something to handle backward compatibility with
people using JBOSS_HOME. They can switch to APPSRV_HOME now, and both will work.
-->
<condition property="jboss.home" value="${env.JBOSS_HOME}" >
<equals arg1="${appserver.home}" arg2="${appserver.home}"/>
</condition>
<condition property="appserver.home" value="${env.APPSRV_HOME}" else="${jboss.home}">
<contains string="${jboss.home}" substring="JBOSS_HOME"/>
</condition>
<!-- Auto-detect supported application server type -->
<available file="${appserver.home}/client/jboss-appclient.jar" property="appserver.type" value="jboss"/>
<available file="${appserver.home}/modules/org/jboss/as/standalone/main/module.xml" property="appserver.type" value="jboss"/>
<available file="${appserver.home}/modules/system/layers/base/org/jboss/as/standalone/main/module.xml" property="appserver.type" value="jboss"/>
<available file="${appserver.home}/client/cxf-api.jar" property="appserver.subtype" value="jboss6"/>
<available file="${appserver.home}/modules/org/jboss/as/standalone/main/module.xml" property="appserver.subtype" value="jboss7"/>
<!-- WildFly 8 is same as JBoss EAP 6 for building -->
<available file="${appserver.home}/modules/system/layers/base/org/jboss/as/standalone/main/module.xml" property="appserver.subtype" value="jbosseap6"/>
<available file="${appserver.home}/lib/javaee.jar" property="appserver.type" value="glassfish"/>
<available file="${appserver.home}/glassfish/lib/javaee.jar" property="appserver.type" value="glassfish"/>
<available file="${appserver.home}/lib/appserv-ext.jar.jar" property="appserver.subtype" value="glassfish2"/>
<available file="${appserver.home}/modules/bean-validator.jar" property="appserver.subtype" value="glassfish3"/>
<available file="${appserver.home}/glassfish/lib/appserv-rt.jar" property="appserver.subtype" value="glassfish4"/>
<available file="${appserver.home}/wlserver_10.3/server/lib/wlclient.jar" property="appserver.type" value="weblogic"/>
<available file="${appserver.home}/lib/commandlineutils.jar" property="appserver.type" value="websphere"/>
<!-- Not yet tested:
<available file="${appserver.home}/bin/server.jar" property="appserver.type" value="geronimo"/>
-->
<property name="appserver.type.detected.errormessage"
value="'appserver.type' could not be detected or is not configured. Glassfish 2.1.1, Glassfish 3.1, Glassfish 4.0, JBoss 5.1.0.GA, JBoss EAP 5.1, JBoss 6.0, JBoss 7.1.1, JBoss EAP 6.1 and 6.2, WildFly 8, WebLogic 10.3.3, WebSphere 7.0.0.13 can be detected. (Is 'appserver.home' configured?)"/>
<ant antfile="${ejbca.home}/echo.xml" target="appserver.error.message"/>
<condition property="bundle-hibernate-jpa">
<or>
<matches pattern="glassfish" string="${appserver.type}"/>
<matches pattern="weblogic" string="${appserver.type}"/>
<matches pattern="websphere" string="${appserver.type}"/>
<!-- ... -->
</or>
</condition>
<condition property="exclude-slf4j">
<or>
<matches pattern="glassfish3" string="${appserver.subtype}"/>
<matches pattern="glassfish4" string="${appserver.subtype}"/>
<!-- ... -->
</or>
</condition>
<condition property="exclude-xerces">
<or>
<matches pattern="jboss6" string="${appserver.subtype}"/>
<matches pattern="jboss7" string="${appserver.subtype}"/>
<matches pattern="jbosseap6" string="${appserver.subtype}"/>
<matches pattern="glassfish" string="${appserver.type}"/>
<!-- ... -->
</or>
</condition>
<condition property="exclude-xalan">
<or>
<matches pattern="jboss6" string="${appserver.subtype}"/>
<matches pattern="jboss7" string="${appserver.subtype}"/>
<matches pattern="jbosseap6" string="${appserver.subtype}"/>
<!-- ... -->
</or>
</condition>
<condition property="exclude-serializer">
<or>
<matches pattern="jboss6" string="${appserver.subtype}"/>
<matches pattern="jboss7" string="${appserver.subtype}"/>
<matches pattern="jbosseap6" string="${appserver.subtype}"/>
<!-- ... -->
</or>
</condition>
<!-- Automatically determine DataSource JNDI name prefix from application server type -->
<condition property="datasource.jndi-name-prefix" value="java:/"><equals arg1="jboss" arg2="${appserver.type}"/></condition>
<condition property="datasource.jndi-name-prefix" value="jdbc/"><equals arg1="glassfish" arg2="${appserver.type}"/></condition>
<condition property="datasource.jndi-name-prefix" value=""><equals arg1="weblogic" arg2="${appserver.type}"/></condition>
<condition property="datasource.jndi-name-prefix" value="jdbc/"><equals arg1="websphere" arg2="${appserver.type}"/></condition>
<!-- Finally we read in default properties from file. This should be done last since a few settings above
are automagically detected based on appserver-type for instance -->
<property file="${ejbca.home}/src/java/defaultvalues.properties"/>
<!-- set some hard coded defaults, if they have not been set before -->
<!-- java.ver is used to select the correct version of bc libraries to include in ear -->
<property name="java.ver" value="16" />
<property name="ca.tokentype" value="soft"/>
<property name="ocspHardTokenClasses" value="${ejbca.home}/ocspHardTokenClasses"/>
<property name="ocsp.hardToken.classes" location="${ocspHardTokenClasses}"/>
<property name="weblogic-oracle-columntype" value="" />
<property name="mail.from" value="[email protected]" />
<property name="mail.user" value="ejbca_user" />
<property name="mail.password" value="" />
<property name="mail.pop3.host" value="localhost" />
<property name="mail.smtp.host" value="localhost" />
<property name="mail.smtp.port" value="25" />
<property name="mail.smtp.auth" value="false" />
<property name="mail.smtp.starttls.enable" value="false" />
<property name="mail.debug" value="false" />
<property name="httpsserver.bindaddress.pubhttp" value="0.0.0.0" />
<property name="httpsserver.bindaddress.pubhttps" value="0.0.0.0" />
<property name="httpsserver.bindaddress.privhttps" value="0.0.0.0" />
<property name="httpserver.external.fqdn" value="" />
<condition property="doc.war.enabled">
<equals arg1="internal" arg2="${web.docbaseuri}" casesensitive="false" trim="true" />
</condition>
<condition property="renew.war.enabled">
<equals arg1="true" arg2="${web.renewalenabled}" casesensitive="false" trim="true" />
</condition>
<condition property="cmptcpservices.enabled">
<istrue value="${cmp.tcp.enabled}"/>
</condition>
<property name="ocsp.enabled" value="true" />
<property name="certstore.enabled" value="false" />
<property name="crlstore.enabled" value="false" />
<property name="crlstore.contextroot" value="/crls" />
<property name="certstore.contextroot" value="/certificates" />
<property name="ocsp.contextroot" value="/ejbca/publicweb/status" />
<!-- set hibernate dialect -->
<condition property="hibernate.dialect" value="org.hibernate.dialect.DB2Dialect"><equals arg1="${database.name}" arg2="db2"/></condition>
<condition property="hibernate.dialect" value="org.hibernate.dialect.DerbyDialect"><equals arg1="${database.name}" arg2="derby"/></condition>
<condition property="hibernate.dialect" value="org.hibernate.dialect.HSQLDialect"><equals arg1="${database.name}" arg2="hsqldb"/></condition>
<condition property="hibernate.dialect" value="org.hibernate.dialect.H2Dialect"><equals arg1="${database.name}" arg2="h2"/></condition>
<condition property="hibernate.dialect" value="org.hibernate.dialect.InformixDialect"><equals arg1="${database.name}" arg2="informix"/></condition>
<condition property="hibernate.dialect" value="org.hibernate.dialect.IngresDialect"><equals arg1="${database.name}" arg2="ingres"/></condition>
<condition property="hibernate.dialect" value="org.hibernate.dialect.SQLServerDialect"><equals arg1="${database.name}" arg2="mssql"/></condition>
<condition property="hibernate.dialect" value="org.hibernate.dialect.MySQLDialect"><equals arg1="${database.name}" arg2="mysql"/></condition>
<condition property="hibernate.dialect" value="org.hibernate.dialect.Oracle10gDialect"><equals arg1="${database.name}" arg2="oracle"/></condition>
<condition property="hibernate.dialect" value="org.hibernate.dialect.PostgreSQLDialect"><equals arg1="${database.name}" arg2="postgres"/></condition>
<condition property="hibernate.dialect" value="org.hibernate.dialect.SybaseDialect"><equals arg1="${database.name}" arg2="sybase"/></condition>
<fail unless="hibernate.dialect" message="Unsupported database type '${database.name}'."/>
<!-- We use a valid connection sql to make JBoss auto-recreate destroyed database connections. This SQL is different on DB2 and Oracle -->
<condition property="database.valid.connection.sql" value="select 1 from sysibm.sysdummy1"><equals arg1="${database.name}" arg2="db2"/></condition>
<condition property="database.valid.connection.sql" value="select 1 from dual"><equals arg1="${database.name}" arg2="oracle"/></condition>
<property name="database.valid.connection.sql" value="select 1" /> <!-- all other databases -->
<condition property="ocsp-database.valid.connection.sql" value="select 1 from sysibm.sysdummy1"><contains string="${ocsp-database.driver}" substring="db2"/></condition>
<condition property="ocsp-database.valid.connection.sql" value="select 1 from dual"><contains string="${ocsp-database.driver}" substring="oracle"/></condition>
<property name="ocsp-database.valid.connection.sql" value="select 1" /> <!-- all other databases -->
<condition property="externalra-database.valid.connection.sql" value="select 1 from sysibm.sysdummy1"><contains string="${externalra-database.driver}" substring="db2"/></condition>
<condition property="externalra-database.valid.connection.sql" value="select 1 from dual"><contains string="${externalra-database.driver}" substring="oracle"/></condition>
<property name="externalra-database.valid.connection.sql" value="select 1" /> <!-- all other databases -->
<target name="display-properties" description="Show current configuration">
<echo>
---------- ${app.version} CONFIGURATION PROPERTIES ----------
appserver.type = ${appserver.type}
appserver.subtype = ${appserver.subtype}
appserver.home = ${appserver.home}
java.version = ${java.version}
ocsp.signaturealgorithm = ${ocsp.signaturealgorithm}
datasource.jndi-name = ${datasource.jndi-name}
datasource.jndi-name-prefix = ${datasource.jndi-name-prefix}
database.name = ${database.name}
database.url = ${database.url}
database.driver = ${database.driver}
database.username = ${database.username}
database.password = ***
database.useSeparateCertificateTable = ${database.useSeparateCertificateTable}
database.valid.connection.sql = ${database.valid.connection.sql}
mail.jndi-name = ${mail.jndi-name}
mail.from = ${mail.from}
mail.user = ${mail.user}
mail.password = ***
mail.smtp.host = ${mail.smtp.host}
mail.smtp.port = ${mail.smtp.port}
mail.smtp.auth = ${mail.smtp.auth}
mail.debug = ${mail.debug}
httpserver.pubhttp = ${httpserver.pubhttp}
httpserver.pubhttps = ${httpserver.pubhttps}
httpserver.privhttps = ${httpserver.privhttps}
httpserver.external.privhttps = ${httpserver.external.privhttps}
httpsserver.hostname = ${httpsserver.hostname}
httpsserver.password = ***
httpserver.external.fqdn = ${httpserver.external.fqdn}
web.contentencoding = ${web.contentencoding}
web.renewalenabled = ${web.renewalenabled}
ejbcaws.enabled = ${ejbcaws.enabled}
cmp.tcp.enabled = ${cmp.tcp.enabled}
cmp.tcp.portno = ${cmp.tcp.portno}
cmp.tcp.logdir = ${cmp.tcp.logdir}
cmp.tcp.conffile = ${cmp.tcp.conffile}
xkms.enabled = ${xkms.enabled}
xkms.serviceport = ${xkms.serviceport}
</echo>
</target>
<target name="fail-unless-appserver-detected">
<echo message="appserver.home: ${appserver.home}"/>
<echo message="appserver.type: ${appserver.type}"/>
<echo message="appserver.subtype: ${appserver.subtype}"/>
<fail message="${appserver.type.detected.errormessage}" unless="appserver.type"/>
</target>
</project>