Make sure to set:
<subsystem xmlns="urn:jboss:domain:ee:1.1">
<spec-descriptor-property-replacement>
true
</spec-descriptor-property-replacement>
<jboss-descriptor-property-replacement>
true
</jboss-descriptor-property-replacement>
</subsystem>
Attached is a test case. Deploy and access the URL
It will show 'web-test' ${sysProp:'app-test'}
indicating that substitution ins application.xml was not done.
See application.xml:
<env-entry>
<env-entry-name>test</env-entry-name>
<env-entry-type>java.lang.String</env-entry-type>
<env-entry-value>${sysProp:'app-test'}</env-entry-value>
</env-entry>
in web.xml
<context-param>
<param-name>webtest</param-name>
<param-value>${sysProp:'web-test'}</param-value>
</context-param>
I did some digging:
org/jboss/metadata/parser/util/MetaDataElementParser.java:
139 if (DescriptionGroupMetaDataParser.parse(reader, earMetaData.getDescriptionGroup()))
{
140 return;
141 }
142 if (EnvironmentRefsGroupMetaDataParser.parse(reader, earMetaData.getEarEnvironmentRefsGroup()))
{
143 return;
144 }
are not calling the parse method with the "propertyReplacer"