I am trying to setup my project to use different virtual-host names depending on the environment.
I know I could create directories with a separate jboss-web.xml file in each directory. But I recently moved this project to maven and wanted to take advantage of the profiles. I already have the databases set up so they can be configured differently by the profile by using filters.
jboss-web.xml:
<jboss-web>
<context-root>/</context-root>
<virtual-host>${jbossweb.virtualhost}</virtual-host>
</jboss-web>
The environment specific property file has an entry for:
jbossweb.virtualhost=hostname.domain.com
the pom file build section has this definition
<filters>
<filter>src/main/filters/filter-${env}.properties</filter>
</filters>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
<resource>
<directory>src/main/webapp/WEB-INF</directory>
<filtering>true</filtering>
</resource>
</resources>
Just for good measure, the profiles section has this configuration:
<profile>
<id>dev</id>
<properties>
<env>dev</env>
</properties>
</profile>
I'm not even sure if what I'm trying to do is possible. When I try it, Jboss-web.xml has the variable name in the virtual-host location and not the value.
Am I barking up the wrong tree?
Thanks,
Eric
jbossweb.virtualhost
in the profile definition. – Latoshalatouche