forked from Keyfactor/ejbca-ce
-
Notifications
You must be signed in to change notification settings - Fork 0
/
propertyDefaults.xml
203 lines (182 loc) · 11.2 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
<?xml version="1.0" encoding="UTF-8"?>
<project name="propertyDefaults">
<description>
This file sets the property defaults. Included from other files.
</description>
<!-- Validate basic build requirements before we do anything else. -->
<fail message="Apache Ant 1.8+ is required to build EJBCA">
<condition><not><antversion atleast="1.8" /></not></condition>
</fail>
<!--
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" inheritall="true" inheritrefs="true"/>
<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/jaxws.properties" />
<property file="${ejbca.home}/conf/scepra.properties" />
<property file="${ejbca.home}/conf/va.properties" />
<property file="${ejbca.home}/conf/va-publisher.properties" />
<property file="${ejbca.home}/conf/systemtests.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 -->
<!-- Note: Only WF 23-26 are currently supported -->
<property name="appserver.type" value="jboss"/>
<property name="appserver.subtype" value="jboss7"/>
<condition property="exclude-xerces">
<or>
<matches pattern="jboss7" 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>
<!-- 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="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="httpserver.external.fqdn" value="" />
<property name="target.servercert.ca" value="ManagementCA" />
<property name="target.clientcert.ca" value="ManagementCA" />
<property name="target.hostname" value="localhost" />
<property name="target.port.http" value="8080" />
<property name="tests.jvmargs" value="" />
<!-- By default, we connect directly to EJBCA in the CMP tests, but it is also
possible override those variables to connect via the CMP proxy -->
<property name="httpCmpProxyURL" value="http://${target.hostname}:${target.port.http}/ejbca/publicweb/cmp"/>
<condition property="doc.war.enabled">
<equals arg1="internal" arg2="${web.docbaseuri}" casesensitive="false" trim="true" />
</condition>
<property name="ocsp.enabled" value="true" />
<property name="ocsp.contextroot" value="/ejbca/publicweb/status" />
<property name="crlstore.enabled" value="true" />
<property name="crlstore.contextroot" value="/ejbca/publicweb/crls" />
<property name="certstore.enabled" value="true" />
<property name="certstore.contextroot" value="/ejbca/publicweb/certificates" />
<!-- 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.SQLServer2008Dialect"><equals arg1="${database.name}" arg2="mssql"/></condition>
<condition property="hibernate.dialect" value="org.hibernate.dialect.MySQL5InnoDBDialect"><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 -->
<property name="unidfnr.enabled" value="false" /> <!-- by default unidfnr is not enabled, but can be in ocsp.properties -->
<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(ant.java) = ${java.version} (${ant.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}
ejbcaws.enabled = ${ejbcaws.enabled}
unidfnr.enabled = ${unidfnr.enabled}
</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>